post_type_archive_link

post_type_archive_link

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7.2

apply_filters('post_type_archive_link') is found 2 times:

  • /wp-includes/link-template.php line 1321
    1317
    1318
    1319
    1320
    1321
    1322
    1323
    1324
    1325
    1326
        } else {
            $link = get_home_url();
        }
        /** This filter is documented in wp-includes/link-template.php */
        return apply_filters( 'post_type_archive_link', $link, $post_type );
    }
     
    if ( ! $post_type_obj->has_archive ) {
        return false;
    }
  • /wp-includes/link-template.php line 1348
    1344
    1345
    1346
    1347
    1348
    1349
    1350
    1351
    1352
    1353
    1354
         *
         * @param string $link      The post type archive permalink.
         * @param string $post_type Post type name.
         */
        return apply_filters( 'post_type_archive_link', $link, $post_type );
    }
     
    /**
     * Retrieves the permalink for a post type archive feed.
     *
     * @since 3.1.0

See this hook used in plugins: