: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
$output .= '<img src="' . $row->link_image . '"' . $alt . $title . ' />';
else // If it's a relative path.
$output .= '<img src="' . get_option('siteurl') . $row->link_image . '"' . $alt . $title . ' />';
if ( $show_updated && $row->recently_updated )
$output .= get_option('links_recently_updated_append');
if ( $show_description && '' != $desc )
$output .= $between . $desc;
$output .= $between . get_linkrating($row);
* Output entire list of links by category.
* Output a list of all links, listed by category, using the settings in
* $wpdb->linkcategories and output it as a nested HTML unordered list.
* @deprecated 2.1.0 Use wp_list_bookmarks()
* @see wp_list_bookmarks()
* @param string $order Sort link categories by 'name' or 'id'
function get_links_list($order = 'name') {
_deprecated_function( __FUNCTION__, '2.1.0', 'wp_list_bookmarks()' );
$order = strtolower($order);
// Handle link category sorting.
if ( str_starts_with( $order, '_' ) ) {
$order = substr($order,1);
if ( !isset($direction) )
$cats = get_categories(array('type' => 'link', 'orderby' => $order, 'order' => $direction, 'hierarchical' => 0));
// Display each category.
foreach ( (array) $cats as $cat ) {
// Display the category name.
echo ' <li id="linkcat-' . $cat->term_id . '" class="linkcat"><h2>' . apply_filters('link_category', $cat->name ) . "</h2>\n\t<ul>\n";
// Call get_links() with all the appropriate params.
get_links($cat->term_id, '<li>', "</li>", "\n", true, 'name', false);
// Close the last category.
echo "\n\t</ul>\n</li>\n";
* Show the link to the links popup and the number of links.
* @param string $text the text of the link
* @param int $width the width of the popup window
* @param int $height the height of the popup window
* @param string $file the page to open in the popup window
* @param bool $count the number of links in the db
function links_popup_script($text = 'Links', $width=400, $height=400, $file='links.all.php', $count = true) {
_deprecated_function( __FUNCTION__, '2.1.0' );
* Legacy function that retrieved the value of a link's link_rating field.
* @deprecated 2.1.0 Use sanitize_bookmark_field()
* @see sanitize_bookmark_field()
* @param object $link Link object.
* @return mixed Value of the 'link_rating' field, false otherwise.
function get_linkrating( $link ) {
_deprecated_function( __FUNCTION__, '2.1.0', 'sanitize_bookmark_field()' );
return sanitize_bookmark_field('link_rating', $link->link_rating, $link->link_id, 'display');
* Gets the name of category by ID.
* @deprecated 2.1.0 Use get_category()
* @param int $id The category to get. If no category supplied uses 0
function get_linkcatname($id = 0) {
_deprecated_function( __FUNCTION__, '2.1.0', 'get_category()' );
$cats = wp_get_link_cats($id);
if ( empty($cats) || ! is_array($cats) )
$cat_id = (int) $cats[0]; // Take the first cat.
$cat = get_category($cat_id);
* Print RSS comment feed link.
* @deprecated 2.5.0 Use post_comments_feed_link()
* @see post_comments_feed_link()
* @param string $link_text
function comments_rss_link($link_text = 'Comments RSS') {
_deprecated_function( __FUNCTION__, '2.5.0', 'post_comments_feed_link()' );
post_comments_feed_link($link_text);
* Print/Return link to category RSS2 feed.
* @deprecated 2.5.0 Use get_category_feed_link()
* @see get_category_feed_link()
function get_category_rss_link($display = false, $cat_id = 1) {
_deprecated_function( __FUNCTION__, '2.5.0', 'get_category_feed_link()' );
$link = get_category_feed_link($cat_id, 'rss2');
* Print/Return link to author RSS feed.
* @deprecated 2.5.0 Use get_author_feed_link()
* @see get_author_feed_link()
function get_author_rss_link($display = false, $author_id = 1) {
_deprecated_function( __FUNCTION__, '2.5.0', 'get_author_feed_link()' );
$link = get_author_feed_link($author_id);
* Return link to the post RSS feed.
* @deprecated 2.2.0 Use get_post_comments_feed_link()
* @see get_post_comments_feed_link()
function comments_rss() {
_deprecated_function( __FUNCTION__, '2.2.0', 'get_post_comments_feed_link()' );
return esc_url( get_post_comments_feed_link() );
* An alias of wp_create_user().
* @deprecated 2.0.0 Use wp_create_user()
* @param string $username The user's username.
* @param string $password The user's password.
* @param string $email The user's email.
* @return int The new user's ID.
function create_user($username, $password, $email) {
_deprecated_function( __FUNCTION__, '2.0.0', 'wp_create_user()' );
return wp_create_user($username, $password, $email);
function gzip_compression() {
_deprecated_function( __FUNCTION__, '2.5.0' );
* Retrieve an array of comment data about comment $comment_id.
* @deprecated 2.7.0 Use get_comment()
* @param int $comment_id The ID of the comment
* @param int $no_cache Whether to use the cache (cast to bool)
* @param bool $include_unapproved Whether to include unapproved comments
* @return array The comment data
function get_commentdata( $comment_id, $no_cache = 0, $include_unapproved = false ) {
_deprecated_function( __FUNCTION__, '2.7.0', 'get_comment()' );
return get_comment($comment_id, ARRAY_A);
* Retrieve the category name by the category ID.
* @deprecated 2.8.0 Use get_cat_name()
* @param int $cat_id Category ID
* @return string category name
function get_catname( $cat_id ) {
_deprecated_function( __FUNCTION__, '2.8.0', 'get_cat_name()' );
return get_cat_name( $cat_id );
* Retrieve category children list separated before and after the term IDs.
* @deprecated 2.8.0 Use get_term_children()
* @see get_term_children()
* @param int $id Category ID to retrieve children.
* @param string $before Optional. Prepend before category term ID. Default '/'.
* @param string $after Optional. Append after category term ID. Default empty string.
* @param array $visited Optional. Category Term IDs that have already been added.
function get_category_children( $id, $before = '/', $after = '', $visited = array() ) {
_deprecated_function( __FUNCTION__, '2.8.0', 'get_term_children()' );
/** TODO: Consult hierarchy */
$cat_ids = get_all_category_ids();
foreach ( (array) $cat_ids as $cat_id ) {
$category = get_category( $cat_id );
if ( is_wp_error( $category ) )
if ( $category->parent == $id && !in_array( $category->term_id, $visited ) ) {
$visited[] = $category->term_id;
$chain .= $before.$category->term_id.$after;
$chain .= get_category_children( $category->term_id, $before, $after );
* Retrieves all category IDs.
* @deprecated 4.0.0 Use get_terms()
* @link https://developer.wordpress.org/reference/functions/get_all_category_ids/
* @return int[] List of all of the category IDs.
function get_all_category_ids() {
_deprecated_function( __FUNCTION__, '4.0.0', 'get_terms()' );
'taxonomy' => 'category',
* Retrieve the description of the author of the current post.
* @deprecated 2.8.0 Use get_the_author_meta()
* @see get_the_author_meta()
* @return string The author's description.
function get_the_author_description() {
_deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta(\'description\')' );
return get_the_author_meta('description');
* Display the description of the author of the current post.
* @deprecated 2.8.0 Use the_author_meta()
function the_author_description() {
_deprecated_function( __FUNCTION__, '2.8.0', 'the_author_meta(\'description\')' );
the_author_meta('description');
* Retrieve the login name of the author of the current post.
* @deprecated 2.8.0 Use get_the_author_meta()
* @see get_the_author_meta()
* @return string The author's login name (username).
function get_the_author_login() {
_deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta(\'login\')' );
return get_the_author_meta('login');
* Display the login name of the author of the current post.
* @deprecated 2.8.0 Use the_author_meta()
function the_author_login() {
_deprecated_function( __FUNCTION__, '2.8.0', 'the_author_meta(\'login\')' );
the_author_meta('login');
* Retrieve the first name of the author of the current post.
* @deprecated 2.8.0 Use get_the_author_meta()
* @see get_the_author_meta()
* @return string The author's first name.
function get_the_author_firstname() {
_deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta(\'first_name\')' );
return get_the_author_meta('first_name');
* Display the first name of the author of the current post.
* @deprecated 2.8.0 Use the_author_meta()
function the_author_firstname() {
_deprecated_function( __FUNCTION__, '2.8.0', 'the_author_meta(\'first_name\')' );
the_author_meta('first_name');
* Retrieve the last name of the author of the current post.
* @deprecated 2.8.0 Use get_the_author_meta()
* @see get_the_author_meta()
* @return string The author's last name.
function get_the_author_lastname() {
_deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta(\'last_name\')' );
return get_the_author_meta('last_name');
* Display the last name of the author of the current post.
* @deprecated 2.8.0 Use the_author_meta()
function the_author_lastname() {
_deprecated_function( __FUNCTION__, '2.8.0', 'the_author_meta(\'last_name\')' );
the_author_meta('last_name');
* Retrieve the nickname of the author of the current post.
* @deprecated 2.8.0 Use get_the_author_meta()
* @see get_the_author_meta()
* @return string The author's nickname.
function get_the_author_nickname() {
_deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta(\'nickname\')' );
return get_the_author_meta('nickname');
* Display the nickname of the author of the current post.
* @deprecated 2.8.0 Use the_author_meta()
function the_author_nickname() {
_deprecated_function( __FUNCTION__, '2.8.0', 'the_author_meta(\'nickname\')' );
the_author_meta('nickname');
* Retrieve the email of the author of the current post.
* @deprecated 2.8.0 Use get_the_author_meta()
* @see get_the_author_meta()
* @return string The author's username.
function get_the_author_email() {
_deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta(\'email\')' );
return get_the_author_meta('email');
* Display the email of the author of the current post.
* @deprecated 2.8.0 Use the_author_meta()
function the_author_email() {
_deprecated_function( __FUNCTION__, '2.8.0', 'the_author_meta(\'email\')' );
the_author_meta('email');
* Retrieve the ICQ number of the author of the current post.
* @deprecated 2.8.0 Use get_the_author_meta()
* @see get_the_author_meta()
* @return string The author's ICQ number.
function get_the_author_icq() {
_deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta(\'icq\')' );
return get_the_author_meta('icq');
* Display the ICQ number of the author of the current post.
* @deprecated 2.8.0 Use the_author_meta()