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