Docs: Various docblock corrections for code added in 5.8.
Props johnbillion. See #53461. Built from https://develop.svn.wordpress.org/trunk@51221 git-svn-id: http://core.svn.wordpress.org/trunk@50830 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a048ac3ccd
commit
fccc020d29
|
@ -10,7 +10,7 @@
|
||||||
/**
|
/**
|
||||||
* Returns the list of default categories for block types.
|
* Returns the list of default categories for block types.
|
||||||
*
|
*
|
||||||
* @since 5.8.0.
|
* @since 5.8.0
|
||||||
*
|
*
|
||||||
* @return array[] Array of categories for block types.
|
* @return array[] Array of categories for block types.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -45,7 +45,7 @@ function wp_register_border_support( $block_type ) {
|
||||||
* @since 5.8.0
|
* @since 5.8.0
|
||||||
* @access private
|
* @access private
|
||||||
*
|
*
|
||||||
* @param WP_Block_type $block_type Block type.
|
* @param WP_Block_Type $block_type Block type.
|
||||||
* @param array $block_attributes Block attributes.
|
* @param array $block_attributes Block attributes.
|
||||||
*
|
*
|
||||||
* @return array Border CSS classes and inline styles.
|
* @return array Border CSS classes and inline styles.
|
||||||
|
@ -123,7 +123,7 @@ function wp_apply_border_support( $block_type, $block_attributes ) {
|
||||||
* @since 5.8.0
|
* @since 5.8.0
|
||||||
* @access private
|
* @access private
|
||||||
*
|
*
|
||||||
* @param WP_Block_type $block_type Block type.
|
* @param WP_Block_Type $block_type Block type.
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -56,9 +56,8 @@ function _build_template_result_from_post( $post ) {
|
||||||
* @type array $slug__in List of slugs to include.
|
* @type array $slug__in List of slugs to include.
|
||||||
* @type int $wp_id Post ID of customized template.
|
* @type int $wp_id Post ID of customized template.
|
||||||
* }
|
* }
|
||||||
* @param string $template_type wp_template.
|
* @param string $template_type Optional. The template type (post type). Default 'wp_template'.
|
||||||
*
|
* @return WP_Block_Template[] Block template objects.
|
||||||
* @return array Templates.
|
|
||||||
*/
|
*/
|
||||||
function get_block_templates( $query = array(), $template_type = 'wp_template' ) {
|
function get_block_templates( $query = array(), $template_type = 'wp_template' ) {
|
||||||
$wp_query_args = array(
|
$wp_query_args = array(
|
||||||
|
|
|
@ -93,10 +93,8 @@ function locate_block_template( $template, $type, array $templates ) {
|
||||||
* @access private
|
* @access private
|
||||||
* @since 5.8.0
|
* @since 5.8.0
|
||||||
*
|
*
|
||||||
* Accepts an optional $template_hierarchy argument as a hint.
|
|
||||||
*
|
|
||||||
* @param string $template_type The current template type.
|
* @param string $template_type The current template type.
|
||||||
* @param string[] $template_hierarchy (optional) The current template hierarchy, ordered by priority.
|
* @param string[] $template_hierarchy The current template hierarchy, ordered by priority.
|
||||||
* @return WP_Block_Template|null template A template object, or null if none could be found.
|
* @return WP_Block_Template|null template A template object, or null if none could be found.
|
||||||
*/
|
*/
|
||||||
function resolve_block_template( $template_type, $template_hierarchy ) {
|
function resolve_block_template( $template_type, $template_hierarchy ) {
|
||||||
|
@ -187,10 +185,10 @@ function get_the_block_template_html() {
|
||||||
/**
|
/**
|
||||||
* Renders a 'viewport' meta tag.
|
* Renders a 'viewport' meta tag.
|
||||||
*
|
*
|
||||||
|
* This is hooked into {@see 'wp_head'} to decouple its output from the default template canvas.
|
||||||
|
*
|
||||||
* @access private
|
* @access private
|
||||||
* @since 5.8.0
|
* @since 5.8.0
|
||||||
*
|
|
||||||
* This is hooked into {@see 'wp_head'} to decouple its output from the default template canvas.
|
|
||||||
*/
|
*/
|
||||||
function _block_template_viewport_meta_tag() {
|
function _block_template_viewport_meta_tag() {
|
||||||
echo '<meta name="viewport" content="width=device-width, initial-scale=1" />' . "\n";
|
echo '<meta name="viewport" content="width=device-width, initial-scale=1" />' . "\n";
|
||||||
|
|
|
@ -214,8 +214,6 @@ function register_block_type_from_metadata( $file_or_folder, $args = array() ) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add `style` and `editor_style` for core blocks if missing.
|
* Add `style` and `editor_style` for core blocks if missing.
|
||||||
*
|
|
||||||
* @since 5.8.0
|
|
||||||
*/
|
*/
|
||||||
if ( ! empty( $metadata['name'] ) && 0 === strpos( $metadata['name'], 'core/' ) ) {
|
if ( ! empty( $metadata['name'] ) && 0 === strpos( $metadata['name'], 'core/' ) ) {
|
||||||
$block_name = str_replace( 'core/', '', $metadata['name'] );
|
$block_name = str_replace( 'core/', '', $metadata['name'] );
|
||||||
|
|
|
@ -326,12 +326,11 @@ abstract class WP_Image_Editor {
|
||||||
*
|
*
|
||||||
* @since 5.8.0
|
* @since 5.8.0
|
||||||
*
|
*
|
||||||
* @param array $output_format {
|
* @param string[] $output_format {
|
||||||
* An array of mime type mappings. Maps a source mime type to a new
|
* An array of mime type mappings. Maps a source mime type to a new
|
||||||
* destination mime type. Default empty array.
|
* destination mime type. Default empty array.
|
||||||
*
|
*
|
||||||
* @type array $mime_type The source mime type {
|
* @type string ...$0 The new mime type.
|
||||||
* @type string $mime_type The new mime type.
|
|
||||||
* }
|
* }
|
||||||
* @param string $filename Path to the image.
|
* @param string $filename Path to the image.
|
||||||
* @param string $mime_type The source image mime type.
|
* @param string $mime_type The source image mime type.
|
||||||
|
|
|
@ -265,7 +265,7 @@ class WP_Theme_JSON_Resolver {
|
||||||
*
|
*
|
||||||
* @since 5.8.0
|
* @since 5.8.0
|
||||||
*
|
*
|
||||||
* @param array $theme_support_data Theme support data in theme.json format.
|
* @param array $theme_support_data Theme support data in theme.json format. Default empty array.
|
||||||
* @return WP_Theme_JSON Entity that holds theme data.
|
* @return WP_Theme_JSON Entity that holds theme data.
|
||||||
*/
|
*/
|
||||||
public static function get_theme_data( $theme_support_data = array() ) {
|
public static function get_theme_data( $theme_support_data = array() ) {
|
||||||
|
@ -318,7 +318,9 @@ class WP_Theme_JSON_Resolver {
|
||||||
/**
|
/**
|
||||||
* Whether the current theme has a theme.json file.
|
* Whether the current theme has a theme.json file.
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @since 5.8.0
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public static function theme_has_support() {
|
public static function theme_has_support() {
|
||||||
if ( ! isset( self::$theme_has_support ) ) {
|
if ( ! isset( self::$theme_has_support ) ) {
|
||||||
|
|
|
@ -613,9 +613,6 @@ class WP_Theme_JSON {
|
||||||
* Given a selector and a declaration list,
|
* Given a selector and a declaration list,
|
||||||
* creates the corresponding ruleset.
|
* creates the corresponding ruleset.
|
||||||
*
|
*
|
||||||
* To help debugging, will add some space
|
|
||||||
* if SCRIPT_DEBUG is defined and true.
|
|
||||||
*
|
|
||||||
* @since 5.8.0
|
* @since 5.8.0
|
||||||
*
|
*
|
||||||
* @param string $selector CSS selector.
|
* @param string $selector CSS selector.
|
||||||
|
@ -731,12 +728,10 @@ class WP_Theme_JSON {
|
||||||
* for the presets and adds them to the $declarations array
|
* for the presets and adds them to the $declarations array
|
||||||
* following the format:
|
* following the format:
|
||||||
*
|
*
|
||||||
* ```php
|
|
||||||
* array(
|
* array(
|
||||||
* 'name' => 'property_name',
|
* 'name' => 'property_name',
|
||||||
* 'value' => 'property_value,
|
* 'value' => 'property_value,
|
||||||
* )
|
* )
|
||||||
* ```
|
|
||||||
*
|
*
|
||||||
* @since 5.8.0
|
* @since 5.8.0
|
||||||
*
|
*
|
||||||
|
@ -765,12 +760,10 @@ class WP_Theme_JSON {
|
||||||
* for the custom values and adds them to the $declarations
|
* for the custom values and adds them to the $declarations
|
||||||
* array following the format:
|
* array following the format:
|
||||||
*
|
*
|
||||||
* ```php
|
|
||||||
* array(
|
* array(
|
||||||
* 'name' => 'property_name',
|
* 'name' => 'property_name',
|
||||||
* 'value' => 'property_value,
|
* 'value' => 'property_value,
|
||||||
* )
|
* )
|
||||||
* ```
|
|
||||||
*
|
*
|
||||||
* @since 5.8.0
|
* @since 5.8.0
|
||||||
*
|
*
|
||||||
|
@ -856,12 +849,10 @@ class WP_Theme_JSON {
|
||||||
* Given a styles array, it extracts the style properties
|
* Given a styles array, it extracts the style properties
|
||||||
* and adds them to the $declarations array following the format:
|
* and adds them to the $declarations array following the format:
|
||||||
*
|
*
|
||||||
* ```php
|
|
||||||
* array(
|
* array(
|
||||||
* 'name' => 'property_name',
|
* 'name' => 'property_name',
|
||||||
* 'value' => 'property_value,
|
* 'value' => 'property_value,
|
||||||
* )
|
* )
|
||||||
* ```
|
|
||||||
*
|
*
|
||||||
* @since 5.8.0
|
* @since 5.8.0
|
||||||
*
|
*
|
||||||
|
|
|
@ -667,7 +667,7 @@ function wp_start_object_cache() {
|
||||||
// Only perform the following checks once.
|
// Only perform the following checks once.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filters whether to enable loading of the objectcache.php drop-in.
|
* Filters whether to enable loading of the object-cache.php drop-in.
|
||||||
*
|
*
|
||||||
* This filter runs before it can be used by plugins. It is designed for non-web
|
* This filter runs before it can be used by plugins. It is designed for non-web
|
||||||
* run-times. If false is returned, object-cache.php will never be loaded.
|
* run-times. If false is returned, object-cache.php will never be loaded.
|
||||||
|
|
|
@ -4356,7 +4356,7 @@ function wp_enqueue_media( $args = array() ) {
|
||||||
*
|
*
|
||||||
* @since 5.8.0
|
* @since 5.8.0
|
||||||
*
|
*
|
||||||
* @param bool $value The filtered value, defaults to `false`.
|
* @param bool $infinite Whether the Media Library grid has infinite scrolling.
|
||||||
*/
|
*/
|
||||||
$infinite_scrolling = apply_filters( 'media_library_infinite_scrolling', false );
|
$infinite_scrolling = apply_filters( 'media_library_infinite_scrolling', false );
|
||||||
|
|
||||||
|
|
|
@ -42,8 +42,6 @@ class WP_REST_Templates_Controller extends WP_REST_Controller {
|
||||||
* Registers the controllers routes.
|
* Registers the controllers routes.
|
||||||
*
|
*
|
||||||
* @since 5.8.0
|
* @since 5.8.0
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
*/
|
||||||
public function register_routes() {
|
public function register_routes() {
|
||||||
// Lists all templates.
|
// Lists all templates.
|
||||||
|
|
|
@ -2603,7 +2603,7 @@ function wp_maybe_inline_styles() {
|
||||||
*
|
*
|
||||||
* @since 5.8.0
|
* @since 5.8.0
|
||||||
*
|
*
|
||||||
* @param int $total_inline_limit The file-size threshold, in bytes. Defaults to 20000.
|
* @param int $total_inline_limit The file-size threshold, in bytes. Default 20000.
|
||||||
*/
|
*/
|
||||||
$total_inline_limit = apply_filters( 'styles_inline_size_limit', $total_inline_limit );
|
$total_inline_limit = apply_filters( 'styles_inline_size_limit', $total_inline_limit );
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.8-beta3-51220';
|
$wp_version = '5.8-beta3-51221';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
|
@ -98,7 +98,7 @@ class WP_Widget_Block extends WP_Widget {
|
||||||
*
|
*
|
||||||
* @since 5.8.0
|
* @since 5.8.0
|
||||||
*
|
*
|
||||||
* @param array $content The HTML content of the current block widget.
|
* @param string $content The HTML content of the current block widget.
|
||||||
*
|
*
|
||||||
* @return string The classname to use in the block widget's container HTML.
|
* @return string The classname to use in the block widget's container HTML.
|
||||||
*/
|
*/
|
||||||
|
@ -191,9 +191,9 @@ class WP_Widget_Block extends WP_Widget {
|
||||||
*
|
*
|
||||||
* @since 5.8.0
|
* @since 5.8.0
|
||||||
*
|
*
|
||||||
* @param array $instance Current instance.
|
|
||||||
*
|
|
||||||
* @see WP_Widget_Custom_HTML::render_control_template_scripts()
|
* @see WP_Widget_Custom_HTML::render_control_template_scripts()
|
||||||
|
*
|
||||||
|
* @param array $instance Current instance.
|
||||||
*/
|
*/
|
||||||
public function form( $instance ) {
|
public function form( $instance ) {
|
||||||
$instance = wp_parse_args( (array) $instance, $this->default_instance );
|
$instance = wp_parse_args( (array) $instance, $this->default_instance );
|
||||||
|
|
Loading…
Reference in New Issue