Docs: Remove an empty line between @param
and @return
tags, per the documentation standards.
See #49572. git-svn-id: https://develop.svn.wordpress.org/trunk@48102 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
bcdaf86a42
commit
806c94fe0a
@ -658,7 +658,6 @@ class WP_Media_List_Table extends WP_List_Table {
|
|||||||
/**
|
/**
|
||||||
* @param WP_Post $post
|
* @param WP_Post $post
|
||||||
* @param string $att_title
|
* @param string $att_title
|
||||||
*
|
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
private function _get_row_actions( $post, $att_title ) {
|
private function _get_row_actions( $post, $att_title ) {
|
||||||
|
@ -148,7 +148,6 @@ class WP_Site_Health {
|
|||||||
* @since 5.4.0
|
* @since 5.4.0
|
||||||
*
|
*
|
||||||
* @param $callback
|
* @param $callback
|
||||||
*
|
|
||||||
* @return mixed|void
|
* @return mixed|void
|
||||||
*/
|
*/
|
||||||
private function perform_test( $callback ) {
|
private function perform_test( $callback ) {
|
||||||
@ -790,7 +789,6 @@ class WP_Site_Health {
|
|||||||
* @param string $function Optional. The function name to test. Default null.
|
* @param string $function Optional. The function name to test. Default null.
|
||||||
* @param string $constant Optional. The constant name to test for. Default null.
|
* @param string $constant Optional. The constant name to test for. Default null.
|
||||||
* @param string $class Optional. The class name to test for. Default null.
|
* @param string $class Optional. The class name to test for. Default null.
|
||||||
*
|
|
||||||
* @return bool Whether or not the extension and function are available.
|
* @return bool Whether or not the extension and function are available.
|
||||||
*/
|
*/
|
||||||
private function test_php_extension_availability( $extension = null, $function = null, $constant = null, $class = null ) {
|
private function test_php_extension_availability( $extension = null, $function = null, $constant = null, $class = null ) {
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
* @param string $comment_author Author of the comment.
|
* @param string $comment_author Author of the comment.
|
||||||
* @param string $comment_date Date of the comment.
|
* @param string $comment_date Date of the comment.
|
||||||
* @param string $timezone Timezone. Accepts 'blog' or 'gmt'. Default 'blog'.
|
* @param string $timezone Timezone. Accepts 'blog' or 'gmt'. Default 'blog'.
|
||||||
*
|
|
||||||
* @return mixed Comment post ID on success.
|
* @return mixed Comment post ID on success.
|
||||||
*/
|
*/
|
||||||
function comment_exists( $comment_author, $comment_date, $timezone = 'blog' ) {
|
function comment_exists( $comment_author, $comment_date, $timezone = 'blog' ) {
|
||||||
|
@ -1976,7 +1976,6 @@ function get_filesystem_method( $args = array(), $context = '', $allow_relaxed_f
|
|||||||
* @param array $extra_fields Optional. Extra `POST` fields to be checked for inclusion in
|
* @param array $extra_fields Optional. Extra `POST` fields to be checked for inclusion in
|
||||||
* the post. Default null.
|
* the post. Default null.
|
||||||
* @param bool $allow_relaxed_file_ownership Optional. Whether to allow Group/World writable. Default false.
|
* @param bool $allow_relaxed_file_ownership Optional. Whether to allow Group/World writable. Default false.
|
||||||
*
|
|
||||||
* @return bool|array True if no filesystem credentials are required, false if they are required but have not been
|
* @return bool|array True if no filesystem credentials are required, false if they are required but have not been
|
||||||
* provided, array of credentials if they are required and have been provided.
|
* provided, array of credentials if they are required and have been provided.
|
||||||
*/
|
*/
|
||||||
|
@ -1401,7 +1401,6 @@ All at ###SITENAME###
|
|||||||
*
|
*
|
||||||
* @param string $title Page title.
|
* @param string $title Page title.
|
||||||
* @param WP_Post $page Page data object.
|
* @param WP_Post $page Page data object.
|
||||||
*
|
|
||||||
* @return string Page title.
|
* @return string Page title.
|
||||||
*/
|
*/
|
||||||
function _wp_privacy_settings_filter_draft_page_titles( $title, $page ) {
|
function _wp_privacy_settings_filter_draft_page_titles( $title, $page ) {
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
* @param WP_Post|int $post The post object or post ID.
|
* @param WP_Post|int $post The post object or post ID.
|
||||||
* @param int $compare_from The revision ID to compare from.
|
* @param int $compare_from The revision ID to compare from.
|
||||||
* @param int $compare_to The revision ID to come to.
|
* @param int $compare_to The revision ID to come to.
|
||||||
*
|
|
||||||
* @return array|bool Associative array of a post's revisioned fields and their diffs.
|
* @return array|bool Associative array of a post's revisioned fields and their diffs.
|
||||||
* Or, false on failure.
|
* Or, false on failure.
|
||||||
*/
|
*/
|
||||||
@ -161,7 +160,6 @@ function wp_get_revision_ui_diff( $post, $compare_from, $compare_to ) {
|
|||||||
* @param WP_Post|int $post The post object or post ID.
|
* @param WP_Post|int $post The post object or post ID.
|
||||||
* @param int $selected_revision_id The selected revision ID.
|
* @param int $selected_revision_id The selected revision ID.
|
||||||
* @param int $from Optional. The revision ID to compare from.
|
* @param int $from Optional. The revision ID to compare from.
|
||||||
*
|
|
||||||
* @return array An associative array of revision data and related settings.
|
* @return array An associative array of revision data and related settings.
|
||||||
*/
|
*/
|
||||||
function wp_prepare_revisions_for_js( $post, $selected_revision_id, $from = null ) {
|
function wp_prepare_revisions_for_js( $post, $selected_revision_id, $from = null ) {
|
||||||
|
@ -141,7 +141,6 @@ add_action( 'customize_controls_enqueue_scripts', 'twentynineteen_panels_js' );
|
|||||||
* Sanitize custom color choice.
|
* Sanitize custom color choice.
|
||||||
*
|
*
|
||||||
* @param string $choice Whether image filter is active.
|
* @param string $choice Whether image filter is active.
|
||||||
*
|
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function twentynineteen_sanitize_color_option( $choice ) {
|
function twentynineteen_sanitize_color_option( $choice ) {
|
||||||
|
@ -589,8 +589,8 @@ add_filter( 'wp_get_attachment_image_attributes', 'twentyseventeen_post_thumbnai
|
|||||||
* @since Twenty Seventeen 1.0
|
* @since Twenty Seventeen 1.0
|
||||||
*
|
*
|
||||||
* @param string $template front-page.php.
|
* @param string $template front-page.php.
|
||||||
*
|
* @return string The template to be used: blank if is_home() is true (defaults to index.php),
|
||||||
* @return string The template to be used: blank if is_home() is true (defaults to index.php), else $template.
|
* otherwise $template.
|
||||||
*/
|
*/
|
||||||
function twentyseventeen_front_page_template( $template ) {
|
function twentyseventeen_front_page_template( $template ) {
|
||||||
return is_home() ? '' : $template;
|
return is_home() ? '' : $template;
|
||||||
@ -617,7 +617,7 @@ function twentyseventeen_widget_tag_cloud_args( $args ) {
|
|||||||
add_filter( 'widget_tag_cloud_args', 'twentyseventeen_widget_tag_cloud_args' );
|
add_filter( 'widget_tag_cloud_args', 'twentyseventeen_widget_tag_cloud_args' );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get unique ID.
|
* Gets unique ID.
|
||||||
*
|
*
|
||||||
* This is a PHP implementation of Underscore's uniqueId method. A static variable
|
* This is a PHP implementation of Underscore's uniqueId method. A static variable
|
||||||
* contains an integer that is incremented with each call. This number is returned
|
* contains an integer that is incremented with each call. This number is returned
|
||||||
|
@ -416,7 +416,7 @@ if ( ! class_exists( 'TwentyTwenty_Customize' ) ) {
|
|||||||
* @access public
|
* @access public
|
||||||
* @since Twenty Twenty 1.0
|
* @since Twenty Twenty 1.0
|
||||||
* @param array $value The value we want to sanitize.
|
* @param array $value The value we want to sanitize.
|
||||||
* @return array Returns sanitized value. Each item in the array gets sanitized separately.
|
* @return array Returns sanitized value. Each item in the array gets sanitized separately.
|
||||||
*/
|
*/
|
||||||
public static function sanitize_accent_accessible_colors( $value ) {
|
public static function sanitize_accent_accessible_colors( $value ) {
|
||||||
|
|
||||||
@ -438,8 +438,7 @@ if ( ! class_exists( 'TwentyTwenty_Customize' ) ) {
|
|||||||
*
|
*
|
||||||
* @param string $input The input from the setting.
|
* @param string $input The input from the setting.
|
||||||
* @param object $setting The selected setting.
|
* @param object $setting The selected setting.
|
||||||
*
|
* @return string The input from the setting or the default setting.
|
||||||
* @return string $input|$setting->default The input from the setting or the default setting.
|
|
||||||
*/
|
*/
|
||||||
public static function sanitize_select( $input, $setting ) {
|
public static function sanitize_select( $input, $setting ) {
|
||||||
$input = sanitize_key( $input );
|
$input = sanitize_key( $input );
|
||||||
@ -451,7 +450,6 @@ if ( ! class_exists( 'TwentyTwenty_Customize' ) ) {
|
|||||||
* Sanitize boolean for checkbox.
|
* Sanitize boolean for checkbox.
|
||||||
*
|
*
|
||||||
* @param bool $checked Whether or not a box is checked.
|
* @param bool $checked Whether or not a box is checked.
|
||||||
*
|
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public static function sanitize_checkbox( $checked ) {
|
public static function sanitize_checkbox( $checked ) {
|
||||||
|
@ -21,7 +21,6 @@ if ( ! class_exists( 'TwentyTwenty_Non_Latin_Languages' ) ) {
|
|||||||
* Return CSS for non-latin language, if available, or null
|
* Return CSS for non-latin language, if available, or null
|
||||||
*
|
*
|
||||||
* @param string $type Whether to return CSS for the "front-end", "block-editor" or "classic-editor".
|
* @param string $type Whether to return CSS for the "front-end", "block-editor" or "classic-editor".
|
||||||
*
|
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function get_non_latin_css( $type = 'front-end' ) {
|
public static function get_non_latin_css( $type = 'front-end' ) {
|
||||||
|
@ -271,8 +271,7 @@ add_action( 'init', 'twentytwenty_menus' );
|
|||||||
* Get the information about the logo.
|
* Get the information about the logo.
|
||||||
*
|
*
|
||||||
* @param string $html The HTML output from get_custom_logo (core function).
|
* @param string $html The HTML output from get_custom_logo (core function).
|
||||||
*
|
* @return string
|
||||||
* @return string $html
|
|
||||||
*/
|
*/
|
||||||
function twentytwenty_get_custom_logo( $html ) {
|
function twentytwenty_get_custom_logo( $html ) {
|
||||||
|
|
||||||
@ -427,8 +426,7 @@ add_action( 'init', 'twentytwenty_classic_editor_styles' );
|
|||||||
* Adds styles to the head of the TinyMCE iframe. Kudos to @Otto42 for the original solution.
|
* Adds styles to the head of the TinyMCE iframe. Kudos to @Otto42 for the original solution.
|
||||||
*
|
*
|
||||||
* @param array $mce_init TinyMCE styles.
|
* @param array $mce_init TinyMCE styles.
|
||||||
*
|
* @return array TinyMCE styles.
|
||||||
* @return array $mce_init TinyMCE styles.
|
|
||||||
*/
|
*/
|
||||||
function twentytwenty_add_classic_editor_customizer_styles( $mce_init ) {
|
function twentytwenty_add_classic_editor_customizer_styles( $mce_init ) {
|
||||||
|
|
||||||
@ -451,8 +449,7 @@ add_filter( 'tiny_mce_before_init', 'twentytwenty_add_classic_editor_customizer_
|
|||||||
* Adds styles to the head of the TinyMCE iframe. Kudos to @Otto42 for the original solution.
|
* Adds styles to the head of the TinyMCE iframe. Kudos to @Otto42 for the original solution.
|
||||||
*
|
*
|
||||||
* @param array $mce_init TinyMCE styles.
|
* @param array $mce_init TinyMCE styles.
|
||||||
*
|
* @return array TinyMCE styles.
|
||||||
* @return array $mce_init TinyMCE styles.
|
|
||||||
*/
|
*/
|
||||||
function twentytwenty_add_classic_editor_non_latin_styles( $mce_init ) {
|
function twentytwenty_add_classic_editor_non_latin_styles( $mce_init ) {
|
||||||
|
|
||||||
@ -569,8 +566,7 @@ add_action( 'after_setup_theme', 'twentytwenty_block_editor_settings' );
|
|||||||
* Overwrite default more tag with styling and screen reader markup.
|
* Overwrite default more tag with styling and screen reader markup.
|
||||||
*
|
*
|
||||||
* @param string $html The default output HTML for the more tag.
|
* @param string $html The default output HTML for the more tag.
|
||||||
*
|
* @return string
|
||||||
* @return string $html
|
|
||||||
*/
|
*/
|
||||||
function twentytwenty_read_more_tag( $html ) {
|
function twentytwenty_read_more_tag( $html ) {
|
||||||
return preg_replace( '/<a(.*)>(.*)<\/a>/iU', sprintf( '<div class="read-more-button-wrap"><a$1><span class="faux-button">$2</span> <span class="screen-reader-text">"%1$s"</span></a></div>', get_the_title( get_the_ID() ) ), $html );
|
return preg_replace( '/<a(.*)>(.*)<\/a>/iU', sprintf( '<div class="read-more-button-wrap"><a$1><span class="faux-button">$2</span> <span class="screen-reader-text">"%1$s"</span></a></div>', get_the_title( get_the_ID() ) ), $html );
|
||||||
|
@ -15,7 +15,8 @@
|
|||||||
* Passes it through the `twentytwenty_starter_content` filter before returning.
|
* Passes it through the `twentytwenty_starter_content` filter before returning.
|
||||||
*
|
*
|
||||||
* @since Twenty Twenty 1.0
|
* @since Twenty Twenty 1.0
|
||||||
* @return array a filtered array of args for the starter_content.
|
*
|
||||||
|
* @return array A filtered array of args for the starter_content.
|
||||||
*/
|
*/
|
||||||
function twentytwenty_get_starter_content() {
|
function twentytwenty_get_starter_content() {
|
||||||
|
|
||||||
|
@ -21,13 +21,13 @@
|
|||||||
/**
|
/**
|
||||||
* Logo & Description
|
* Logo & Description
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Displays the site logo, either text or image.
|
* Displays the site logo, either text or image.
|
||||||
*
|
*
|
||||||
* @param array $args Arguments for displaying the site logo either as an image or text.
|
* @param array $args Arguments for displaying the site logo either as an image or text.
|
||||||
* @param boolean $echo Echo or return the HTML.
|
* @param boolean $echo Echo or return the HTML.
|
||||||
*
|
* @return string Compiled HTML based on our arguments.
|
||||||
* @return string $html Compiled HTML based on our arguments.
|
|
||||||
*/
|
*/
|
||||||
function twentytwenty_site_logo( $args = array(), $echo = true ) {
|
function twentytwenty_site_logo( $args = array(), $echo = true ) {
|
||||||
$logo = get_custom_logo();
|
$logo = get_custom_logo();
|
||||||
@ -89,8 +89,7 @@ function twentytwenty_site_logo( $args = array(), $echo = true ) {
|
|||||||
* Displays the site description.
|
* Displays the site description.
|
||||||
*
|
*
|
||||||
* @param boolean $echo Echo or return the html.
|
* @param boolean $echo Echo or return the html.
|
||||||
*
|
* @return string The HTML to display.
|
||||||
* @return string $html The HTML to display.
|
|
||||||
*/
|
*/
|
||||||
function twentytwenty_site_description( $echo = true ) {
|
function twentytwenty_site_description( $echo = true ) {
|
||||||
$description = get_bloginfo( 'description' );
|
$description = get_bloginfo( 'description' );
|
||||||
@ -124,11 +123,11 @@ function twentytwenty_site_description( $echo = true ) {
|
|||||||
/**
|
/**
|
||||||
* Comments
|
* Comments
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if the specified comment is written by the author of the post commented on.
|
* Checks if the specified comment is written by the author of the post commented on.
|
||||||
*
|
*
|
||||||
* @param object $comment Comment data.
|
* @param object $comment Comment data.
|
||||||
*
|
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
function twentytwenty_is_comment_by_post_author( $comment = null ) {
|
function twentytwenty_is_comment_by_post_author( $comment = null ) {
|
||||||
@ -149,13 +148,13 @@ function twentytwenty_is_comment_by_post_author( $comment = null ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter comment reply link to not JS scroll.
|
* Filters comment reply link to not JS scroll.
|
||||||
|
*
|
||||||
* Filter the comment reply link to add a class indicating it should not use JS slow-scroll, as it
|
* Filter the comment reply link to add a class indicating it should not use JS slow-scroll, as it
|
||||||
* makes it scroll to the wrong position on the page.
|
* makes it scroll to the wrong position on the page.
|
||||||
*
|
*
|
||||||
* @param string $link Link to the top of the page.
|
* @param string $link Link to the top of the page.
|
||||||
*
|
* @return string Link to the top of the page.
|
||||||
* @return string $link Link to the top of the page.
|
|
||||||
*/
|
*/
|
||||||
function twentytwenty_filter_comment_reply_link( $link ) {
|
function twentytwenty_filter_comment_reply_link( $link ) {
|
||||||
|
|
||||||
@ -169,11 +168,13 @@ add_filter( 'comment_reply_link', 'twentytwenty_filter_comment_reply_link' );
|
|||||||
/**
|
/**
|
||||||
* Post Meta
|
* Post Meta
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get and Output Post Meta.
|
* Retrieves and displays the post meta.
|
||||||
* If it's a single post, output the post meta values specified in the Customizer settings.
|
|
||||||
*
|
*
|
||||||
* @param int $post_id The ID of the post for which the post meta should be output.
|
* If it's a single post, outputs the post meta values specified in the Customizer settings.
|
||||||
|
*
|
||||||
|
* @param int $post_id The ID of the post for which the post meta should be output.
|
||||||
* @param string $location Which post meta location to output – single or preview.
|
* @param string $location Which post meta location to output – single or preview.
|
||||||
*/
|
*/
|
||||||
function twentytwenty_the_post_meta( $post_id = null, $location = 'single-top' ) {
|
function twentytwenty_the_post_meta( $post_id = null, $location = 'single-top' ) {
|
||||||
@ -220,7 +221,7 @@ function twentytwenty_edit_post_link( $link, $post_id, $text ) {
|
|||||||
add_filter( 'edit_post_link', 'twentytwenty_edit_post_link', 10, 3 );
|
add_filter( 'edit_post_link', 'twentytwenty_edit_post_link', 10, 3 );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the post meta.
|
* Retrieves the post meta.
|
||||||
*
|
*
|
||||||
* @param int $post_id The ID of the post.
|
* @param int $post_id The ID of the post.
|
||||||
* @param string $location The location where the meta is shown.
|
* @param string $location The location where the meta is shown.
|
||||||
@ -233,15 +234,17 @@ function twentytwenty_get_post_meta( $post_id = null, $location = 'single-top' )
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filters post types array
|
* Filters post types array.
|
||||||
*
|
*
|
||||||
* This filter can be used to hide post meta information of post, page or custom post type registerd by child themes or plugins
|
* This filter can be used to hide post meta information of post, page or custom post type
|
||||||
|
* registered by child themes or plugins.
|
||||||
*
|
*
|
||||||
* @since Twenty Twenty 1.0
|
* @since Twenty Twenty 1.0
|
||||||
*
|
*
|
||||||
* @param array Array of post types
|
* @param array Array of post types
|
||||||
*/
|
*/
|
||||||
$disallowed_post_types = apply_filters( 'twentytwenty_disallowed_post_types_for_meta_output', array( 'page' ) );
|
$disallowed_post_types = apply_filters( 'twentytwenty_disallowed_post_types_for_meta_output', array( 'page' ) );
|
||||||
|
|
||||||
// Check whether the post type is allowed to output post meta.
|
// Check whether the post type is allowed to output post meta.
|
||||||
if ( in_array( get_post_type( $post_id ), $disallowed_post_types, true ) ) {
|
if ( in_array( get_post_type( $post_id ), $disallowed_post_types, true ) ) {
|
||||||
return;
|
return;
|
||||||
@ -253,19 +256,19 @@ function twentytwenty_get_post_meta( $post_id = null, $location = 'single-top' )
|
|||||||
// Get the post meta settings for the location specified.
|
// Get the post meta settings for the location specified.
|
||||||
if ( 'single-top' === $location ) {
|
if ( 'single-top' === $location ) {
|
||||||
/**
|
/**
|
||||||
* Filters post meta info visibility
|
* Filters post meta info visibility.
|
||||||
*
|
*
|
||||||
* Use this filter to hide post meta information like Author, Post date, Comments, Is sticky status
|
* Use this filter to hide post meta information like Author, Post date, Comments, Is sticky status.
|
||||||
*
|
*
|
||||||
* @since Twenty Twenty 1.0
|
* @since Twenty Twenty 1.0
|
||||||
*
|
*
|
||||||
* @param array $args {
|
* @param array $args {
|
||||||
* @type string 'author'
|
* @type string 'author'
|
||||||
* @type string 'post-date'
|
* @type string 'post-date'
|
||||||
* @type string 'comments'
|
* @type string 'comments'
|
||||||
* @type string 'sticky'
|
* @type string 'sticky'
|
||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
$post_meta = apply_filters(
|
$post_meta = apply_filters(
|
||||||
'twentytwenty_post_meta_location_single_top',
|
'twentytwenty_post_meta_location_single_top',
|
||||||
array(
|
array(
|
||||||
@ -281,16 +284,16 @@ function twentytwenty_get_post_meta( $post_id = null, $location = 'single-top' )
|
|||||||
} elseif ( 'single-bottom' === $location ) {
|
} elseif ( 'single-bottom' === $location ) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filters post tags visibility
|
* Filters post tags visibility.
|
||||||
*
|
*
|
||||||
* Use this filter to hide post tags
|
* Use this filter to hide post tags.
|
||||||
*
|
*
|
||||||
* @since Twenty Twenty 1.0
|
* @since Twenty Twenty 1.0
|
||||||
*
|
*
|
||||||
* @param array $args {
|
* @param array $args {
|
||||||
* @type string 'tags'
|
* @type string 'tags'
|
||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
$post_meta = apply_filters(
|
$post_meta = apply_filters(
|
||||||
'twentytwenty_post_meta_location_single_bottom',
|
'twentytwenty_post_meta_location_single_bottom',
|
||||||
array(
|
array(
|
||||||
@ -489,8 +492,10 @@ function twentytwenty_get_post_meta( $post_id = null, $location = 'single-top' )
|
|||||||
/**
|
/**
|
||||||
* Menus
|
* Menus
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter Classes of wp_list_pages items to match menu items.
|
* Filters classes of wp_list_pages items to match menu items.
|
||||||
|
*
|
||||||
* Filter the class applied to wp_list_pages() items with children to match the menu class, to simplify.
|
* Filter the class applied to wp_list_pages() items with children to match the menu class, to simplify.
|
||||||
* styling of sub levels in the fallback. Only applied if the match_menu_classes argument is set.
|
* styling of sub levels in the fallback. Only applied if the match_menu_classes argument is set.
|
||||||
*
|
*
|
||||||
@ -499,7 +504,6 @@ function twentytwenty_get_post_meta( $post_id = null, $location = 'single-top' )
|
|||||||
* @param int $depth Depth of the current comment.
|
* @param int $depth Depth of the current comment.
|
||||||
* @param array $args An array of arguments.
|
* @param array $args An array of arguments.
|
||||||
* @param string $current_page Whether or not the item is the current item.
|
* @param string $current_page Whether or not the item is the current item.
|
||||||
*
|
|
||||||
* @return array $css_class CSS Class names.
|
* @return array $css_class CSS Class names.
|
||||||
*/
|
*/
|
||||||
function twentytwenty_filter_wp_list_pages_item_classes( $css_class, $item, $depth, $args, $current_page ) {
|
function twentytwenty_filter_wp_list_pages_item_classes( $css_class, $item, $depth, $args, $current_page ) {
|
||||||
@ -528,12 +532,11 @@ function twentytwenty_filter_wp_list_pages_item_classes( $css_class, $item, $dep
|
|||||||
add_filter( 'page_css_class', 'twentytwenty_filter_wp_list_pages_item_classes', 10, 5 );
|
add_filter( 'page_css_class', 'twentytwenty_filter_wp_list_pages_item_classes', 10, 5 );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a Sub Nav Toggle to the Expanded Menu and Mobile Menu.
|
* Adds a Sub Nav Toggle to the Expanded Menu and Mobile Menu.
|
||||||
*
|
*
|
||||||
* @param stdClass $args An array of arguments.
|
* @param stdClass $args An array of arguments.
|
||||||
* @param string $item Menu item.
|
* @param string $item Menu item.
|
||||||
* @param int $depth Depth of the current menu item.
|
* @param int $depth Depth of the current menu item.
|
||||||
*
|
|
||||||
* @return stdClass $args An object of wp_nav_menu() arguments.
|
* @return stdClass $args An object of wp_nav_menu() arguments.
|
||||||
*/
|
*/
|
||||||
function twentytwenty_add_sub_toggles_to_main_menu( $args, $item, $depth ) {
|
function twentytwenty_add_sub_toggles_to_main_menu( $args, $item, $depth ) {
|
||||||
@ -575,7 +578,7 @@ function twentytwenty_add_sub_toggles_to_main_menu( $args, $item, $depth ) {
|
|||||||
add_filter( 'nav_menu_item_args', 'twentytwenty_add_sub_toggles_to_main_menu', 10, 3 );
|
add_filter( 'nav_menu_item_args', 'twentytwenty_add_sub_toggles_to_main_menu', 10, 3 );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Display SVG icons in social links menu.
|
* Displays SVG icons in social links menu.
|
||||||
*
|
*
|
||||||
* @param string $item_output The menu item output.
|
* @param string $item_output The menu item output.
|
||||||
* @param WP_Post $item Menu item object.
|
* @param WP_Post $item Menu item object.
|
||||||
@ -601,9 +604,11 @@ add_filter( 'walker_nav_menu_start_el', 'twentytwenty_nav_menu_social_icons', 10
|
|||||||
/**
|
/**
|
||||||
* Classes
|
* Classes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add No-JS Class.
|
* Adds 'no-js' class.
|
||||||
* If we're missing JavaScript support, the HTML element will have a no-js class.
|
*
|
||||||
|
* If we're missing JavaScript support, the HTML element will have a 'no-js' class.
|
||||||
*/
|
*/
|
||||||
function twentytwenty_no_js_class() {
|
function twentytwenty_no_js_class() {
|
||||||
|
|
||||||
@ -616,11 +621,10 @@ function twentytwenty_no_js_class() {
|
|||||||
add_action( 'wp_head', 'twentytwenty_no_js_class' );
|
add_action( 'wp_head', 'twentytwenty_no_js_class' );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add conditional body classes.
|
* Adds conditional body classes.
|
||||||
*
|
*
|
||||||
* @param array $classes Classes added to the body tag.
|
* @param array $classes Classes added to the body tag.
|
||||||
*
|
* @return array Classes added to the body tag.
|
||||||
* @return array $classes Classes added to the body tag.
|
|
||||||
*/
|
*/
|
||||||
function twentytwenty_body_classes( $classes ) {
|
function twentytwenty_body_classes( $classes ) {
|
||||||
|
|
||||||
@ -716,12 +720,12 @@ add_filter( 'body_class', 'twentytwenty_body_classes' );
|
|||||||
/**
|
/**
|
||||||
* Archives
|
* Archives
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filters the archive title and styles the word before the first colon.
|
* Filters the archive title and styles the word before the first colon.
|
||||||
*
|
*
|
||||||
* @param string $title Current archive title.
|
* @param string $title Current archive title.
|
||||||
*
|
* @return string Current archive title.
|
||||||
* @return string $title Current archive title.
|
|
||||||
*/
|
*/
|
||||||
function twentytwenty_get_the_archive_title( $title ) {
|
function twentytwenty_get_the_archive_title( $title ) {
|
||||||
|
|
||||||
@ -748,10 +752,11 @@ add_filter( 'get_the_archive_title', 'twentytwenty_get_the_archive_title' );
|
|||||||
/**
|
/**
|
||||||
* Miscellaneous
|
* Miscellaneous
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Toggle animation duration in milliseconds.
|
* Toggles animation duration in milliseconds.
|
||||||
*
|
*
|
||||||
* @return integer Duration in milliseconds
|
* @return int Duration in milliseconds
|
||||||
*/
|
*/
|
||||||
function twentytwenty_toggle_duration() {
|
function twentytwenty_toggle_duration() {
|
||||||
/**
|
/**
|
||||||
@ -759,7 +764,7 @@ function twentytwenty_toggle_duration() {
|
|||||||
*
|
*
|
||||||
* @since Twenty Twenty 1.0
|
* @since Twenty Twenty 1.0
|
||||||
*
|
*
|
||||||
* @param integer $duration Duration in milliseconds.
|
* @param int $duration Duration in milliseconds.
|
||||||
*/
|
*/
|
||||||
$duration = apply_filters( 'twentytwenty_toggle_duration', 250 );
|
$duration = apply_filters( 'twentytwenty_toggle_duration', 250 );
|
||||||
|
|
||||||
@ -767,7 +772,7 @@ function twentytwenty_toggle_duration() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get unique ID.
|
* Gets unique ID.
|
||||||
*
|
*
|
||||||
* This is a PHP implementation of Underscore's uniqueId method. A static variable
|
* This is a PHP implementation of Underscore's uniqueId method. A static variable
|
||||||
* contains an integer that is incremented with each call. This number is returned
|
* contains an integer that is incremented with each call. This number is returned
|
||||||
|
@ -589,8 +589,9 @@ function block_version( $content ) {
|
|||||||
* @since 5.3.0
|
* @since 5.3.0
|
||||||
*
|
*
|
||||||
* @param string $block_name Block type name including namespace.
|
* @param string $block_name Block type name including namespace.
|
||||||
* @param array $style_properties Array containing the properties of the style name, label, style (name of the stylesheet to be enqueued), inline_style (string containing the CSS to be added).
|
* @param array $style_properties Array containing the properties of the style name,
|
||||||
*
|
* label, style (name of the stylesheet to be enqueued),
|
||||||
|
* inline_style (string containing the CSS to be added).
|
||||||
* @return boolean True if the block style was registered with success and false otherwise.
|
* @return boolean True if the block style was registered with success and false otherwise.
|
||||||
*/
|
*/
|
||||||
function register_block_style( $block_name, $style_properties ) {
|
function register_block_style( $block_name, $style_properties ) {
|
||||||
@ -604,7 +605,6 @@ function register_block_style( $block_name, $style_properties ) {
|
|||||||
*
|
*
|
||||||
* @param string $block_name Block type name including namespace.
|
* @param string $block_name Block type name including namespace.
|
||||||
* @param array $block_style_name Block style name.
|
* @param array $block_style_name Block style name.
|
||||||
*
|
|
||||||
* @return boolean True if the block style was unregistered with success and false otherwise.
|
* @return boolean True if the block style was unregistered with success and false otherwise.
|
||||||
*/
|
*/
|
||||||
function unregister_block_style( $block_name, $block_style_name ) {
|
function unregister_block_style( $block_name, $block_style_name ) {
|
||||||
|
@ -511,7 +511,6 @@ class WP_Http {
|
|||||||
*
|
*
|
||||||
* @param array $args Request arguments.
|
* @param array $args Request arguments.
|
||||||
* @param string $url URL to Request.
|
* @param string $url URL to Request.
|
||||||
*
|
|
||||||
* @return string|false Class name for the first transport that claims to support the request.
|
* @return string|false Class name for the first transport that claims to support the request.
|
||||||
* False if no transport claims to support the request.
|
* False if no transport claims to support the request.
|
||||||
*/
|
*/
|
||||||
|
@ -177,14 +177,12 @@ class WP_Date_Query {
|
|||||||
* Recursive-friendly query sanitizer.
|
* Recursive-friendly query sanitizer.
|
||||||
*
|
*
|
||||||
* Ensures that each query-level clause has a 'relation' key, and that
|
* Ensures that each query-level clause has a 'relation' key, and that
|
||||||
* each first-order clause contains all the necessary keys from
|
* each first-order clause contains all the necessary keys from `$defaults`.
|
||||||
* `$defaults`.
|
|
||||||
*
|
*
|
||||||
* @since 4.1.0
|
* @since 4.1.0
|
||||||
*
|
*
|
||||||
* @param array $queries
|
* @param array $queries
|
||||||
* @param array $parent_query
|
* @param array $parent_query
|
||||||
*
|
|
||||||
* @return array Sanitized queries.
|
* @return array Sanitized queries.
|
||||||
*/
|
*/
|
||||||
public function sanitize_query( $queries, $parent_query = null ) {
|
public function sanitize_query( $queries, $parent_query = null ) {
|
||||||
|
@ -209,7 +209,6 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
|
|||||||
*
|
*
|
||||||
* @param int $width
|
* @param int $width
|
||||||
* @param int $height
|
* @param int $height
|
||||||
*
|
|
||||||
* @return true|WP_Error
|
* @return true|WP_Error
|
||||||
*/
|
*/
|
||||||
protected function update_size( $width = null, $height = null ) {
|
protected function update_size( $width = null, $height = null ) {
|
||||||
|
@ -509,7 +509,6 @@ class WP_Network_Query {
|
|||||||
*
|
*
|
||||||
* @param string $string Search string.
|
* @param string $string Search string.
|
||||||
* @param string[] $columns Array of columns to search.
|
* @param string[] $columns Array of columns to search.
|
||||||
*
|
|
||||||
* @return string Search SQL.
|
* @return string Search SQL.
|
||||||
*/
|
*/
|
||||||
protected function get_search_sql( $string, $columns ) {
|
protected function get_search_sql( $string, $columns ) {
|
||||||
|
@ -80,7 +80,6 @@ class WP_Paused_Extensions_Storage {
|
|||||||
* @since 5.2.0
|
* @since 5.2.0
|
||||||
*
|
*
|
||||||
* @param string $extension Plugin or theme directory name.
|
* @param string $extension Plugin or theme directory name.
|
||||||
*
|
|
||||||
* @return bool True on success, false on failure.
|
* @return bool True on success, false on failure.
|
||||||
*/
|
*/
|
||||||
public function delete( $extension ) {
|
public function delete( $extension ) {
|
||||||
@ -121,7 +120,6 @@ class WP_Paused_Extensions_Storage {
|
|||||||
* @since 5.2.0
|
* @since 5.2.0
|
||||||
*
|
*
|
||||||
* @param string $extension Plugin or theme directory name.
|
* @param string $extension Plugin or theme directory name.
|
||||||
*
|
|
||||||
* @return array|null Error that is stored, or null if the extension is not paused.
|
* @return array|null Error that is stored, or null if the extension is not paused.
|
||||||
*/
|
*/
|
||||||
public function get( $extension ) {
|
public function get( $extension ) {
|
||||||
|
@ -101,7 +101,6 @@ final class WP_Recovery_Mode_Email_Service {
|
|||||||
* @param int $rate_limit Number of seconds before another email can be sent.
|
* @param int $rate_limit Number of seconds before another email can be sent.
|
||||||
* @param array $error Error details from {@see error_get_last()}
|
* @param array $error Error details from {@see error_get_last()}
|
||||||
* @param array $extension Extension that caused the error.
|
* @param array $extension Extension that caused the error.
|
||||||
*
|
|
||||||
* @return bool Whether the email was sent successfully.
|
* @return bool Whether the email was sent successfully.
|
||||||
*/
|
*/
|
||||||
private function send_recovery_mode_email( $rate_limit, $error, $extension ) {
|
private function send_recovery_mode_email( $rate_limit, $error, $extension ) {
|
||||||
|
@ -340,7 +340,6 @@ class WP_Recovery_Mode {
|
|||||||
* @global array $wp_theme_directories
|
* @global array $wp_theme_directories
|
||||||
*
|
*
|
||||||
* @param array $error Error that was triggered.
|
* @param array $error Error that was triggered.
|
||||||
*
|
|
||||||
* @return array|false {
|
* @return array|false {
|
||||||
* @type string $slug The extension slug. This is the plugin or theme's directory.
|
* @type string $slug The extension slug. This is the plugin or theme's directory.
|
||||||
* @type string $type The extension type. Either 'plugin' or 'theme'.
|
* @type string $type The extension type. Either 'plugin' or 'theme'.
|
||||||
|
@ -345,7 +345,6 @@ if ( ! function_exists( 'is_countable' ) ) {
|
|||||||
* @since 4.9.6
|
* @since 4.9.6
|
||||||
*
|
*
|
||||||
* @param mixed $var The value to check.
|
* @param mixed $var The value to check.
|
||||||
*
|
|
||||||
* @return bool True if `$var` is countable, false otherwise.
|
* @return bool True if `$var` is countable, false otherwise.
|
||||||
*/
|
*/
|
||||||
function is_countable( $var ) {
|
function is_countable( $var ) {
|
||||||
@ -367,7 +366,6 @@ if ( ! function_exists( 'is_iterable' ) ) {
|
|||||||
* @since 4.9.6
|
* @since 4.9.6
|
||||||
*
|
*
|
||||||
* @param mixed $var The value to check.
|
* @param mixed $var The value to check.
|
||||||
*
|
|
||||||
* @return bool True if `$var` is iterable, false otherwise.
|
* @return bool True if `$var` is iterable, false otherwise.
|
||||||
*/
|
*/
|
||||||
function is_iterable( $var ) {
|
function is_iterable( $var ) {
|
||||||
|
@ -57,7 +57,6 @@ function wp_embed_unregister_handler( $id, $priority = 10 ) {
|
|||||||
* @global int $content_width
|
* @global int $content_width
|
||||||
*
|
*
|
||||||
* @param string $url Optional. The URL that should be embedded. Default empty.
|
* @param string $url Optional. The URL that should be embedded. Default empty.
|
||||||
*
|
|
||||||
* @return array {
|
* @return array {
|
||||||
* Indexed array of the embed width and height in pixels.
|
* Indexed array of the embed width and height in pixels.
|
||||||
*
|
*
|
||||||
|
@ -42,7 +42,6 @@ function wp_paused_themes() {
|
|||||||
* @since 5.2.0
|
* @since 5.2.0
|
||||||
*
|
*
|
||||||
* @param array $error Error details {@see error_get_last()}
|
* @param array $error Error details {@see error_get_last()}
|
||||||
*
|
|
||||||
* @return string Formatted error description.
|
* @return string Formatted error description.
|
||||||
*/
|
*/
|
||||||
function wp_get_extension_error_description( $error ) {
|
function wp_get_extension_error_description( $error ) {
|
||||||
|
@ -100,7 +100,6 @@ function permalink_anchor( $mode = 'id' ) {
|
|||||||
*
|
*
|
||||||
* @param int|WP_Post $post Optional. Post ID or post object. Default is the global `$post`.
|
* @param int|WP_Post $post Optional. Post ID or post object. Default is the global `$post`.
|
||||||
* @param bool $leavename Optional. Whether to keep post name or page name. Default false.
|
* @param bool $leavename Optional. Whether to keep post name or page name. Default false.
|
||||||
*
|
|
||||||
* @return string|false The permalink URL or false if post does not exist.
|
* @return string|false The permalink URL or false if post does not exist.
|
||||||
*/
|
*/
|
||||||
function get_the_permalink( $post = 0, $leavename = false ) {
|
function get_the_permalink( $post = 0, $leavename = false ) {
|
||||||
@ -4437,7 +4436,6 @@ function the_privacy_policy_link( $before = '', $after = '' ) {
|
|||||||
*
|
*
|
||||||
* @param string $before Optional. Display before privacy policy link. Default empty.
|
* @param string $before Optional. Display before privacy policy link. Default empty.
|
||||||
* @param string $after Optional. Display after privacy policy link. Default empty.
|
* @param string $after Optional. Display after privacy policy link. Default empty.
|
||||||
*
|
|
||||||
* @return string Markup for the link and surrounding elements. Empty string if it
|
* @return string Markup for the link and surrounding elements. Empty string if it
|
||||||
* doesn't exist.
|
* doesn't exist.
|
||||||
*/
|
*/
|
||||||
|
@ -715,10 +715,12 @@ function rest_send_allow_header( $response, $server, $request ) {
|
|||||||
/**
|
/**
|
||||||
* Recursively computes the intersection of arrays using keys for comparison.
|
* Recursively computes the intersection of arrays using keys for comparison.
|
||||||
*
|
*
|
||||||
|
* @since 5.3.0
|
||||||
|
*
|
||||||
* @param array $array1 The array with master keys to check.
|
* @param array $array1 The array with master keys to check.
|
||||||
* @param array $array2 An array to compare keys against.
|
* @param array $array2 An array to compare keys against.
|
||||||
*
|
* @return array An associative array containing all the entries of array1 which have keys
|
||||||
* @return array An associative array containing all the entries of array1 which have keys that are present in all arguments.
|
* that are present in all arguments.
|
||||||
*/
|
*/
|
||||||
function _rest_array_intersect_key_recursive( $array1, $array2 ) {
|
function _rest_array_intersect_key_recursive( $array1, $array2 ) {
|
||||||
$array1 = array_intersect_key( $array1, $array2 );
|
$array1 = array_intersect_key( $array1, $array2 );
|
||||||
@ -738,7 +740,6 @@ function _rest_array_intersect_key_recursive( $array1, $array2 ) {
|
|||||||
* @param WP_REST_Response $response Current response being served.
|
* @param WP_REST_Response $response Current response being served.
|
||||||
* @param WP_REST_Server $server ResponseHandler instance (usually WP_REST_Server).
|
* @param WP_REST_Server $server ResponseHandler instance (usually WP_REST_Server).
|
||||||
* @param WP_REST_Request $request The request that was used to make current response.
|
* @param WP_REST_Request $request The request that was used to make current response.
|
||||||
*
|
|
||||||
* @return WP_REST_Response Response to be served, trimmed down to contain a subset of fields.
|
* @return WP_REST_Response Response to be served, trimmed down to contain a subset of fields.
|
||||||
*/
|
*/
|
||||||
function rest_filter_response_fields( $response, $server, $request ) {
|
function rest_filter_response_fields( $response, $server, $request ) {
|
||||||
|
@ -402,7 +402,6 @@ class WP_REST_Request implements ArrayAccess {
|
|||||||
* @since 5.3.0
|
* @since 5.3.0
|
||||||
*
|
*
|
||||||
* @param string $key Parameter name.
|
* @param string $key Parameter name.
|
||||||
*
|
|
||||||
* @return bool True if a param exists for the given key.
|
* @return bool True if a param exists for the given key.
|
||||||
*/
|
*/
|
||||||
public function has_param( $key ) {
|
public function has_param( $key ) {
|
||||||
|
@ -399,7 +399,6 @@ class WP_REST_Autosaves_Controller extends WP_REST_Revisions_Controller {
|
|||||||
*
|
*
|
||||||
* @param WP_Post $post Post revision object.
|
* @param WP_Post $post Post revision object.
|
||||||
* @param WP_REST_Request $request Request object.
|
* @param WP_REST_Request $request Request object.
|
||||||
*
|
|
||||||
* @return WP_REST_Response Response object.
|
* @return WP_REST_Response Response object.
|
||||||
*/
|
*/
|
||||||
public function prepare_item_for_response( $post, $request ) {
|
public function prepare_item_for_response( $post, $request ) {
|
||||||
|
@ -161,7 +161,6 @@ class WP_REST_Users_Controller extends WP_REST_Controller {
|
|||||||
* @param int|bool $value The value passed to the reassign parameter.
|
* @param int|bool $value The value passed to the reassign parameter.
|
||||||
* @param WP_REST_Request $request Full details about the request.
|
* @param WP_REST_Request $request Full details about the request.
|
||||||
* @param string $param The parameter that is being sanitized.
|
* @param string $param The parameter that is being sanitized.
|
||||||
*
|
|
||||||
* @return int|bool|WP_Error
|
* @return int|bool|WP_Error
|
||||||
*/
|
*/
|
||||||
public function check_reassign( $value, $request, $param ) {
|
public function check_reassign( $value, $request, $param ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user