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.24.8.1

apply_filters('wpseo_force_creating_and_using_attachment_indexables') is found 3 times:

  • /src/builders/indexable-link-builder.php line 335
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    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
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
        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
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    * 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.
     *