Edit File by line
/home/zeestwma/richards.../wp-inclu...
File: deprecated.php
* - link_rating
[500] Fix | Delete
* - link_updated
[501] Fix | Delete
* - link_rel
[502] Fix | Delete
* - link_notes
[503] Fix | Delete
*
[504] Fix | Delete
* @since 1.0.1
[505] Fix | Delete
* @deprecated 2.1.0 Use get_bookmarks()
[506] Fix | Delete
* @see get_bookmarks()
[507] Fix | Delete
*
[508] Fix | Delete
* @param int $category Optional. The category to use. If no category supplied, uses all.
[509] Fix | Delete
* Default 0.
[510] Fix | Delete
* @param string $orderby Optional. The order to output the links. E.g. 'id', 'name', 'url',
[511] Fix | Delete
* 'description', 'rating', or 'owner'. Default 'name'.
[512] Fix | Delete
* If you start the name with an underscore, the order will be reversed.
[513] Fix | Delete
* Specifying 'rand' as the order will return links in a random order.
[514] Fix | Delete
* @param int $limit Optional. Limit to X entries. If not specified, all entries are shown.
[515] Fix | Delete
* Default 0.
[516] Fix | Delete
* @return array
[517] Fix | Delete
*/
[518] Fix | Delete
function get_linkobjects($category = 0, $orderby = 'name', $limit = 0) {
[519] Fix | Delete
_deprecated_function( __FUNCTION__, '2.1.0', 'get_bookmarks()' );
[520] Fix | Delete
[521] Fix | Delete
$links = get_bookmarks( array( 'category' => $category, 'orderby' => $orderby, 'limit' => $limit ) ) ;
[522] Fix | Delete
[523] Fix | Delete
$links_array = array();
[524] Fix | Delete
foreach ($links as $link)
[525] Fix | Delete
$links_array[] = $link;
[526] Fix | Delete
[527] Fix | Delete
return $links_array;
[528] Fix | Delete
}
[529] Fix | Delete
[530] Fix | Delete
/**
[531] Fix | Delete
* Gets the links associated with category 'cat_name' and display rating stars/chars.
[532] Fix | Delete
*
[533] Fix | Delete
* @since 0.71
[534] Fix | Delete
* @deprecated 2.1.0 Use get_bookmarks()
[535] Fix | Delete
* @see get_bookmarks()
[536] Fix | Delete
*
[537] Fix | Delete
* @param string $cat_name Optional. The category name to use. If no match is found, uses all.
[538] Fix | Delete
* Default 'noname'.
[539] Fix | Delete
* @param string $before Optional. The HTML to output before the link. Default empty.
[540] Fix | Delete
* @param string $after Optional. The HTML to output after the link. Default '<br />'.
[541] Fix | Delete
* @param string $between Optional. The HTML to output between the link/image and its description.
[542] Fix | Delete
* Not used if no image or $show_images is true. Default ' '.
[543] Fix | Delete
* @param bool $show_images Optional. Whether to show images (if defined). Default true.
[544] Fix | Delete
* @param string $orderby Optional. The order to output the links. E.g. 'id', 'name', 'url',
[545] Fix | Delete
* 'description', 'rating', or 'owner'. Default 'id'.
[546] Fix | Delete
* If you start the name with an underscore, the order will be reversed.
[547] Fix | Delete
* Specifying 'rand' as the order will return links in a random order.
[548] Fix | Delete
* @param bool $show_description Optional. Whether to show the description if show_images=false/not defined.
[549] Fix | Delete
* Default true.
[550] Fix | Delete
* @param int $limit Optional. Limit to X entries. If not specified, all entries are shown.
[551] Fix | Delete
* Default -1.
[552] Fix | Delete
* @param int $show_updated Optional. Whether to show last updated timestamp. Default 0.
[553] Fix | Delete
*/
[554] Fix | Delete
function get_linksbyname_withrating($cat_name = "noname", $before = '', $after = '<br />', $between = " ",
[555] Fix | Delete
$show_images = true, $orderby = 'id', $show_description = true, $limit = -1, $show_updated = 0) {
[556] Fix | Delete
_deprecated_function( __FUNCTION__, '2.1.0', 'get_bookmarks()' );
[557] Fix | Delete
[558] Fix | Delete
get_linksbyname($cat_name, $before, $after, $between, $show_images, $orderby, $show_description, true, $limit, $show_updated);
[559] Fix | Delete
}
[560] Fix | Delete
[561] Fix | Delete
/**
[562] Fix | Delete
* Gets the links associated with category n and display rating stars/chars.
[563] Fix | Delete
*
[564] Fix | Delete
* @since 0.71
[565] Fix | Delete
* @deprecated 2.1.0 Use get_bookmarks()
[566] Fix | Delete
* @see get_bookmarks()
[567] Fix | Delete
*
[568] Fix | Delete
* @param int $category Optional. The category to use. If no category supplied, uses all.
[569] Fix | Delete
* Default 0.
[570] Fix | Delete
* @param string $before Optional. The HTML to output before the link. Default empty.
[571] Fix | Delete
* @param string $after Optional. The HTML to output after the link. Default '<br />'.
[572] Fix | Delete
* @param string $between Optional. The HTML to output between the link/image and its description.
[573] Fix | Delete
* Not used if no image or $show_images is true. Default ' '.
[574] Fix | Delete
* @param bool $show_images Optional. Whether to show images (if defined). Default true.
[575] Fix | Delete
* @param string $orderby Optional. The order to output the links. E.g. 'id', 'name', 'url',
[576] Fix | Delete
* 'description', 'rating', or 'owner'. Default 'id'.
[577] Fix | Delete
* If you start the name with an underscore, the order will be reversed.
[578] Fix | Delete
* Specifying 'rand' as the order will return links in a random order.
[579] Fix | Delete
* @param bool $show_description Optional. Whether to show the description if show_images=false/not defined.
[580] Fix | Delete
* Default true.
[581] Fix | Delete
* @param int $limit Optional. Limit to X entries. If not specified, all entries are shown.
[582] Fix | Delete
* Default -1.
[583] Fix | Delete
* @param int $show_updated Optional. Whether to show last updated timestamp. Default 0.
[584] Fix | Delete
*/
[585] Fix | Delete
function get_links_withrating($category = -1, $before = '', $after = '<br />', $between = " ", $show_images = true,
[586] Fix | Delete
$orderby = 'id', $show_description = true, $limit = -1, $show_updated = 0) {
[587] Fix | Delete
_deprecated_function( __FUNCTION__, '2.1.0', 'get_bookmarks()' );
[588] Fix | Delete
[589] Fix | Delete
get_links($category, $before, $after, $between, $show_images, $orderby, $show_description, true, $limit, $show_updated);
[590] Fix | Delete
}
[591] Fix | Delete
[592] Fix | Delete
/**
[593] Fix | Delete
* Gets the auto_toggle setting.
[594] Fix | Delete
*
[595] Fix | Delete
* @since 0.71
[596] Fix | Delete
* @deprecated 2.1.0
[597] Fix | Delete
*
[598] Fix | Delete
* @param int $id The category to get. If no category supplied uses 0
[599] Fix | Delete
* @return int Only returns 0.
[600] Fix | Delete
*/
[601] Fix | Delete
function get_autotoggle($id = 0) {
[602] Fix | Delete
_deprecated_function( __FUNCTION__, '2.1.0' );
[603] Fix | Delete
return 0;
[604] Fix | Delete
}
[605] Fix | Delete
[606] Fix | Delete
/**
[607] Fix | Delete
* Lists categories.
[608] Fix | Delete
*
[609] Fix | Delete
* @since 0.71
[610] Fix | Delete
* @deprecated 2.1.0 Use wp_list_categories()
[611] Fix | Delete
* @see wp_list_categories()
[612] Fix | Delete
*
[613] Fix | Delete
* @param int $optionall
[614] Fix | Delete
* @param string $all
[615] Fix | Delete
* @param string $sort_column
[616] Fix | Delete
* @param string $sort_order
[617] Fix | Delete
* @param string $file
[618] Fix | Delete
* @param bool $list
[619] Fix | Delete
* @param int $optiondates
[620] Fix | Delete
* @param int $optioncount
[621] Fix | Delete
* @param int $hide_empty
[622] Fix | Delete
* @param int $use_desc_for_title
[623] Fix | Delete
* @param bool $children
[624] Fix | Delete
* @param int $child_of
[625] Fix | Delete
* @param int $categories
[626] Fix | Delete
* @param int $recurse
[627] Fix | Delete
* @param string $feed
[628] Fix | Delete
* @param string $feed_image
[629] Fix | Delete
* @param string $exclude
[630] Fix | Delete
* @param bool $hierarchical
[631] Fix | Delete
* @return null|false
[632] Fix | Delete
*/
[633] Fix | Delete
function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_order = 'asc', $file = '', $list = true, $optiondates = 0,
[634] Fix | Delete
$optioncount = 0, $hide_empty = 1, $use_desc_for_title = 1, $children=false, $child_of=0, $categories=0,
[635] Fix | Delete
$recurse=0, $feed = '', $feed_image = '', $exclude = '', $hierarchical=false) {
[636] Fix | Delete
_deprecated_function( __FUNCTION__, '2.1.0', 'wp_list_categories()' );
[637] Fix | Delete
[638] Fix | Delete
$query = compact('optionall', 'all', 'sort_column', 'sort_order', 'file', 'list', 'optiondates', 'optioncount', 'hide_empty', 'use_desc_for_title', 'children',
[639] Fix | Delete
'child_of', 'categories', 'recurse', 'feed', 'feed_image', 'exclude', 'hierarchical');
[640] Fix | Delete
return wp_list_cats($query);
[641] Fix | Delete
}
[642] Fix | Delete
[643] Fix | Delete
/**
[644] Fix | Delete
* Lists categories.
[645] Fix | Delete
*
[646] Fix | Delete
* @since 1.2.0
[647] Fix | Delete
* @deprecated 2.1.0 Use wp_list_categories()
[648] Fix | Delete
* @see wp_list_categories()
[649] Fix | Delete
*
[650] Fix | Delete
* @param string|array $args
[651] Fix | Delete
* @return null|string|false
[652] Fix | Delete
*/
[653] Fix | Delete
function wp_list_cats($args = '') {
[654] Fix | Delete
_deprecated_function( __FUNCTION__, '2.1.0', 'wp_list_categories()' );
[655] Fix | Delete
[656] Fix | Delete
$parsed_args = wp_parse_args( $args );
[657] Fix | Delete
[658] Fix | Delete
// Map to new names.
[659] Fix | Delete
if ( isset($parsed_args['optionall']) && isset($parsed_args['all']))
[660] Fix | Delete
$parsed_args['show_option_all'] = $parsed_args['all'];
[661] Fix | Delete
if ( isset($parsed_args['sort_column']) )
[662] Fix | Delete
$parsed_args['orderby'] = $parsed_args['sort_column'];
[663] Fix | Delete
if ( isset($parsed_args['sort_order']) )
[664] Fix | Delete
$parsed_args['order'] = $parsed_args['sort_order'];
[665] Fix | Delete
if ( isset($parsed_args['optiondates']) )
[666] Fix | Delete
$parsed_args['show_last_update'] = $parsed_args['optiondates'];
[667] Fix | Delete
if ( isset($parsed_args['optioncount']) )
[668] Fix | Delete
$parsed_args['show_count'] = $parsed_args['optioncount'];
[669] Fix | Delete
if ( isset($parsed_args['list']) )
[670] Fix | Delete
$parsed_args['style'] = $parsed_args['list'] ? 'list' : 'break';
[671] Fix | Delete
$parsed_args['title_li'] = '';
[672] Fix | Delete
[673] Fix | Delete
return wp_list_categories($parsed_args);
[674] Fix | Delete
}
[675] Fix | Delete
[676] Fix | Delete
/**
[677] Fix | Delete
* Deprecated method for generating a drop-down of categories.
[678] Fix | Delete
*
[679] Fix | Delete
* @since 0.71
[680] Fix | Delete
* @deprecated 2.1.0 Use wp_dropdown_categories()
[681] Fix | Delete
* @see wp_dropdown_categories()
[682] Fix | Delete
*
[683] Fix | Delete
* @param int $optionall
[684] Fix | Delete
* @param string $all
[685] Fix | Delete
* @param string $orderby
[686] Fix | Delete
* @param string $order
[687] Fix | Delete
* @param int $show_last_update
[688] Fix | Delete
* @param int $show_count
[689] Fix | Delete
* @param int $hide_empty
[690] Fix | Delete
* @param bool $optionnone
[691] Fix | Delete
* @param int $selected
[692] Fix | Delete
* @param int $exclude
[693] Fix | Delete
* @return string
[694] Fix | Delete
*/
[695] Fix | Delete
function dropdown_cats($optionall = 1, $all = 'All', $orderby = 'ID', $order = 'asc',
[696] Fix | Delete
$show_last_update = 0, $show_count = 0, $hide_empty = 1, $optionnone = false,
[697] Fix | Delete
$selected = 0, $exclude = 0) {
[698] Fix | Delete
_deprecated_function( __FUNCTION__, '2.1.0', 'wp_dropdown_categories()' );
[699] Fix | Delete
[700] Fix | Delete
$show_option_all = '';
[701] Fix | Delete
if ( $optionall )
[702] Fix | Delete
$show_option_all = $all;
[703] Fix | Delete
[704] Fix | Delete
$show_option_none = '';
[705] Fix | Delete
if ( $optionnone )
[706] Fix | Delete
$show_option_none = _x( 'None', 'Categories dropdown (show_option_none parameter)' );
[707] Fix | Delete
[708] Fix | Delete
$vars = compact('show_option_all', 'show_option_none', 'orderby', 'order',
[709] Fix | Delete
'show_last_update', 'show_count', 'hide_empty', 'selected', 'exclude');
[710] Fix | Delete
$query = add_query_arg($vars, '');
[711] Fix | Delete
return wp_dropdown_categories($query);
[712] Fix | Delete
}
[713] Fix | Delete
[714] Fix | Delete
/**
[715] Fix | Delete
* Lists authors.
[716] Fix | Delete
*
[717] Fix | Delete
* @since 1.2.0
[718] Fix | Delete
* @deprecated 2.1.0 Use wp_list_authors()
[719] Fix | Delete
* @see wp_list_authors()
[720] Fix | Delete
*
[721] Fix | Delete
* @param bool $optioncount
[722] Fix | Delete
* @param bool $exclude_admin
[723] Fix | Delete
* @param bool $show_fullname
[724] Fix | Delete
* @param bool $hide_empty
[725] Fix | Delete
* @param string $feed
[726] Fix | Delete
* @param string $feed_image
[727] Fix | Delete
* @return null|string
[728] Fix | Delete
*/
[729] Fix | Delete
function list_authors($optioncount = false, $exclude_admin = true, $show_fullname = false, $hide_empty = true, $feed = '', $feed_image = '') {
[730] Fix | Delete
_deprecated_function( __FUNCTION__, '2.1.0', 'wp_list_authors()' );
[731] Fix | Delete
[732] Fix | Delete
$args = compact('optioncount', 'exclude_admin', 'show_fullname', 'hide_empty', 'feed', 'feed_image');
[733] Fix | Delete
return wp_list_authors($args);
[734] Fix | Delete
}
[735] Fix | Delete
[736] Fix | Delete
/**
[737] Fix | Delete
* Retrieves a list of post categories.
[738] Fix | Delete
*
[739] Fix | Delete
* @since 1.0.1
[740] Fix | Delete
* @deprecated 2.1.0 Use wp_get_post_categories()
[741] Fix | Delete
* @see wp_get_post_categories()
[742] Fix | Delete
*
[743] Fix | Delete
* @param int $blogid Not Used
[744] Fix | Delete
* @param int $post_id
[745] Fix | Delete
* @return array
[746] Fix | Delete
*/
[747] Fix | Delete
function wp_get_post_cats($blogid = '1', $post_id = 0) {
[748] Fix | Delete
_deprecated_function( __FUNCTION__, '2.1.0', 'wp_get_post_categories()' );
[749] Fix | Delete
return wp_get_post_categories($post_id);
[750] Fix | Delete
}
[751] Fix | Delete
[752] Fix | Delete
/**
[753] Fix | Delete
* Sets the categories that the post ID belongs to.
[754] Fix | Delete
*
[755] Fix | Delete
* @since 1.0.1
[756] Fix | Delete
* @deprecated 2.1.0
[757] Fix | Delete
* @deprecated Use wp_set_post_categories()
[758] Fix | Delete
* @see wp_set_post_categories()
[759] Fix | Delete
*
[760] Fix | Delete
* @param int $blogid Not used
[761] Fix | Delete
* @param int $post_id
[762] Fix | Delete
* @param array $post_categories
[763] Fix | Delete
* @return bool|mixed
[764] Fix | Delete
*/
[765] Fix | Delete
function wp_set_post_cats($blogid = '1', $post_id = 0, $post_categories = array()) {
[766] Fix | Delete
_deprecated_function( __FUNCTION__, '2.1.0', 'wp_set_post_categories()' );
[767] Fix | Delete
return wp_set_post_categories($post_id, $post_categories);
[768] Fix | Delete
}
[769] Fix | Delete
[770] Fix | Delete
/**
[771] Fix | Delete
* Retrieves a list of archives.
[772] Fix | Delete
*
[773] Fix | Delete
* @since 0.71
[774] Fix | Delete
* @deprecated 2.1.0 Use wp_get_archives()
[775] Fix | Delete
* @see wp_get_archives()
[776] Fix | Delete
*
[777] Fix | Delete
* @param string $type
[778] Fix | Delete
* @param string $limit
[779] Fix | Delete
* @param string $format
[780] Fix | Delete
* @param string $before
[781] Fix | Delete
* @param string $after
[782] Fix | Delete
* @param bool $show_post_count
[783] Fix | Delete
* @return string|null
[784] Fix | Delete
*/
[785] Fix | Delete
function get_archives($type='', $limit='', $format='html', $before = '', $after = '', $show_post_count = false) {
[786] Fix | Delete
_deprecated_function( __FUNCTION__, '2.1.0', 'wp_get_archives()' );
[787] Fix | Delete
$args = compact('type', 'limit', 'format', 'before', 'after', 'show_post_count');
[788] Fix | Delete
return wp_get_archives($args);
[789] Fix | Delete
}
[790] Fix | Delete
[791] Fix | Delete
/**
[792] Fix | Delete
* Returns or Prints link to the author's posts.
[793] Fix | Delete
*
[794] Fix | Delete
* @since 1.2.0
[795] Fix | Delete
* @deprecated 2.1.0 Use get_author_posts_url()
[796] Fix | Delete
* @see get_author_posts_url()
[797] Fix | Delete
*
[798] Fix | Delete
* @param bool $display
[799] Fix | Delete
* @param int $author_id
[800] Fix | Delete
* @param string $author_nicename Optional.
[801] Fix | Delete
* @return string|null
[802] Fix | Delete
*/
[803] Fix | Delete
function get_author_link($display, $author_id, $author_nicename = '') {
[804] Fix | Delete
_deprecated_function( __FUNCTION__, '2.1.0', 'get_author_posts_url()' );
[805] Fix | Delete
[806] Fix | Delete
$link = get_author_posts_url($author_id, $author_nicename);
[807] Fix | Delete
[808] Fix | Delete
if ( $display )
[809] Fix | Delete
echo $link;
[810] Fix | Delete
return $link;
[811] Fix | Delete
}
[812] Fix | Delete
[813] Fix | Delete
/**
[814] Fix | Delete
* Print list of pages based on arguments.
[815] Fix | Delete
*
[816] Fix | Delete
* @since 0.71
[817] Fix | Delete
* @deprecated 2.1.0 Use wp_link_pages()
[818] Fix | Delete
* @see wp_link_pages()
[819] Fix | Delete
*
[820] Fix | Delete
* @param string $before
[821] Fix | Delete
* @param string $after
[822] Fix | Delete
* @param string $next_or_number
[823] Fix | Delete
* @param string $nextpagelink
[824] Fix | Delete
* @param string $previouspagelink
[825] Fix | Delete
* @param string $pagelink
[826] Fix | Delete
* @param string $more_file
[827] Fix | Delete
* @return string
[828] Fix | Delete
*/
[829] Fix | Delete
function link_pages($before='<br />', $after='<br />', $next_or_number='number', $nextpagelink='next page', $previouspagelink='previous page',
[830] Fix | Delete
$pagelink='%', $more_file='') {
[831] Fix | Delete
_deprecated_function( __FUNCTION__, '2.1.0', 'wp_link_pages()' );
[832] Fix | Delete
[833] Fix | Delete
$args = compact('before', 'after', 'next_or_number', 'nextpagelink', 'previouspagelink', 'pagelink', 'more_file');
[834] Fix | Delete
return wp_link_pages($args);
[835] Fix | Delete
}
[836] Fix | Delete
[837] Fix | Delete
/**
[838] Fix | Delete
* Get value based on option.
[839] Fix | Delete
*
[840] Fix | Delete
* @since 0.71
[841] Fix | Delete
* @deprecated 2.1.0 Use get_option()
[842] Fix | Delete
* @see get_option()
[843] Fix | Delete
*
[844] Fix | Delete
* @param string $option
[845] Fix | Delete
* @return string
[846] Fix | Delete
*/
[847] Fix | Delete
function get_settings($option) {
[848] Fix | Delete
_deprecated_function( __FUNCTION__, '2.1.0', 'get_option()' );
[849] Fix | Delete
[850] Fix | Delete
return get_option($option);
[851] Fix | Delete
}
[852] Fix | Delete
[853] Fix | Delete
/**
[854] Fix | Delete
* Print the permalink of the current post in the loop.
[855] Fix | Delete
*
[856] Fix | Delete
* @since 0.71
[857] Fix | Delete
* @deprecated 1.2.0 Use the_permalink()
[858] Fix | Delete
* @see the_permalink()
[859] Fix | Delete
*/
[860] Fix | Delete
function permalink_link() {
[861] Fix | Delete
_deprecated_function( __FUNCTION__, '1.2.0', 'the_permalink()' );
[862] Fix | Delete
the_permalink();
[863] Fix | Delete
}
[864] Fix | Delete
[865] Fix | Delete
/**
[866] Fix | Delete
* Print the permalink to the RSS feed.
[867] Fix | Delete
*
[868] Fix | Delete
* @since 0.71
[869] Fix | Delete
* @deprecated 2.3.0 Use the_permalink_rss()
[870] Fix | Delete
* @see the_permalink_rss()
[871] Fix | Delete
*
[872] Fix | Delete
* @param string $deprecated
[873] Fix | Delete
*/
[874] Fix | Delete
function permalink_single_rss($deprecated = '') {
[875] Fix | Delete
_deprecated_function( __FUNCTION__, '2.3.0', 'the_permalink_rss()' );
[876] Fix | Delete
the_permalink_rss();
[877] Fix | Delete
}
[878] Fix | Delete
[879] Fix | Delete
/**
[880] Fix | Delete
* Gets the links associated with category.
[881] Fix | Delete
*
[882] Fix | Delete
* @since 1.0.1
[883] Fix | Delete
* @deprecated 2.1.0 Use wp_list_bookmarks()
[884] Fix | Delete
* @see wp_list_bookmarks()
[885] Fix | Delete
*
[886] Fix | Delete
* @param string $args a query string
[887] Fix | Delete
* @return null|string
[888] Fix | Delete
*/
[889] Fix | Delete
function wp_get_links($args = '') {
[890] Fix | Delete
_deprecated_function( __FUNCTION__, '2.1.0', 'wp_list_bookmarks()' );
[891] Fix | Delete
[892] Fix | Delete
if ( ! str_contains( $args, '=' ) ) {
[893] Fix | Delete
$cat_id = $args;
[894] Fix | Delete
$args = add_query_arg( 'category', $cat_id, $args );
[895] Fix | Delete
}
[896] Fix | Delete
[897] Fix | Delete
$defaults = array(
[898] Fix | Delete
'after' => '<br />',
[899] Fix | Delete
'before' => '',
[900] Fix | Delete
'between' => ' ',
[901] Fix | Delete
'categorize' => 0,
[902] Fix | Delete
'category' => '',
[903] Fix | Delete
'echo' => true,
[904] Fix | Delete
'limit' => -1,
[905] Fix | Delete
'orderby' => 'name',
[906] Fix | Delete
'show_description' => true,
[907] Fix | Delete
'show_images' => true,
[908] Fix | Delete
'show_rating' => false,
[909] Fix | Delete
'show_updated' => true,
[910] Fix | Delete
'title_li' => '',
[911] Fix | Delete
);
[912] Fix | Delete
[913] Fix | Delete
$parsed_args = wp_parse_args( $args, $defaults );
[914] Fix | Delete
[915] Fix | Delete
return wp_list_bookmarks($parsed_args);
[916] Fix | Delete
}
[917] Fix | Delete
[918] Fix | Delete
/**
[919] Fix | Delete
* Gets the links associated with category by ID.
[920] Fix | Delete
*
[921] Fix | Delete
* @since 0.71
[922] Fix | Delete
* @deprecated 2.1.0 Use get_bookmarks()
[923] Fix | Delete
* @see get_bookmarks()
[924] Fix | Delete
*
[925] Fix | Delete
* @param int $category Optional. The category to use. If no category supplied uses all.
[926] Fix | Delete
* Default 0.
[927] Fix | Delete
* @param string $before Optional. The HTML to output before the link. Default empty.
[928] Fix | Delete
* @param string $after Optional. The HTML to output after the link. Default '<br />'.
[929] Fix | Delete
* @param string $between Optional. The HTML to output between the link/image and its description.
[930] Fix | Delete
* Not used if no image or $show_images is true. Default ' '.
[931] Fix | Delete
* @param bool $show_images Optional. Whether to show images (if defined). Default true.
[932] Fix | Delete
* @param string $orderby Optional. The order to output the links. E.g. 'id', 'name', 'url',
[933] Fix | Delete
* 'description', 'rating', or 'owner'. Default 'name'.
[934] Fix | Delete
* If you start the name with an underscore, the order will be reversed.
[935] Fix | Delete
* Specifying 'rand' as the order will return links in a random order.
[936] Fix | Delete
* @param bool $show_description Optional. Whether to show the description if show_images=false/not defined.
[937] Fix | Delete
* Default true.
[938] Fix | Delete
* @param bool $show_rating Optional. Show rating stars/chars. Default false.
[939] Fix | Delete
* @param int $limit Optional. Limit to X entries. If not specified, all entries are shown.
[940] Fix | Delete
* Default -1.
[941] Fix | Delete
* @param int $show_updated Optional. Whether to show last updated timestamp. Default 1.
[942] Fix | Delete
* @param bool $display Whether to display the results, or return them instead.
[943] Fix | Delete
* @return null|string
[944] Fix | Delete
*/
[945] Fix | Delete
function get_links($category = -1, $before = '', $after = '<br />', $between = ' ', $show_images = true, $orderby = 'name',
[946] Fix | Delete
$show_description = true, $show_rating = false, $limit = -1, $show_updated = 1, $display = true) {
[947] Fix | Delete
_deprecated_function( __FUNCTION__, '2.1.0', 'get_bookmarks()' );
[948] Fix | Delete
[949] Fix | Delete
$order = 'ASC';
[950] Fix | Delete
if ( str_starts_with($orderby, '_') ) {
[951] Fix | Delete
$order = 'DESC';
[952] Fix | Delete
$orderby = substr($orderby, 1);
[953] Fix | Delete
}
[954] Fix | Delete
[955] Fix | Delete
if ( $category == -1 ) // get_bookmarks() uses '' to signify all categories.
[956] Fix | Delete
$category = '';
[957] Fix | Delete
[958] Fix | Delete
$results = get_bookmarks(array('category' => $category, 'orderby' => $orderby, 'order' => $order, 'show_updated' => $show_updated, 'limit' => $limit));
[959] Fix | Delete
[960] Fix | Delete
if ( !$results )
[961] Fix | Delete
return;
[962] Fix | Delete
[963] Fix | Delete
$output = '';
[964] Fix | Delete
[965] Fix | Delete
foreach ( (array) $results as $row ) {
[966] Fix | Delete
if ( !isset($row->recently_updated) )
[967] Fix | Delete
$row->recently_updated = false;
[968] Fix | Delete
$output .= $before;
[969] Fix | Delete
if ( $show_updated && $row->recently_updated )
[970] Fix | Delete
$output .= get_option('links_recently_updated_prepend');
[971] Fix | Delete
$the_link = '#';
[972] Fix | Delete
if ( !empty($row->link_url) )
[973] Fix | Delete
$the_link = esc_url($row->link_url);
[974] Fix | Delete
$rel = $row->link_rel;
[975] Fix | Delete
if ( '' != $rel )
[976] Fix | Delete
$rel = ' rel="' . $rel . '"';
[977] Fix | Delete
[978] Fix | Delete
$desc = esc_attr(sanitize_bookmark_field('link_description', $row->link_description, $row->link_id, 'display'));
[979] Fix | Delete
$name = esc_attr(sanitize_bookmark_field('link_name', $row->link_name, $row->link_id, 'display'));
[980] Fix | Delete
$title = $desc;
[981] Fix | Delete
[982] Fix | Delete
if ( $show_updated )
[983] Fix | Delete
if ( !str_starts_with($row->link_updated_f, '00') )
[984] Fix | Delete
$title .= ' ('.__('Last updated') . ' ' . gmdate(get_option('links_updated_date_format'), $row->link_updated_f + (get_option('gmt_offset') * HOUR_IN_SECONDS)) . ')';
[985] Fix | Delete
[986] Fix | Delete
if ( '' != $title )
[987] Fix | Delete
$title = ' title="' . $title . '"';
[988] Fix | Delete
[989] Fix | Delete
$alt = ' alt="' . $name . '"';
[990] Fix | Delete
[991] Fix | Delete
$target = $row->link_target;
[992] Fix | Delete
if ( '' != $target )
[993] Fix | Delete
$target = ' target="' . $target . '"';
[994] Fix | Delete
[995] Fix | Delete
$output .= '<a href="' . $the_link . '"' . $rel . $title . $target. '>';
[996] Fix | Delete
[997] Fix | Delete
if ( '' != $row->link_image && $show_images ) {
[998] Fix | Delete
if ( str_contains( $row->link_image, 'http' ) )
[999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function