summaryrefslogtreecommitdiffstats
path: root/wp-includes/general-template.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--wp-includes/general-template.php34
1 files changed, 16 insertions, 18 deletions
diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php
index fafbfcb..702c434 100644
--- a/wp-includes/general-template.php
+++ b/wp-includes/general-template.php
@@ -906,17 +906,12 @@ function get_bloginfo( $show = '', $filter = 'raw' ) {
break;
}
- $url = true;
-
- if ( ! str_contains( $show, 'url' )
- && ! str_contains( $show, 'directory' )
- && ! str_contains( $show, 'home' )
- ) {
- $url = false;
- }
-
if ( 'display' === $filter ) {
- if ( $url ) {
+ if (
+ str_contains( $show, 'url' )
+ || str_contains( $show, 'directory' )
+ || str_contains( $show, 'home' )
+ ) {
/**
* Filters the URL returned by get_bloginfo().
*
@@ -1324,7 +1319,7 @@ function _wp_render_title_tag() {
* @param string $sep Optional. How to separate the various items within the page title.
* Default '»'.
* @param bool $display Optional. Whether to display or retrieve title. Default true.
- * @param string $seplocation Optional. Location of the separator ('left' or 'right').
+ * @param string $seplocation Optional. Location of the separator (either 'left' or 'right').
* @return string|void String when `$display` is false, nothing otherwise.
*/
function wp_title( $sep = '»', $display = true, $seplocation = '' ) {
@@ -1444,7 +1439,7 @@ function wp_title( $sep = '»', $display = true, $seplocation = '' ) {
*
* @param string $title Page title.
* @param string $sep Title separator.
- * @param string $seplocation Location of the separator ('left' or 'right').
+ * @param string $seplocation Location of the separator (either 'left' or 'right').
*/
$title = apply_filters( 'wp_title', $title, $sep, $seplocation );
@@ -1715,12 +1710,15 @@ function get_the_archive_title() {
$title = get_the_author();
$prefix = _x( 'Author:', 'author archive title prefix' );
} elseif ( is_year() ) {
+ /* translators: See https://www.php.net/manual/datetime.format.php */
$title = get_the_date( _x( 'Y', 'yearly archives date format' ) );
$prefix = _x( 'Year:', 'date archive title prefix' );
} elseif ( is_month() ) {
+ /* translators: See https://www.php.net/manual/datetime.format.php */
$title = get_the_date( _x( 'F Y', 'monthly archives date format' ) );
$prefix = _x( 'Month:', 'date archive title prefix' );
} elseif ( is_day() ) {
+ /* translators: See https://www.php.net/manual/datetime.format.php */
$title = get_the_date( _x( 'F j, Y', 'daily archives date format' ) );
$prefix = _x( 'Day:', 'date archive title prefix' );
} elseif ( is_tax( 'post_format' ) ) {
@@ -3443,7 +3441,7 @@ function wp_site_icon() {
/**
* Prints resource hints to browsers for pre-fetching, pre-rendering
- * and pre-connecting to web sites.
+ * and pre-connecting to websites.
*
* Gives hints to browsers to prefetch specific pages or render them
* in the background, to perform DNS lookups or to begin the connection
@@ -3465,7 +3463,7 @@ function wp_resource_hints() {
$unique_urls = array();
/**
- * Filters domains and URLs for resource hints of relation type.
+ * Filters domains and URLs for resource hints of the given relation type.
*
* @since 4.6.0
* @since 4.7.0 The `$urls` parameter accepts arrays of specific HTML attributes
@@ -3485,8 +3483,8 @@ function wp_resource_hints() {
* @type string $type Type of the resource (`text/html`, `text/css`, etc).
* }
* }
- * @param string $relation_type The relation type the URLs are printed for,
- * e.g. 'preconnect' or 'prerender'.
+ * @param string $relation_type The relation type the URLs are printed for. One of
+ * 'dns-prefetch', 'preconnect', 'prefetch', or 'prerender'.
*/
$urls = apply_filters( 'wp_resource_hints', $urls, $relation_type );
@@ -3759,12 +3757,12 @@ function user_can_richedit() {
/**
* Finds out which editor should be displayed by default.
*
- * Works out which of the two editors to display as the current editor for a
+ * Works out which of the editors to display as the current editor for a
* user. The 'html' setting is for the "Text" editor tab.
*
* @since 2.5.0
*
- * @return string Either 'tinymce', or 'html', or 'test'
+ * @return string Either 'tinymce', 'html', or 'test'
*/
function wp_default_editor() {
$r = user_can_richedit() ? 'tinymce' : 'html'; // Defaults.