diff --git a/wp-includes/post.php b/wp-includes/post.php index ac29d9628f..54e6c14f3b 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -1742,7 +1742,7 @@ function _add_post_type_submenus() { } /** - * Register support of certain features for a post type. + * Registers support of certain features for a post type. * * All core features are directly associated with a functional area of the edit * screen, such as the editor or a meta box. Features include: 'title', 'editor', @@ -1753,6 +1753,16 @@ function _add_post_type_submenus() { * store revisions, and the 'comments' feature dictates whether the comments * count will show on the edit screen. * + * Example usage: + * + * add_post_type_support( 'my_post_type', 'comments' ); + * add_post_type_support( 'my_post_type', array( + * 'author', 'excerpt', + * ) ); + * add_post_type_support( 'my_post_type', 'my_feature', array( + * 'field' => 'value', + * ) ); + * * @since 3.0.0 * * @global array $_wp_post_type_features @@ -1760,6 +1770,7 @@ function _add_post_type_submenus() { * @param string $post_type The post type for which to add the feature. * @param string|array $feature The feature being added, accepts an array of * feature strings or a single string. + * @param mixed ...$args Optional extra arguments to pass along with certain features. */ function add_post_type_support( $post_type, $feature ) { global $_wp_post_type_features; diff --git a/wp-includes/theme.php b/wp-includes/theme.php index 1682fdbdab..b6b0989a3e 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -2318,6 +2318,14 @@ function get_theme_starter_content() { * If attached to a hook, it must be {@see 'after_setup_theme'}. * The {@see 'init'} hook may be too late for some features. * + * Example usage: + * + * add_theme_support( 'title-tag' ); + * add_theme_support( 'custom-logo', array( + * 'height' => 480, + * 'width' => 720, + * ) ); + * * @since 2.9.0 * @since 3.6.0 The `html5` feature was added * @since 3.9.0 The `html5` feature now also accepts 'gallery' and 'caption' @@ -2636,11 +2644,17 @@ function _custom_logo_header_styles() { /** * Gets the theme support arguments passed when registering that support * + * Example usage: + * + * get_theme_support( 'custom-logo' ); + * get_theme_support( 'custom-header', 'width' ); + * * @since 3.1.0 * * @global array $_wp_theme_features * * @param string $feature The feature to check. + * @param mixed ...$args Optional extra arguments to be checked against certain features. * @return mixed The array of extra arguments or the value for the registered feature. */ function get_theme_support( $feature ) { @@ -2751,11 +2765,17 @@ function _remove_theme_support( $feature ) { /** * Checks a theme's support for a given feature. * + * Example usage: + * + * current_theme_supports( 'custom-logo' ); + * current_theme_supports( 'html5', 'comment-form' ); + * * @since 2.9.0 * * @global array $_wp_theme_features * * @param string $feature The feature being checked. + * @param mixed ...$args Optional extra arguments to be checked against certain features. * @return bool True if the current theme supports the feature, false otherwise. */ function current_theme_supports( $feature ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index efb208d174..b926a36190 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.3-alpha-45421'; +$wp_version = '5.3-alpha-45422'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.