Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/wp-inclu...
File: link-template.php
}
[500] Fix | Delete
[501] Fix | Delete
if ( is_numeric( $post->post_name ) || str_contains( get_option( 'permalink_structure' ), '%category%' ) ) {
[502] Fix | Delete
$name = 'attachment/' . $post->post_name; // <permalink>/<int>/ is paged so we use the explicit attachment marker.
[503] Fix | Delete
} else {
[504] Fix | Delete
$name = $post->post_name;
[505] Fix | Delete
}
[506] Fix | Delete
[507] Fix | Delete
if ( ! str_contains( $parentlink, '?' ) ) {
[508] Fix | Delete
$link = user_trailingslashit( trailingslashit( $parentlink ) . '%postname%' );
[509] Fix | Delete
}
[510] Fix | Delete
[511] Fix | Delete
if ( ! $leavename ) {
[512] Fix | Delete
$link = str_replace( '%postname%', $name, $link );
[513] Fix | Delete
}
[514] Fix | Delete
} elseif ( $wp_rewrite->using_permalinks() && ! $leavename ) {
[515] Fix | Delete
$link = home_url( user_trailingslashit( $post->post_name ) );
[516] Fix | Delete
}
[517] Fix | Delete
[518] Fix | Delete
if ( ! $link ) {
[519] Fix | Delete
$link = home_url( '/?attachment_id=' . $post->ID );
[520] Fix | Delete
}
[521] Fix | Delete
[522] Fix | Delete
/**
[523] Fix | Delete
* Filters the permalink for an attachment.
[524] Fix | Delete
*
[525] Fix | Delete
* @since 2.0.0
[526] Fix | Delete
* @since 5.6.0 Providing an empty string will now disable
[527] Fix | Delete
* the view attachment page link on the media modal.
[528] Fix | Delete
*
[529] Fix | Delete
* @param string $link The attachment's permalink.
[530] Fix | Delete
* @param int $post_id Attachment ID.
[531] Fix | Delete
*/
[532] Fix | Delete
return apply_filters( 'attachment_link', $link, $post->ID );
[533] Fix | Delete
}
[534] Fix | Delete
[535] Fix | Delete
/**
[536] Fix | Delete
* Retrieves the permalink for the year archives.
[537] Fix | Delete
*
[538] Fix | Delete
* @since 1.5.0
[539] Fix | Delete
*
[540] Fix | Delete
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
[541] Fix | Delete
*
[542] Fix | Delete
* @param int|false $year Integer of year. False for current year.
[543] Fix | Delete
* @return string The permalink for the specified year archive.
[544] Fix | Delete
*/
[545] Fix | Delete
function get_year_link( $year ) {
[546] Fix | Delete
global $wp_rewrite;
[547] Fix | Delete
if ( ! $year ) {
[548] Fix | Delete
$year = current_time( 'Y' );
[549] Fix | Delete
}
[550] Fix | Delete
$yearlink = $wp_rewrite->get_year_permastruct();
[551] Fix | Delete
if ( ! empty( $yearlink ) ) {
[552] Fix | Delete
$yearlink = str_replace( '%year%', $year, $yearlink );
[553] Fix | Delete
$yearlink = home_url( user_trailingslashit( $yearlink, 'year' ) );
[554] Fix | Delete
} else {
[555] Fix | Delete
$yearlink = home_url( '?m=' . $year );
[556] Fix | Delete
}
[557] Fix | Delete
[558] Fix | Delete
/**
[559] Fix | Delete
* Filters the year archive permalink.
[560] Fix | Delete
*
[561] Fix | Delete
* @since 1.5.0
[562] Fix | Delete
*
[563] Fix | Delete
* @param string $yearlink Permalink for the year archive.
[564] Fix | Delete
* @param int $year Year for the archive.
[565] Fix | Delete
*/
[566] Fix | Delete
return apply_filters( 'year_link', $yearlink, $year );
[567] Fix | Delete
}
[568] Fix | Delete
[569] Fix | Delete
/**
[570] Fix | Delete
* Retrieves the permalink for the month archives with year.
[571] Fix | Delete
*
[572] Fix | Delete
* @since 1.0.0
[573] Fix | Delete
*
[574] Fix | Delete
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
[575] Fix | Delete
*
[576] Fix | Delete
* @param int|false $year Integer of year. False for current year.
[577] Fix | Delete
* @param int|false $month Integer of month. False for current month.
[578] Fix | Delete
* @return string The permalink for the specified month and year archive.
[579] Fix | Delete
*/
[580] Fix | Delete
function get_month_link( $year, $month ) {
[581] Fix | Delete
global $wp_rewrite;
[582] Fix | Delete
if ( ! $year ) {
[583] Fix | Delete
$year = current_time( 'Y' );
[584] Fix | Delete
}
[585] Fix | Delete
if ( ! $month ) {
[586] Fix | Delete
$month = current_time( 'm' );
[587] Fix | Delete
}
[588] Fix | Delete
$monthlink = $wp_rewrite->get_month_permastruct();
[589] Fix | Delete
if ( ! empty( $monthlink ) ) {
[590] Fix | Delete
$monthlink = str_replace( '%year%', $year, $monthlink );
[591] Fix | Delete
$monthlink = str_replace( '%monthnum%', zeroise( (int) $month, 2 ), $monthlink );
[592] Fix | Delete
$monthlink = home_url( user_trailingslashit( $monthlink, 'month' ) );
[593] Fix | Delete
} else {
[594] Fix | Delete
$monthlink = home_url( '?m=' . $year . zeroise( $month, 2 ) );
[595] Fix | Delete
}
[596] Fix | Delete
[597] Fix | Delete
/**
[598] Fix | Delete
* Filters the month archive permalink.
[599] Fix | Delete
*
[600] Fix | Delete
* @since 1.5.0
[601] Fix | Delete
*
[602] Fix | Delete
* @param string $monthlink Permalink for the month archive.
[603] Fix | Delete
* @param int $year Year for the archive.
[604] Fix | Delete
* @param int $month The month for the archive.
[605] Fix | Delete
*/
[606] Fix | Delete
return apply_filters( 'month_link', $monthlink, $year, $month );
[607] Fix | Delete
}
[608] Fix | Delete
[609] Fix | Delete
/**
[610] Fix | Delete
* Retrieves the permalink for the day archives with year and month.
[611] Fix | Delete
*
[612] Fix | Delete
* @since 1.0.0
[613] Fix | Delete
*
[614] Fix | Delete
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
[615] Fix | Delete
*
[616] Fix | Delete
* @param int|false $year Integer of year. False for current year.
[617] Fix | Delete
* @param int|false $month Integer of month. False for current month.
[618] Fix | Delete
* @param int|false $day Integer of day. False for current day.
[619] Fix | Delete
* @return string The permalink for the specified day, month, and year archive.
[620] Fix | Delete
*/
[621] Fix | Delete
function get_day_link( $year, $month, $day ) {
[622] Fix | Delete
global $wp_rewrite;
[623] Fix | Delete
if ( ! $year ) {
[624] Fix | Delete
$year = current_time( 'Y' );
[625] Fix | Delete
}
[626] Fix | Delete
if ( ! $month ) {
[627] Fix | Delete
$month = current_time( 'm' );
[628] Fix | Delete
}
[629] Fix | Delete
if ( ! $day ) {
[630] Fix | Delete
$day = current_time( 'j' );
[631] Fix | Delete
}
[632] Fix | Delete
[633] Fix | Delete
$daylink = $wp_rewrite->get_day_permastruct();
[634] Fix | Delete
if ( ! empty( $daylink ) ) {
[635] Fix | Delete
$daylink = str_replace( '%year%', $year, $daylink );
[636] Fix | Delete
$daylink = str_replace( '%monthnum%', zeroise( (int) $month, 2 ), $daylink );
[637] Fix | Delete
$daylink = str_replace( '%day%', zeroise( (int) $day, 2 ), $daylink );
[638] Fix | Delete
$daylink = home_url( user_trailingslashit( $daylink, 'day' ) );
[639] Fix | Delete
} else {
[640] Fix | Delete
$daylink = home_url( '?m=' . $year . zeroise( $month, 2 ) . zeroise( $day, 2 ) );
[641] Fix | Delete
}
[642] Fix | Delete
[643] Fix | Delete
/**
[644] Fix | Delete
* Filters the day archive permalink.
[645] Fix | Delete
*
[646] Fix | Delete
* @since 1.5.0
[647] Fix | Delete
*
[648] Fix | Delete
* @param string $daylink Permalink for the day archive.
[649] Fix | Delete
* @param int $year Year for the archive.
[650] Fix | Delete
* @param int $month Month for the archive.
[651] Fix | Delete
* @param int $day The day for the archive.
[652] Fix | Delete
*/
[653] Fix | Delete
return apply_filters( 'day_link', $daylink, $year, $month, $day );
[654] Fix | Delete
}
[655] Fix | Delete
[656] Fix | Delete
/**
[657] Fix | Delete
* Displays the permalink for the feed type.
[658] Fix | Delete
*
[659] Fix | Delete
* @since 3.0.0
[660] Fix | Delete
*
[661] Fix | Delete
* @param string $anchor The link's anchor text.
[662] Fix | Delete
* @param string $feed Optional. Feed type. Possible values include 'rss2', 'atom'.
[663] Fix | Delete
* Default is the value of get_default_feed().
[664] Fix | Delete
*/
[665] Fix | Delete
function the_feed_link( $anchor, $feed = '' ) {
[666] Fix | Delete
$link = '<a href="' . esc_url( get_feed_link( $feed ) ) . '">' . $anchor . '</a>';
[667] Fix | Delete
[668] Fix | Delete
/**
[669] Fix | Delete
* Filters the feed link anchor tag.
[670] Fix | Delete
*
[671] Fix | Delete
* @since 3.0.0
[672] Fix | Delete
*
[673] Fix | Delete
* @param string $link The complete anchor tag for a feed link.
[674] Fix | Delete
* @param string $feed The feed type. Possible values include 'rss2', 'atom',
[675] Fix | Delete
* or an empty string for the default feed type.
[676] Fix | Delete
*/
[677] Fix | Delete
echo apply_filters( 'the_feed_link', $link, $feed );
[678] Fix | Delete
}
[679] Fix | Delete
[680] Fix | Delete
/**
[681] Fix | Delete
* Retrieves the permalink for the feed type.
[682] Fix | Delete
*
[683] Fix | Delete
* @since 1.5.0
[684] Fix | Delete
*
[685] Fix | Delete
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
[686] Fix | Delete
*
[687] Fix | Delete
* @param string $feed Optional. Feed type. Possible values include 'rss2', 'atom'.
[688] Fix | Delete
* Default is the value of get_default_feed().
[689] Fix | Delete
* @return string The feed permalink.
[690] Fix | Delete
*/
[691] Fix | Delete
function get_feed_link( $feed = '' ) {
[692] Fix | Delete
global $wp_rewrite;
[693] Fix | Delete
[694] Fix | Delete
$permalink = $wp_rewrite->get_feed_permastruct();
[695] Fix | Delete
[696] Fix | Delete
if ( $permalink ) {
[697] Fix | Delete
if ( str_contains( $feed, 'comments_' ) ) {
[698] Fix | Delete
$feed = str_replace( 'comments_', '', $feed );
[699] Fix | Delete
$permalink = $wp_rewrite->get_comment_feed_permastruct();
[700] Fix | Delete
}
[701] Fix | Delete
[702] Fix | Delete
if ( get_default_feed() === $feed ) {
[703] Fix | Delete
$feed = '';
[704] Fix | Delete
}
[705] Fix | Delete
[706] Fix | Delete
$permalink = str_replace( '%feed%', $feed, $permalink );
[707] Fix | Delete
$permalink = preg_replace( '#/+#', '/', "/$permalink" );
[708] Fix | Delete
$output = home_url( user_trailingslashit( $permalink, 'feed' ) );
[709] Fix | Delete
} else {
[710] Fix | Delete
if ( empty( $feed ) ) {
[711] Fix | Delete
$feed = get_default_feed();
[712] Fix | Delete
}
[713] Fix | Delete
[714] Fix | Delete
if ( str_contains( $feed, 'comments_' ) ) {
[715] Fix | Delete
$feed = str_replace( 'comments_', 'comments-', $feed );
[716] Fix | Delete
}
[717] Fix | Delete
[718] Fix | Delete
$output = home_url( "?feed={$feed}" );
[719] Fix | Delete
}
[720] Fix | Delete
[721] Fix | Delete
/**
[722] Fix | Delete
* Filters the feed type permalink.
[723] Fix | Delete
*
[724] Fix | Delete
* @since 1.5.0
[725] Fix | Delete
*
[726] Fix | Delete
* @param string $output The feed permalink.
[727] Fix | Delete
* @param string $feed The feed type. Possible values include 'rss2', 'atom',
[728] Fix | Delete
* or an empty string for the default feed type.
[729] Fix | Delete
*/
[730] Fix | Delete
return apply_filters( 'feed_link', $output, $feed );
[731] Fix | Delete
}
[732] Fix | Delete
[733] Fix | Delete
/**
[734] Fix | Delete
* Retrieves the permalink for the post comments feed.
[735] Fix | Delete
*
[736] Fix | Delete
* @since 2.2.0
[737] Fix | Delete
*
[738] Fix | Delete
* @param int $post_id Optional. Post ID. Default is the ID of the global `$post`.
[739] Fix | Delete
* @param string $feed Optional. Feed type. Possible values include 'rss2', 'atom'.
[740] Fix | Delete
* Default is the value of get_default_feed().
[741] Fix | Delete
* @return string The permalink for the comments feed for the given post on success, empty string on failure.
[742] Fix | Delete
*/
[743] Fix | Delete
function get_post_comments_feed_link( $post_id = 0, $feed = '' ) {
[744] Fix | Delete
$post_id = absint( $post_id );
[745] Fix | Delete
[746] Fix | Delete
if ( ! $post_id ) {
[747] Fix | Delete
$post_id = get_the_ID();
[748] Fix | Delete
}
[749] Fix | Delete
[750] Fix | Delete
if ( empty( $feed ) ) {
[751] Fix | Delete
$feed = get_default_feed();
[752] Fix | Delete
}
[753] Fix | Delete
[754] Fix | Delete
$post = get_post( $post_id );
[755] Fix | Delete
[756] Fix | Delete
// Bail out if the post does not exist.
[757] Fix | Delete
if ( ! $post instanceof WP_Post ) {
[758] Fix | Delete
return '';
[759] Fix | Delete
}
[760] Fix | Delete
[761] Fix | Delete
$unattached = 'attachment' === $post->post_type && 0 === (int) $post->post_parent;
[762] Fix | Delete
[763] Fix | Delete
if ( get_option( 'permalink_structure' ) ) {
[764] Fix | Delete
if ( 'page' === get_option( 'show_on_front' ) && (int) get_option( 'page_on_front' ) === $post_id ) {
[765] Fix | Delete
$url = _get_page_link( $post_id );
[766] Fix | Delete
} else {
[767] Fix | Delete
$url = get_permalink( $post_id );
[768] Fix | Delete
}
[769] Fix | Delete
[770] Fix | Delete
if ( $unattached ) {
[771] Fix | Delete
$url = home_url( '/feed/' );
[772] Fix | Delete
if ( get_default_feed() !== $feed ) {
[773] Fix | Delete
$url .= "$feed/";
[774] Fix | Delete
}
[775] Fix | Delete
$url = add_query_arg( 'attachment_id', $post_id, $url );
[776] Fix | Delete
} else {
[777] Fix | Delete
$url = trailingslashit( $url ) . 'feed';
[778] Fix | Delete
if ( get_default_feed() !== $feed ) {
[779] Fix | Delete
$url .= "/$feed";
[780] Fix | Delete
}
[781] Fix | Delete
$url = user_trailingslashit( $url, 'single_feed' );
[782] Fix | Delete
}
[783] Fix | Delete
} else {
[784] Fix | Delete
if ( $unattached ) {
[785] Fix | Delete
$url = add_query_arg(
[786] Fix | Delete
array(
[787] Fix | Delete
'feed' => $feed,
[788] Fix | Delete
'attachment_id' => $post_id,
[789] Fix | Delete
),
[790] Fix | Delete
home_url( '/' )
[791] Fix | Delete
);
[792] Fix | Delete
} elseif ( 'page' === $post->post_type ) {
[793] Fix | Delete
$url = add_query_arg(
[794] Fix | Delete
array(
[795] Fix | Delete
'feed' => $feed,
[796] Fix | Delete
'page_id' => $post_id,
[797] Fix | Delete
),
[798] Fix | Delete
home_url( '/' )
[799] Fix | Delete
);
[800] Fix | Delete
} else {
[801] Fix | Delete
$url = add_query_arg(
[802] Fix | Delete
array(
[803] Fix | Delete
'feed' => $feed,
[804] Fix | Delete
'p' => $post_id,
[805] Fix | Delete
),
[806] Fix | Delete
home_url( '/' )
[807] Fix | Delete
);
[808] Fix | Delete
}
[809] Fix | Delete
}
[810] Fix | Delete
[811] Fix | Delete
/**
[812] Fix | Delete
* Filters the post comments feed permalink.
[813] Fix | Delete
*
[814] Fix | Delete
* @since 1.5.1
[815] Fix | Delete
*
[816] Fix | Delete
* @param string $url Post comments feed permalink.
[817] Fix | Delete
*/
[818] Fix | Delete
return apply_filters( 'post_comments_feed_link', $url );
[819] Fix | Delete
}
[820] Fix | Delete
[821] Fix | Delete
/**
[822] Fix | Delete
* Displays the comment feed link for a post.
[823] Fix | Delete
*
[824] Fix | Delete
* Prints out the comment feed link for a post. Link text is placed in the
[825] Fix | Delete
* anchor. If no link text is specified, default text is used. If no post ID is
[826] Fix | Delete
* specified, the current post is used.
[827] Fix | Delete
*
[828] Fix | Delete
* @since 2.5.0
[829] Fix | Delete
*
[830] Fix | Delete
* @param string $link_text Optional. Descriptive link text. Default 'Comments Feed'.
[831] Fix | Delete
* @param int $post_id Optional. Post ID. Default is the ID of the global `$post`.
[832] Fix | Delete
* @param string $feed Optional. Feed type. Possible values include 'rss2', 'atom'.
[833] Fix | Delete
* Default is the value of get_default_feed().
[834] Fix | Delete
*/
[835] Fix | Delete
function post_comments_feed_link( $link_text = '', $post_id = '', $feed = '' ) {
[836] Fix | Delete
$url = get_post_comments_feed_link( $post_id, $feed );
[837] Fix | Delete
if ( empty( $link_text ) ) {
[838] Fix | Delete
$link_text = __( 'Comments Feed' );
[839] Fix | Delete
}
[840] Fix | Delete
[841] Fix | Delete
$link = '<a href="' . esc_url( $url ) . '">' . $link_text . '</a>';
[842] Fix | Delete
/**
[843] Fix | Delete
* Filters the post comment feed link anchor tag.
[844] Fix | Delete
*
[845] Fix | Delete
* @since 2.8.0
[846] Fix | Delete
*
[847] Fix | Delete
* @param string $link The complete anchor tag for the comment feed link.
[848] Fix | Delete
* @param int $post_id Post ID.
[849] Fix | Delete
* @param string $feed The feed type. Possible values include 'rss2', 'atom',
[850] Fix | Delete
* or an empty string for the default feed type.
[851] Fix | Delete
*/
[852] Fix | Delete
echo apply_filters( 'post_comments_feed_link_html', $link, $post_id, $feed );
[853] Fix | Delete
}
[854] Fix | Delete
[855] Fix | Delete
/**
[856] Fix | Delete
* Retrieves the feed link for a given author.
[857] Fix | Delete
*
[858] Fix | Delete
* Returns a link to the feed for all posts by a given author. A specific feed
[859] Fix | Delete
* can be requested or left blank to get the default feed.
[860] Fix | Delete
*
[861] Fix | Delete
* @since 2.5.0
[862] Fix | Delete
*
[863] Fix | Delete
* @param int $author_id Author ID.
[864] Fix | Delete
* @param string $feed Optional. Feed type. Possible values include 'rss2', 'atom'.
[865] Fix | Delete
* Default is the value of get_default_feed().
[866] Fix | Delete
* @return string Link to the feed for the author specified by $author_id.
[867] Fix | Delete
*/
[868] Fix | Delete
function get_author_feed_link( $author_id, $feed = '' ) {
[869] Fix | Delete
$author_id = (int) $author_id;
[870] Fix | Delete
$permalink_structure = get_option( 'permalink_structure' );
[871] Fix | Delete
[872] Fix | Delete
if ( empty( $feed ) ) {
[873] Fix | Delete
$feed = get_default_feed();
[874] Fix | Delete
}
[875] Fix | Delete
[876] Fix | Delete
if ( ! $permalink_structure ) {
[877] Fix | Delete
$link = home_url( "?feed=$feed&amp;author=" . $author_id );
[878] Fix | Delete
} else {
[879] Fix | Delete
$link = get_author_posts_url( $author_id );
[880] Fix | Delete
if ( get_default_feed() === $feed ) {
[881] Fix | Delete
$feed_link = 'feed';
[882] Fix | Delete
} else {
[883] Fix | Delete
$feed_link = "feed/$feed";
[884] Fix | Delete
}
[885] Fix | Delete
[886] Fix | Delete
$link = trailingslashit( $link ) . user_trailingslashit( $feed_link, 'feed' );
[887] Fix | Delete
}
[888] Fix | Delete
[889] Fix | Delete
/**
[890] Fix | Delete
* Filters the feed link for a given author.
[891] Fix | Delete
*
[892] Fix | Delete
* @since 1.5.1
[893] Fix | Delete
*
[894] Fix | Delete
* @param string $link The author feed link.
[895] Fix | Delete
* @param string $feed Feed type. Possible values include 'rss2', 'atom'.
[896] Fix | Delete
*/
[897] Fix | Delete
$link = apply_filters( 'author_feed_link', $link, $feed );
[898] Fix | Delete
[899] Fix | Delete
return $link;
[900] Fix | Delete
}
[901] Fix | Delete
[902] Fix | Delete
/**
[903] Fix | Delete
* Retrieves the feed link for a category.
[904] Fix | Delete
*
[905] Fix | Delete
* Returns a link to the feed for all posts in a given category. A specific feed
[906] Fix | Delete
* can be requested or left blank to get the default feed.
[907] Fix | Delete
*
[908] Fix | Delete
* @since 2.5.0
[909] Fix | Delete
*
[910] Fix | Delete
* @param int|WP_Term|object $cat The ID or category object whose feed link will be retrieved.
[911] Fix | Delete
* @param string $feed Optional. Feed type. Possible values include 'rss2', 'atom'.
[912] Fix | Delete
* Default is the value of get_default_feed().
[913] Fix | Delete
* @return string Link to the feed for the category specified by `$cat`.
[914] Fix | Delete
*/
[915] Fix | Delete
function get_category_feed_link( $cat, $feed = '' ) {
[916] Fix | Delete
return get_term_feed_link( $cat, 'category', $feed );
[917] Fix | Delete
}
[918] Fix | Delete
[919] Fix | Delete
/**
[920] Fix | Delete
* Retrieves the feed link for a term.
[921] Fix | Delete
*
[922] Fix | Delete
* Returns a link to the feed for all posts in a given term. A specific feed
[923] Fix | Delete
* can be requested or left blank to get the default feed.
[924] Fix | Delete
*
[925] Fix | Delete
* @since 3.0.0
[926] Fix | Delete
*
[927] Fix | Delete
* @param int|WP_Term|object $term The ID or term object whose feed link will be retrieved.
[928] Fix | Delete
* @param string $taxonomy Optional. Taxonomy of `$term_id`.
[929] Fix | Delete
* @param string $feed Optional. Feed type. Possible values include 'rss2', 'atom'.
[930] Fix | Delete
* Default is the value of get_default_feed().
[931] Fix | Delete
* @return string|false Link to the feed for the term specified by `$term` and `$taxonomy`.
[932] Fix | Delete
*/
[933] Fix | Delete
function get_term_feed_link( $term, $taxonomy = '', $feed = '' ) {
[934] Fix | Delete
if ( ! is_object( $term ) ) {
[935] Fix | Delete
$term = (int) $term;
[936] Fix | Delete
}
[937] Fix | Delete
[938] Fix | Delete
$term = get_term( $term, $taxonomy );
[939] Fix | Delete
[940] Fix | Delete
if ( empty( $term ) || is_wp_error( $term ) ) {
[941] Fix | Delete
return false;
[942] Fix | Delete
}
[943] Fix | Delete
[944] Fix | Delete
$taxonomy = $term->taxonomy;
[945] Fix | Delete
[946] Fix | Delete
if ( empty( $feed ) ) {
[947] Fix | Delete
$feed = get_default_feed();
[948] Fix | Delete
}
[949] Fix | Delete
[950] Fix | Delete
$permalink_structure = get_option( 'permalink_structure' );
[951] Fix | Delete
[952] Fix | Delete
if ( ! $permalink_structure ) {
[953] Fix | Delete
if ( 'category' === $taxonomy ) {
[954] Fix | Delete
$link = home_url( "?feed=$feed&amp;cat=$term->term_id" );
[955] Fix | Delete
} elseif ( 'post_tag' === $taxonomy ) {
[956] Fix | Delete
$link = home_url( "?feed=$feed&amp;tag=$term->slug" );
[957] Fix | Delete
} else {
[958] Fix | Delete
$t = get_taxonomy( $taxonomy );
[959] Fix | Delete
$link = home_url( "?feed=$feed&amp;$t->query_var=$term->slug" );
[960] Fix | Delete
}
[961] Fix | Delete
} else {
[962] Fix | Delete
$link = get_term_link( $term, $term->taxonomy );
[963] Fix | Delete
if ( get_default_feed() === $feed ) {
[964] Fix | Delete
$feed_link = 'feed';
[965] Fix | Delete
} else {
[966] Fix | Delete
$feed_link = "feed/$feed";
[967] Fix | Delete
}
[968] Fix | Delete
[969] Fix | Delete
$link = trailingslashit( $link ) . user_trailingslashit( $feed_link, 'feed' );
[970] Fix | Delete
}
[971] Fix | Delete
[972] Fix | Delete
if ( 'category' === $taxonomy ) {
[973] Fix | Delete
/**
[974] Fix | Delete
* Filters the category feed link.
[975] Fix | Delete
*
[976] Fix | Delete
* @since 1.5.1
[977] Fix | Delete
*
[978] Fix | Delete
* @param string $link The category feed link.
[979] Fix | Delete
* @param string $feed Feed type. Possible values include 'rss2', 'atom'.
[980] Fix | Delete
*/
[981] Fix | Delete
$link = apply_filters( 'category_feed_link', $link, $feed );
[982] Fix | Delete
} elseif ( 'post_tag' === $taxonomy ) {
[983] Fix | Delete
/**
[984] Fix | Delete
* Filters the post tag feed link.
[985] Fix | Delete
*
[986] Fix | Delete
* @since 2.3.0
[987] Fix | Delete
*
[988] Fix | Delete
* @param string $link The tag feed link.
[989] Fix | Delete
* @param string $feed Feed type. Possible values include 'rss2', 'atom'.
[990] Fix | Delete
*/
[991] Fix | Delete
$link = apply_filters( 'tag_feed_link', $link, $feed );
[992] Fix | Delete
} else {
[993] Fix | Delete
/**
[994] Fix | Delete
* Filters the feed link for a taxonomy other than 'category' or 'post_tag'.
[995] Fix | Delete
*
[996] Fix | Delete
* @since 3.0.0
[997] Fix | Delete
*
[998] Fix | Delete
* @param string $link The taxonomy feed link.
[999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function