mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-12 13:44:21 +01:00
Twenty Fifteen, Twenty Seventeen: Add documentation to filters in themes.
Documents a missing one Twenty Fifteen and all four missing ones in Twenty Seventeen. Props brainstormforce. Fixes #38382. Built from https://develop.svn.wordpress.org/trunk@38846 git-svn-id: http://core.svn.wordpress.org/trunk@38789 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3dc7e8a97c
commit
89b20fcf8f
@ -118,6 +118,19 @@ function twentyfifteen_setup() {
|
||||
$default_color = trim( $color_scheme[0], '#' );
|
||||
|
||||
// Setup the WordPress core custom background feature.
|
||||
|
||||
/**
|
||||
* Filter Twenty Fifteen custom-header support arguments.
|
||||
*
|
||||
* @since Twenty Fifteen 1.0
|
||||
*
|
||||
* @param array $args {
|
||||
* An array of custom-header support arguments.
|
||||
*
|
||||
* @type string $default-color Default color of the header.
|
||||
* @type string $default-attachment Default attachment of the header.
|
||||
* }
|
||||
*/
|
||||
add_theme_support( 'custom-background', apply_filters( 'twentyfifteen_custom_background_args', array(
|
||||
'default-color' => $default_color,
|
||||
'default-attachment' => 'fixed',
|
||||
|
@ -117,6 +117,13 @@ function twentyseventeen_content_width() {
|
||||
$content_width = 1120;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter Twenty Seventeen content width of the theme.
|
||||
*
|
||||
* @since Twenty Seventeen 1.0
|
||||
*
|
||||
* @param $content_width integer
|
||||
*/
|
||||
$GLOBALS['content_width'] = apply_filters( 'twentyseventeen_content_width', $content_width );
|
||||
}
|
||||
add_action( 'after_setup_theme', 'twentyseventeen_content_width', 0 );
|
||||
|
@ -12,6 +12,14 @@
|
||||
*/
|
||||
function twentyseventeen_custom_colors_css() {
|
||||
$hue = get_theme_mod( 'colorscheme_hue', 250 );
|
||||
|
||||
/**
|
||||
* Filter Twenty Seventeen default saturation level.
|
||||
*
|
||||
* @since Twenty Seventeen 1.0
|
||||
*
|
||||
* @param $saturation integer
|
||||
*/
|
||||
$saturation = apply_filters( 'twentyseventeen_custom_colors_saturation', 50 );
|
||||
$reduced_saturation = ( .8 * $saturation ) . '%';
|
||||
$saturation = $saturation . '%';
|
||||
|
@ -15,6 +15,24 @@
|
||||
* @uses twentyseventeen_header_style()
|
||||
*/
|
||||
function twentyseventeen_custom_header_setup() {
|
||||
|
||||
/**
|
||||
* Filter Twenty Seventeen custom-header support arguments.
|
||||
*
|
||||
* @since Twenty Seventeen 1.0
|
||||
*
|
||||
* @param array $args {
|
||||
* An array of custom-header support arguments.
|
||||
*
|
||||
* @type string $default-image Default image of the header.
|
||||
* @type string $default_text_color Default color of the header text.
|
||||
* @type int $width Width in pixels of the custom header image. Default 954.
|
||||
* @type int $height Height in pixels of the custom header image. Default 1300.
|
||||
* @type string $wp-head-callback Callback function used to styles the header image and text
|
||||
* displayed on the blog.
|
||||
* @type string $flex-height Flex support for height of header.
|
||||
* }
|
||||
*/
|
||||
add_theme_support( 'custom-header', apply_filters( 'twentyseventeen_custom_header_args', array(
|
||||
'default-image' => get_parent_theme_file_uri( '/assets/images/header.jpg' ),
|
||||
'default-text-color' => 'ffffff',
|
||||
|
@ -195,5 +195,12 @@ function twentyseventeen_social_links_icons() {
|
||||
'youtube.com' => 'youtube',
|
||||
);
|
||||
|
||||
/**
|
||||
* Filter Twenty Seventeen social links icons.
|
||||
*
|
||||
* @since Twenty Seventeen 1.0
|
||||
*
|
||||
* @param array $social_links_icons
|
||||
*/
|
||||
return apply_filters( 'twentyseventeen_social_links_icons', $social_links_icons );
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.7-alpha-38845';
|
||||
$wp_version = '4.7-alpha-38846';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user