aioseo_social_image_ignore_cover_block

aioseo_social_image_ignore_cover_block

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: all-in-one-seo-pack.4.7.5.1

apply_filters('aioseo_social_image_ignore_cover_block') is found 1 times:

  • /app/Common/Social/Image.php line 194
    		$postContent = aioseo()->helpers->getPostContent( $this->post );
    		preg_match_all( '|<img.*?src=&#91;\'"&#93;(.*?)&#91;\'"&#93;.*?>|i', $postContent, $matches );
    
    		// Ignore cover block background image - WP >= 5.7.
    		if ( ! empty( $matches[0] ) && apply_filters( 'aioseo_social_image_ignore_cover_block', true, $this->post, $matches ) ) {
    			foreach ( $matches[0] as $key => $match ) {
    				if ( false !== stripos( $match, 'wp-block-cover__image-background' ) ) {
    					unset( $matches[1][ $key ] );
    				}
    			}
    		}