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/clone/wp-inclu...
File: general-template.php
if ( $display ) {
[1500] Fix | Delete
echo $prefix . $title;
[1501] Fix | Delete
} else {
[1502] Fix | Delete
return $prefix . $title;
[1503] Fix | Delete
}
[1504] Fix | Delete
}
[1505] Fix | Delete
[1506] Fix | Delete
/**
[1507] Fix | Delete
* Displays or retrieves title for a post type archive.
[1508] Fix | Delete
*
[1509] Fix | Delete
* This is optimized for archive.php and archive-{$post_type}.php template files
[1510] Fix | Delete
* for displaying the title of the post type.
[1511] Fix | Delete
*
[1512] Fix | Delete
* @since 3.1.0
[1513] Fix | Delete
*
[1514] Fix | Delete
* @param string $prefix Optional. What to display before the title.
[1515] Fix | Delete
* @param bool $display Optional. Whether to display or retrieve title. Default true.
[1516] Fix | Delete
* @return string|void Title when retrieving, null when displaying or failure.
[1517] Fix | Delete
*/
[1518] Fix | Delete
function post_type_archive_title( $prefix = '', $display = true ) {
[1519] Fix | Delete
if ( ! is_post_type_archive() ) {
[1520] Fix | Delete
return;
[1521] Fix | Delete
}
[1522] Fix | Delete
[1523] Fix | Delete
$post_type = get_query_var( 'post_type' );
[1524] Fix | Delete
if ( is_array( $post_type ) ) {
[1525] Fix | Delete
$post_type = reset( $post_type );
[1526] Fix | Delete
}
[1527] Fix | Delete
[1528] Fix | Delete
$post_type_obj = get_post_type_object( $post_type );
[1529] Fix | Delete
[1530] Fix | Delete
/**
[1531] Fix | Delete
* Filters the post type archive title.
[1532] Fix | Delete
*
[1533] Fix | Delete
* @since 3.1.0
[1534] Fix | Delete
*
[1535] Fix | Delete
* @param string $post_type_name Post type 'name' label.
[1536] Fix | Delete
* @param string $post_type Post type.
[1537] Fix | Delete
*/
[1538] Fix | Delete
$title = apply_filters( 'post_type_archive_title', $post_type_obj->labels->name, $post_type );
[1539] Fix | Delete
[1540] Fix | Delete
if ( $display ) {
[1541] Fix | Delete
echo $prefix . $title;
[1542] Fix | Delete
} else {
[1543] Fix | Delete
return $prefix . $title;
[1544] Fix | Delete
}
[1545] Fix | Delete
}
[1546] Fix | Delete
[1547] Fix | Delete
/**
[1548] Fix | Delete
* Displays or retrieves page title for category archive.
[1549] Fix | Delete
*
[1550] Fix | Delete
* Useful for category template files for displaying the category page title.
[1551] Fix | Delete
* The prefix does not automatically place a space between the prefix, so if
[1552] Fix | Delete
* there should be a space, the parameter value will need to have it at the end.
[1553] Fix | Delete
*
[1554] Fix | Delete
* @since 0.71
[1555] Fix | Delete
*
[1556] Fix | Delete
* @param string $prefix Optional. What to display before the title.
[1557] Fix | Delete
* @param bool $display Optional. Whether to display or retrieve title. Default true.
[1558] Fix | Delete
* @return string|void Title when retrieving.
[1559] Fix | Delete
*/
[1560] Fix | Delete
function single_cat_title( $prefix = '', $display = true ) {
[1561] Fix | Delete
return single_term_title( $prefix, $display );
[1562] Fix | Delete
}
[1563] Fix | Delete
[1564] Fix | Delete
/**
[1565] Fix | Delete
* Displays or retrieves page title for tag post archive.
[1566] Fix | Delete
*
[1567] Fix | Delete
* Useful for tag template files for displaying the tag page title. The prefix
[1568] Fix | Delete
* does not automatically place a space between the prefix, so if there should
[1569] Fix | Delete
* be a space, the parameter value will need to have it at the end.
[1570] Fix | Delete
*
[1571] Fix | Delete
* @since 2.3.0
[1572] Fix | Delete
*
[1573] Fix | Delete
* @param string $prefix Optional. What to display before the title.
[1574] Fix | Delete
* @param bool $display Optional. Whether to display or retrieve title. Default true.
[1575] Fix | Delete
* @return string|void Title when retrieving.
[1576] Fix | Delete
*/
[1577] Fix | Delete
function single_tag_title( $prefix = '', $display = true ) {
[1578] Fix | Delete
return single_term_title( $prefix, $display );
[1579] Fix | Delete
}
[1580] Fix | Delete
[1581] Fix | Delete
/**
[1582] Fix | Delete
* Displays or retrieves page title for taxonomy term archive.
[1583] Fix | Delete
*
[1584] Fix | Delete
* Useful for taxonomy term template files for displaying the taxonomy term page title.
[1585] Fix | Delete
* The prefix does not automatically place a space between the prefix, so if there should
[1586] Fix | Delete
* be a space, the parameter value will need to have it at the end.
[1587] Fix | Delete
*
[1588] Fix | Delete
* @since 3.1.0
[1589] Fix | Delete
*
[1590] Fix | Delete
* @param string $prefix Optional. What to display before the title.
[1591] Fix | Delete
* @param bool $display Optional. Whether to display or retrieve title. Default true.
[1592] Fix | Delete
* @return string|void Title when retrieving.
[1593] Fix | Delete
*/
[1594] Fix | Delete
function single_term_title( $prefix = '', $display = true ) {
[1595] Fix | Delete
$term = get_queried_object();
[1596] Fix | Delete
[1597] Fix | Delete
if ( ! $term ) {
[1598] Fix | Delete
return;
[1599] Fix | Delete
}
[1600] Fix | Delete
[1601] Fix | Delete
if ( is_category() ) {
[1602] Fix | Delete
/**
[1603] Fix | Delete
* Filters the category archive page title.
[1604] Fix | Delete
*
[1605] Fix | Delete
* @since 2.0.10
[1606] Fix | Delete
*
[1607] Fix | Delete
* @param string $term_name Category name for archive being displayed.
[1608] Fix | Delete
*/
[1609] Fix | Delete
$term_name = apply_filters( 'single_cat_title', $term->name );
[1610] Fix | Delete
} elseif ( is_tag() ) {
[1611] Fix | Delete
/**
[1612] Fix | Delete
* Filters the tag archive page title.
[1613] Fix | Delete
*
[1614] Fix | Delete
* @since 2.3.0
[1615] Fix | Delete
*
[1616] Fix | Delete
* @param string $term_name Tag name for archive being displayed.
[1617] Fix | Delete
*/
[1618] Fix | Delete
$term_name = apply_filters( 'single_tag_title', $term->name );
[1619] Fix | Delete
} elseif ( is_tax() ) {
[1620] Fix | Delete
/**
[1621] Fix | Delete
* Filters the custom taxonomy archive page title.
[1622] Fix | Delete
*
[1623] Fix | Delete
* @since 3.1.0
[1624] Fix | Delete
*
[1625] Fix | Delete
* @param string $term_name Term name for archive being displayed.
[1626] Fix | Delete
*/
[1627] Fix | Delete
$term_name = apply_filters( 'single_term_title', $term->name );
[1628] Fix | Delete
} else {
[1629] Fix | Delete
return;
[1630] Fix | Delete
}
[1631] Fix | Delete
[1632] Fix | Delete
if ( empty( $term_name ) ) {
[1633] Fix | Delete
return;
[1634] Fix | Delete
}
[1635] Fix | Delete
[1636] Fix | Delete
if ( $display ) {
[1637] Fix | Delete
echo $prefix . $term_name;
[1638] Fix | Delete
} else {
[1639] Fix | Delete
return $prefix . $term_name;
[1640] Fix | Delete
}
[1641] Fix | Delete
}
[1642] Fix | Delete
[1643] Fix | Delete
/**
[1644] Fix | Delete
* Displays or retrieves page title for post archive based on date.
[1645] Fix | Delete
*
[1646] Fix | Delete
* Useful for when the template only needs to display the month and year,
[1647] Fix | Delete
* if either are available. The prefix does not automatically place a space
[1648] Fix | Delete
* between the prefix, so if there should be a space, the parameter value
[1649] Fix | Delete
* will need to have it at the end.
[1650] Fix | Delete
*
[1651] Fix | Delete
* @since 0.71
[1652] Fix | Delete
*
[1653] Fix | Delete
* @global WP_Locale $wp_locale WordPress date and time locale object.
[1654] Fix | Delete
*
[1655] Fix | Delete
* @param string $prefix Optional. What to display before the title.
[1656] Fix | Delete
* @param bool $display Optional. Whether to display or retrieve title. Default true.
[1657] Fix | Delete
* @return string|false|void False if there's no valid title for the month. Title when retrieving.
[1658] Fix | Delete
*/
[1659] Fix | Delete
function single_month_title( $prefix = '', $display = true ) {
[1660] Fix | Delete
global $wp_locale;
[1661] Fix | Delete
[1662] Fix | Delete
$m = get_query_var( 'm' );
[1663] Fix | Delete
$year = get_query_var( 'year' );
[1664] Fix | Delete
$monthnum = get_query_var( 'monthnum' );
[1665] Fix | Delete
[1666] Fix | Delete
if ( ! empty( $monthnum ) && ! empty( $year ) ) {
[1667] Fix | Delete
$my_year = $year;
[1668] Fix | Delete
$my_month = $wp_locale->get_month( $monthnum );
[1669] Fix | Delete
} elseif ( ! empty( $m ) ) {
[1670] Fix | Delete
$my_year = substr( $m, 0, 4 );
[1671] Fix | Delete
$my_month = $wp_locale->get_month( substr( $m, 4, 2 ) );
[1672] Fix | Delete
}
[1673] Fix | Delete
[1674] Fix | Delete
if ( empty( $my_month ) ) {
[1675] Fix | Delete
return false;
[1676] Fix | Delete
}
[1677] Fix | Delete
[1678] Fix | Delete
$result = $prefix . $my_month . $prefix . $my_year;
[1679] Fix | Delete
[1680] Fix | Delete
if ( ! $display ) {
[1681] Fix | Delete
return $result;
[1682] Fix | Delete
}
[1683] Fix | Delete
echo $result;
[1684] Fix | Delete
}
[1685] Fix | Delete
[1686] Fix | Delete
/**
[1687] Fix | Delete
* Displays the archive title based on the queried object.
[1688] Fix | Delete
*
[1689] Fix | Delete
* @since 4.1.0
[1690] Fix | Delete
*
[1691] Fix | Delete
* @see get_the_archive_title()
[1692] Fix | Delete
*
[1693] Fix | Delete
* @param string $before Optional. Content to prepend to the title. Default empty.
[1694] Fix | Delete
* @param string $after Optional. Content to append to the title. Default empty.
[1695] Fix | Delete
*/
[1696] Fix | Delete
function the_archive_title( $before = '', $after = '' ) {
[1697] Fix | Delete
$title = get_the_archive_title();
[1698] Fix | Delete
[1699] Fix | Delete
if ( ! empty( $title ) ) {
[1700] Fix | Delete
echo $before . $title . $after;
[1701] Fix | Delete
}
[1702] Fix | Delete
}
[1703] Fix | Delete
[1704] Fix | Delete
/**
[1705] Fix | Delete
* Retrieves the archive title based on the queried object.
[1706] Fix | Delete
*
[1707] Fix | Delete
* @since 4.1.0
[1708] Fix | Delete
* @since 5.5.0 The title part is wrapped in a `<span>` element.
[1709] Fix | Delete
*
[1710] Fix | Delete
* @return string Archive title.
[1711] Fix | Delete
*/
[1712] Fix | Delete
function get_the_archive_title() {
[1713] Fix | Delete
$title = __( 'Archives' );
[1714] Fix | Delete
$prefix = '';
[1715] Fix | Delete
[1716] Fix | Delete
if ( is_category() ) {
[1717] Fix | Delete
$title = single_cat_title( '', false );
[1718] Fix | Delete
$prefix = _x( 'Category:', 'category archive title prefix' );
[1719] Fix | Delete
} elseif ( is_tag() ) {
[1720] Fix | Delete
$title = single_tag_title( '', false );
[1721] Fix | Delete
$prefix = _x( 'Tag:', 'tag archive title prefix' );
[1722] Fix | Delete
} elseif ( is_author() ) {
[1723] Fix | Delete
$title = get_the_author();
[1724] Fix | Delete
$prefix = _x( 'Author:', 'author archive title prefix' );
[1725] Fix | Delete
} elseif ( is_year() ) {
[1726] Fix | Delete
/* translators: See https://www.php.net/manual/datetime.format.php */
[1727] Fix | Delete
$title = get_the_date( _x( 'Y', 'yearly archives date format' ) );
[1728] Fix | Delete
$prefix = _x( 'Year:', 'date archive title prefix' );
[1729] Fix | Delete
} elseif ( is_month() ) {
[1730] Fix | Delete
/* translators: See https://www.php.net/manual/datetime.format.php */
[1731] Fix | Delete
$title = get_the_date( _x( 'F Y', 'monthly archives date format' ) );
[1732] Fix | Delete
$prefix = _x( 'Month:', 'date archive title prefix' );
[1733] Fix | Delete
} elseif ( is_day() ) {
[1734] Fix | Delete
/* translators: See https://www.php.net/manual/datetime.format.php */
[1735] Fix | Delete
$title = get_the_date( _x( 'F j, Y', 'daily archives date format' ) );
[1736] Fix | Delete
$prefix = _x( 'Day:', 'date archive title prefix' );
[1737] Fix | Delete
} elseif ( is_tax( 'post_format' ) ) {
[1738] Fix | Delete
if ( is_tax( 'post_format', 'post-format-aside' ) ) {
[1739] Fix | Delete
$title = _x( 'Asides', 'post format archive title' );
[1740] Fix | Delete
} elseif ( is_tax( 'post_format', 'post-format-gallery' ) ) {
[1741] Fix | Delete
$title = _x( 'Galleries', 'post format archive title' );
[1742] Fix | Delete
} elseif ( is_tax( 'post_format', 'post-format-image' ) ) {
[1743] Fix | Delete
$title = _x( 'Images', 'post format archive title' );
[1744] Fix | Delete
} elseif ( is_tax( 'post_format', 'post-format-video' ) ) {
[1745] Fix | Delete
$title = _x( 'Videos', 'post format archive title' );
[1746] Fix | Delete
} elseif ( is_tax( 'post_format', 'post-format-quote' ) ) {
[1747] Fix | Delete
$title = _x( 'Quotes', 'post format archive title' );
[1748] Fix | Delete
} elseif ( is_tax( 'post_format', 'post-format-link' ) ) {
[1749] Fix | Delete
$title = _x( 'Links', 'post format archive title' );
[1750] Fix | Delete
} elseif ( is_tax( 'post_format', 'post-format-status' ) ) {
[1751] Fix | Delete
$title = _x( 'Statuses', 'post format archive title' );
[1752] Fix | Delete
} elseif ( is_tax( 'post_format', 'post-format-audio' ) ) {
[1753] Fix | Delete
$title = _x( 'Audio', 'post format archive title' );
[1754] Fix | Delete
} elseif ( is_tax( 'post_format', 'post-format-chat' ) ) {
[1755] Fix | Delete
$title = _x( 'Chats', 'post format archive title' );
[1756] Fix | Delete
}
[1757] Fix | Delete
} elseif ( is_post_type_archive() ) {
[1758] Fix | Delete
$title = post_type_archive_title( '', false );
[1759] Fix | Delete
$prefix = _x( 'Archives:', 'post type archive title prefix' );
[1760] Fix | Delete
} elseif ( is_tax() ) {
[1761] Fix | Delete
$queried_object = get_queried_object();
[1762] Fix | Delete
if ( $queried_object ) {
[1763] Fix | Delete
$tax = get_taxonomy( $queried_object->taxonomy );
[1764] Fix | Delete
$title = single_term_title( '', false );
[1765] Fix | Delete
$prefix = sprintf(
[1766] Fix | Delete
/* translators: %s: Taxonomy singular name. */
[1767] Fix | Delete
_x( '%s:', 'taxonomy term archive title prefix' ),
[1768] Fix | Delete
$tax->labels->singular_name
[1769] Fix | Delete
);
[1770] Fix | Delete
}
[1771] Fix | Delete
}
[1772] Fix | Delete
[1773] Fix | Delete
$original_title = $title;
[1774] Fix | Delete
[1775] Fix | Delete
/**
[1776] Fix | Delete
* Filters the archive title prefix.
[1777] Fix | Delete
*
[1778] Fix | Delete
* @since 5.5.0
[1779] Fix | Delete
*
[1780] Fix | Delete
* @param string $prefix Archive title prefix.
[1781] Fix | Delete
*/
[1782] Fix | Delete
$prefix = apply_filters( 'get_the_archive_title_prefix', $prefix );
[1783] Fix | Delete
if ( $prefix ) {
[1784] Fix | Delete
$title = sprintf(
[1785] Fix | Delete
/* translators: 1: Title prefix. 2: Title. */
[1786] Fix | Delete
_x( '%1$s %2$s', 'archive title' ),
[1787] Fix | Delete
$prefix,
[1788] Fix | Delete
'<span>' . $title . '</span>'
[1789] Fix | Delete
);
[1790] Fix | Delete
}
[1791] Fix | Delete
[1792] Fix | Delete
/**
[1793] Fix | Delete
* Filters the archive title.
[1794] Fix | Delete
*
[1795] Fix | Delete
* @since 4.1.0
[1796] Fix | Delete
* @since 5.5.0 Added the `$prefix` and `$original_title` parameters.
[1797] Fix | Delete
*
[1798] Fix | Delete
* @param string $title Archive title to be displayed.
[1799] Fix | Delete
* @param string $original_title Archive title without prefix.
[1800] Fix | Delete
* @param string $prefix Archive title prefix.
[1801] Fix | Delete
*/
[1802] Fix | Delete
return apply_filters( 'get_the_archive_title', $title, $original_title, $prefix );
[1803] Fix | Delete
}
[1804] Fix | Delete
[1805] Fix | Delete
/**
[1806] Fix | Delete
* Displays category, tag, term, or author description.
[1807] Fix | Delete
*
[1808] Fix | Delete
* @since 4.1.0
[1809] Fix | Delete
*
[1810] Fix | Delete
* @see get_the_archive_description()
[1811] Fix | Delete
*
[1812] Fix | Delete
* @param string $before Optional. Content to prepend to the description. Default empty.
[1813] Fix | Delete
* @param string $after Optional. Content to append to the description. Default empty.
[1814] Fix | Delete
*/
[1815] Fix | Delete
function the_archive_description( $before = '', $after = '' ) {
[1816] Fix | Delete
$description = get_the_archive_description();
[1817] Fix | Delete
if ( $description ) {
[1818] Fix | Delete
echo $before . $description . $after;
[1819] Fix | Delete
}
[1820] Fix | Delete
}
[1821] Fix | Delete
[1822] Fix | Delete
/**
[1823] Fix | Delete
* Retrieves the description for an author, post type, or term archive.
[1824] Fix | Delete
*
[1825] Fix | Delete
* @since 4.1.0
[1826] Fix | Delete
* @since 4.7.0 Added support for author archives.
[1827] Fix | Delete
* @since 4.9.0 Added support for post type archives.
[1828] Fix | Delete
*
[1829] Fix | Delete
* @see term_description()
[1830] Fix | Delete
*
[1831] Fix | Delete
* @return string Archive description.
[1832] Fix | Delete
*/
[1833] Fix | Delete
function get_the_archive_description() {
[1834] Fix | Delete
if ( is_author() ) {
[1835] Fix | Delete
$description = get_the_author_meta( 'description' );
[1836] Fix | Delete
} elseif ( is_post_type_archive() ) {
[1837] Fix | Delete
$description = get_the_post_type_description();
[1838] Fix | Delete
} else {
[1839] Fix | Delete
$description = term_description();
[1840] Fix | Delete
}
[1841] Fix | Delete
[1842] Fix | Delete
/**
[1843] Fix | Delete
* Filters the archive description.
[1844] Fix | Delete
*
[1845] Fix | Delete
* @since 4.1.0
[1846] Fix | Delete
*
[1847] Fix | Delete
* @param string $description Archive description to be displayed.
[1848] Fix | Delete
*/
[1849] Fix | Delete
return apply_filters( 'get_the_archive_description', $description );
[1850] Fix | Delete
}
[1851] Fix | Delete
[1852] Fix | Delete
/**
[1853] Fix | Delete
* Retrieves the description for a post type archive.
[1854] Fix | Delete
*
[1855] Fix | Delete
* @since 4.9.0
[1856] Fix | Delete
*
[1857] Fix | Delete
* @return string The post type description.
[1858] Fix | Delete
*/
[1859] Fix | Delete
function get_the_post_type_description() {
[1860] Fix | Delete
$post_type = get_query_var( 'post_type' );
[1861] Fix | Delete
[1862] Fix | Delete
if ( is_array( $post_type ) ) {
[1863] Fix | Delete
$post_type = reset( $post_type );
[1864] Fix | Delete
}
[1865] Fix | Delete
[1866] Fix | Delete
$post_type_obj = get_post_type_object( $post_type );
[1867] Fix | Delete
[1868] Fix | Delete
// Check if a description is set.
[1869] Fix | Delete
if ( isset( $post_type_obj->description ) ) {
[1870] Fix | Delete
$description = $post_type_obj->description;
[1871] Fix | Delete
} else {
[1872] Fix | Delete
$description = '';
[1873] Fix | Delete
}
[1874] Fix | Delete
[1875] Fix | Delete
/**
[1876] Fix | Delete
* Filters the description for a post type archive.
[1877] Fix | Delete
*
[1878] Fix | Delete
* @since 4.9.0
[1879] Fix | Delete
*
[1880] Fix | Delete
* @param string $description The post type description.
[1881] Fix | Delete
* @param WP_Post_Type $post_type_obj The post type object.
[1882] Fix | Delete
*/
[1883] Fix | Delete
return apply_filters( 'get_the_post_type_description', $description, $post_type_obj );
[1884] Fix | Delete
}
[1885] Fix | Delete
[1886] Fix | Delete
/**
[1887] Fix | Delete
* Retrieves archive link content based on predefined or custom code.
[1888] Fix | Delete
*
[1889] Fix | Delete
* The format can be one of four styles. The 'link' for head element, 'option'
[1890] Fix | Delete
* for use in the select element, 'html' for use in list (either ol or ul HTML
[1891] Fix | Delete
* elements). Custom content is also supported using the before and after
[1892] Fix | Delete
* parameters.
[1893] Fix | Delete
*
[1894] Fix | Delete
* The 'link' format uses the `<link>` HTML element with the **archives**
[1895] Fix | Delete
* relationship. The before and after parameters are not used. The text
[1896] Fix | Delete
* parameter is used to describe the link.
[1897] Fix | Delete
*
[1898] Fix | Delete
* The 'option' format uses the option HTML element for use in select element.
[1899] Fix | Delete
* The value is the url parameter and the before and after parameters are used
[1900] Fix | Delete
* between the text description.
[1901] Fix | Delete
*
[1902] Fix | Delete
* The 'html' format, which is the default, uses the li HTML element for use in
[1903] Fix | Delete
* the list HTML elements. The before parameter is before the link and the after
[1904] Fix | Delete
* parameter is after the closing link.
[1905] Fix | Delete
*
[1906] Fix | Delete
* The custom format uses the before parameter before the link ('a' HTML
[1907] Fix | Delete
* element) and the after parameter after the closing link tag. If the above
[1908] Fix | Delete
* three values for the format are not used, then custom format is assumed.
[1909] Fix | Delete
*
[1910] Fix | Delete
* @since 1.0.0
[1911] Fix | Delete
* @since 5.2.0 Added the `$selected` parameter.
[1912] Fix | Delete
*
[1913] Fix | Delete
* @param string $url URL to archive.
[1914] Fix | Delete
* @param string $text Archive text description.
[1915] Fix | Delete
* @param string $format Optional. Can be 'link', 'option', 'html', or custom. Default 'html'.
[1916] Fix | Delete
* @param string $before Optional. Content to prepend to the description. Default empty.
[1917] Fix | Delete
* @param string $after Optional. Content to append to the description. Default empty.
[1918] Fix | Delete
* @param bool $selected Optional. Set to true if the current page is the selected archive page.
[1919] Fix | Delete
* @return string HTML link content for archive.
[1920] Fix | Delete
*/
[1921] Fix | Delete
function get_archives_link( $url, $text, $format = 'html', $before = '', $after = '', $selected = false ) {
[1922] Fix | Delete
$text = wptexturize( $text );
[1923] Fix | Delete
$url = esc_url( $url );
[1924] Fix | Delete
$aria_current = $selected ? ' aria-current="page"' : '';
[1925] Fix | Delete
[1926] Fix | Delete
if ( 'link' === $format ) {
[1927] Fix | Delete
$link_html = "\t<link rel='archives' title='" . esc_attr( $text ) . "' href='$url' />\n";
[1928] Fix | Delete
} elseif ( 'option' === $format ) {
[1929] Fix | Delete
$selected_attr = $selected ? " selected='selected'" : '';
[1930] Fix | Delete
$link_html = "\t<option value='$url'$selected_attr>$before $text $after</option>\n";
[1931] Fix | Delete
} elseif ( 'html' === $format ) {
[1932] Fix | Delete
$link_html = "\t<li>$before<a href='$url'$aria_current>$text</a>$after</li>\n";
[1933] Fix | Delete
} else { // Custom.
[1934] Fix | Delete
$link_html = "\t$before<a href='$url'$aria_current>$text</a>$after\n";
[1935] Fix | Delete
}
[1936] Fix | Delete
[1937] Fix | Delete
/**
[1938] Fix | Delete
* Filters the archive link content.
[1939] Fix | Delete
*
[1940] Fix | Delete
* @since 2.6.0
[1941] Fix | Delete
* @since 4.5.0 Added the `$url`, `$text`, `$format`, `$before`, and `$after` parameters.
[1942] Fix | Delete
* @since 5.2.0 Added the `$selected` parameter.
[1943] Fix | Delete
*
[1944] Fix | Delete
* @param string $link_html The archive HTML link content.
[1945] Fix | Delete
* @param string $url URL to archive.
[1946] Fix | Delete
* @param string $text Archive text description.
[1947] Fix | Delete
* @param string $format Link format. Can be 'link', 'option', 'html', or custom.
[1948] Fix | Delete
* @param string $before Content to prepend to the description.
[1949] Fix | Delete
* @param string $after Content to append to the description.
[1950] Fix | Delete
* @param bool $selected True if the current page is the selected archive.
[1951] Fix | Delete
*/
[1952] Fix | Delete
return apply_filters( 'get_archives_link', $link_html, $url, $text, $format, $before, $after, $selected );
[1953] Fix | Delete
}
[1954] Fix | Delete
[1955] Fix | Delete
/**
[1956] Fix | Delete
* Displays archive links based on type and format.
[1957] Fix | Delete
*
[1958] Fix | Delete
* @since 1.2.0
[1959] Fix | Delete
* @since 4.4.0 The `$post_type` argument was added.
[1960] Fix | Delete
* @since 5.2.0 The `$year`, `$monthnum`, `$day`, and `$w` arguments were added.
[1961] Fix | Delete
*
[1962] Fix | Delete
* @see get_archives_link()
[1963] Fix | Delete
*
[1964] Fix | Delete
* @global wpdb $wpdb WordPress database abstraction object.
[1965] Fix | Delete
* @global WP_Locale $wp_locale WordPress date and time locale object.
[1966] Fix | Delete
*
[1967] Fix | Delete
* @param string|array $args {
[1968] Fix | Delete
* Default archive links arguments. Optional.
[1969] Fix | Delete
*
[1970] Fix | Delete
* @type string $type Type of archive to retrieve. Accepts 'daily', 'weekly', 'monthly',
[1971] Fix | Delete
* 'yearly', 'postbypost', or 'alpha'. Both 'postbypost' and 'alpha'
[1972] Fix | Delete
* display the same archive link list as well as post titles instead
[1973] Fix | Delete
* of displaying dates. The difference between the two is that 'alpha'
[1974] Fix | Delete
* will order by post title and 'postbypost' will order by post date.
[1975] Fix | Delete
* Default 'monthly'.
[1976] Fix | Delete
* @type string|int $limit Number of links to limit the query to. Default empty (no limit).
[1977] Fix | Delete
* @type string $format Format each link should take using the $before and $after args.
[1978] Fix | Delete
* Accepts 'link' (`<link>` tag), 'option' (`<option>` tag), 'html'
[1979] Fix | Delete
* (`<li>` tag), or a custom format, which generates a link anchor
[1980] Fix | Delete
* with $before preceding and $after succeeding. Default 'html'.
[1981] Fix | Delete
* @type string $before Markup to prepend to the beginning of each link. Default empty.
[1982] Fix | Delete
* @type string $after Markup to append to the end of each link. Default empty.
[1983] Fix | Delete
* @type bool $show_post_count Whether to display the post count alongside the link. Default false.
[1984] Fix | Delete
* @type bool|int $echo Whether to echo or return the links list. Default 1|true to echo.
[1985] Fix | Delete
* @type string $order Whether to use ascending or descending order. Accepts 'ASC', or 'DESC'.
[1986] Fix | Delete
* Default 'DESC'.
[1987] Fix | Delete
* @type string $post_type Post type. Default 'post'.
[1988] Fix | Delete
* @type string $year Year. Default current year.
[1989] Fix | Delete
* @type string $monthnum Month number. Default current month number.
[1990] Fix | Delete
* @type string $day Day. Default current day.
[1991] Fix | Delete
* @type string $w Week. Default current week.
[1992] Fix | Delete
* }
[1993] Fix | Delete
* @return void|string Void if 'echo' argument is true, archive links if 'echo' is false.
[1994] Fix | Delete
*/
[1995] Fix | Delete
function wp_get_archives( $args = '' ) {
[1996] Fix | Delete
global $wpdb, $wp_locale;
[1997] Fix | Delete
[1998] Fix | Delete
$defaults = array(
[1999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function