wpseo_force_creating_and_using_attachment_indexables

wpseo_force_creating_and_using_attachment_indexables

Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-seo.23.8

apply_filters('wpseo_force_creating_and_using_attachment_indexables') is found 3 times:

  • /src/builders/indexable-link-builder.php line 335
    		if ( $model->type === SEO_Links::TYPE_INTERNAL_IMAGE ) {
    			$permalink = $this->build_permalink( $url, $home_url );
    
    			/** The `wpseo_force_creating_and_using_attachment_indexables` filter is documented in indexable-link-builder.php */
    			if ( ! $this->options_helper->get( 'disable-attachment' ) || \apply_filters( 'wpseo_force_creating_and_using_attachment_indexables', false ) ) {
    				$model = $this->enhance_link_from_indexable( $model, $permalink );
    			}
    			else {
    				$target_post_id = ( $image_id !== 0 ) ? $image_id : WPSEO_Image_Utils::get_attachment_by_url( $permalink );
    
    				if ( ! empty( $target_post_id ) ) {
    
  • /src/helpers/image-helper.php line 313
    			return 0;
    		}
    
    		/** The `wpseo_force_creating_and_using_attachment_indexables` filter is documented in indexable-link-builder.php */
    		if ( ! $this->options_helper->get( 'disable-attachment' ) || \apply_filters( 'wpseo_force_creating_and_using_attachment_indexables', false ) ) {
    			// Strip out the size part of an image URL.
    			$url = \preg_replace( '/(.*)-\d+x\d+\.(jpeg|jpg|png|gif)$/', '$1.$2', $url );
    
    			$indexable = $this->indexable_repository->find_by_permalink( $url );
    
    			if ( $indexable && $indexable->object_type === 'post' && $indexable->object_sub_type === 'attachment' ) {
    
  • /src/images/Application/image-content-extractor.php line 29
    		 * The default value is false.
    		 *
    		 * @since 21.1
    		 */
    		$should_not_parse_content = \apply_filters( 'wpseo_force_creating_and_using_attachment_indexables', false );
    		/**
    		 * Filter 'wpseo_force_skip_image_content_parsing' - Filters if we should force skip scanning the content to parse images.
    		 * This filter can be used if the regex gives a faster result than scanning the code.
    		 *
    		 * The default value is false.
    		 *