Ticket #30149: 30149.5.diff
File 30149.5.diff, 9.1 KB (added by , 10 years ago) |
---|
-
src/wp-content/themes/twentyfifteen/functions.php
147 147 * 148 148 * @since Twenty Fifteen 1.0 149 149 * 150 * @return string 150 * @return string Google fonts URL for the theme. 151 151 */ 152 152 function twentyfifteen_fonts_url() { 153 153 $fonts = array(); … … 245 245 * Add featured image as background image to post navigation elements. 246 246 * 247 247 * @since Twenty Fifteen 1.0 248 * 249 * @see wp_add_inline_style() 248 250 */ 249 251 function twentyfifteen_post_nav_background() { 250 252 if ( ! is_single() ) { … … 290 292 * @param WP_Post $item Menu item object. 291 293 * @param int $depth Depth of the menu. 292 294 * @param array $args wp_nav_menu() arguments. 293 *294 295 * @return string Menu item with possible description. 295 296 */ 296 297 function twentyfifteen_nav_description( $item_output, $item, $depth, $args ) { … … 307 308 * 308 309 * @since Twenty Fifteen 1.0 309 310 * 310 * @param string $html Search form HTML 311 * 312 * @return string Modified search form HTML 311 * @param string $html Search form HTML. 312 * @return string Modified search form HTML. 313 313 */ 314 314 function twentyfifteen_search_form_modify( $html ) { 315 315 return str_replace( 'class="search-submit"', 'class="search-submit screen-reader-text"', $html ); -
src/wp-content/themes/twentyfifteen/inc/back-compat.php
1 1 <?php 2 2 /** 3 * Twenty Fifteen back compat functionality .3 * Twenty Fifteen back compat functionality 4 4 * 5 5 * Prevents Twenty Fifteen from running on WordPress versions prior to 4.1, 6 * since this theme is not meant to be backward compatible beyond that 7 * andrelies on many newer functions and markup changes introduced in 4.1.6 * since this theme is not meant to be backward compatible beyond that and 7 * relies on many newer functions and markup changes introduced in 4.1. 8 8 * 9 9 * @package WordPress 10 10 * @subpackage Twenty_Fifteen … … 60 60 wp_die( sprintf( __( 'Twenty Fifteen requires at least WordPress version 4.1. You are running version %s. Please upgrade and try again.', 'twentyfifteen' ), $GLOBALS['wp_version'] ) ); 61 61 } 62 62 } 63 add_action( 'template_redirect', 'twentyfifteen_preview' ); 64 No newline at end of file 63 add_action( 'template_redirect', 'twentyfifteen_preview' ); -
src/wp-content/themes/twentyfifteen/inc/custom-header.php
1 1 <?php 2 2 /** 3 * Implement Custom Header functionality for Twenty Fifteen.3 * Custom Header functionality for Twenty Fifteen 4 4 * 5 5 * @package WordPress 6 6 * @subpackage Twenty_Fifteen … … 10 10 /** 11 11 * Set up the WordPress core custom header feature. 12 12 * 13 * @uses twentyfifteen_header_style() 14 * @uses twentyfifteen_admin_header_image() 13 * @see twentyfifteen_header_style(), twentyfifteen_admin_header_image() 15 14 */ 16 15 function twentyfifteen_custom_header_setup() { 17 16 $color_scheme = twentyfifteen_get_color_scheme(); … … 50 49 * @since Twenty Fifteen 1.0 51 50 * 52 51 * @param string $color The original color, in 3- or 6-digit hexadecimal form. 53 * @return array 52 * @return array Array containing RGB (red, green, and blue) values for the given 53 * HEX code, empty array otherwise. 54 54 */ 55 55 function twentyfifteen_hex2rgb( $color ) { 56 56 $color = trim( $color, '#' ); … … 75 75 * Styles the header image and text displayed on the blog. 76 76 * 77 77 * @since Twenty Fifteen 1.0 78 * @see twentyfifteen_custom_header_setup(). 78 * 79 * @see twentyfifteen_custom_header_setup() 79 80 */ 80 81 function twentyfifteen_header_style() { 81 82 $header_image = get_header_image(); … … 135 136 * Custom header image markup displayed on the Appearance > Header admin panel. 136 137 * 137 138 * @since Twenty Fifteen 1.0 138 * @see twentyfifteen_custom_header_setup(). 139 * 140 * @see twentyfifteen_custom_header_setup() 139 141 */ 140 142 function twentyfifteen_admin_header_image() { 141 143 $style = sprintf( ' style="color: #%s;"', esc_attr( get_header_textcolor() ) ); … … 154 156 * Enqueues front-end CSS for the header background color. 155 157 * 156 158 * @since Twenty Fifteen 1.0 159 * 160 * @see wp_add_inline_style() 157 161 */ 158 162 function twentyfifteen_header_background_color_css() { 159 163 $color_scheme = twentyfifteen_get_color_scheme(); -
src/wp-content/themes/twentyfifteen/inc/customizer.php
1 1 <?php 2 2 /** 3 * Twenty Fifteen Customizer .3 * Twenty Fifteen Customizer functionality 4 4 * 5 5 * @package WordPress 6 6 * @subpackage Twenty_Fifteen … … 76 76 77 77 /** 78 78 * Register color schemes for Twenty Fifteen. 79 * Can be filtered with twentyfifteen_color_schemes.80 79 * 80 * Can be filtered with {@see 'twentyfifteen_color_schemes'}. 81 * 81 82 * The order of colors in a colors array: 82 83 * 1. Main Background Color. 83 84 * 2. Sidebar Background Color. … … 163 164 164 165 if ( ! function_exists( 'twentyfifteen_get_color_scheme' ) ) : 165 166 /** 166 * Returns an array of either the current or default color scheme hex values.167 * Get the current Twenty Fifteen color scheme. 167 168 * 168 169 * @since Twenty Fifteen 1.0 169 170 * 170 * @return array 171 * @return array An associative array of either the current or default color scheme hex values. 171 172 */ 172 173 function twentyfifteen_get_color_scheme() { 173 174 $color_scheme_option = get_theme_mod( 'color_scheme', 'default' ); … … 187 188 * 188 189 * @since Twenty Fifteen 1.0 189 190 * 190 * @return array 191 * @return array Array of color schemes. 191 192 */ 192 193 function twentyfifteen_get_color_scheme_choices() { 193 194 $color_schemes = twentyfifteen_get_color_schemes(); … … 208 209 * @since Twenty Fifteen 1.0 209 210 * 210 211 * @param string $value Color scheme name value. 211 *212 212 * @return string Color scheme name. 213 213 */ 214 214 function twentyfifteen_sanitize_color_scheme( $value ) { … … 226 226 * Enqueues front-end CSS for color scheme. 227 227 * 228 228 * @since Twenty Fifteen 1.0 229 * 230 * @see wp_add_inline_style() 229 231 */ 230 232 function twentyfifteen_color_scheme_css() { 231 233 $color_scheme_option = get_theme_mod( 'color_scheme', 'default' ); … … 242 244 243 245 /** 244 246 * Binds JS listener to make Customizer color_scheme control. 247 * 245 248 * Passes color scheme data as colorScheme global. 246 249 * 247 250 * @since Twenty Fifteen 1.0 … … 265 268 /** 266 269 * Output an Underscore template for generating CSS for the color scheme. 267 270 * 268 * The template generates the css dynamically for instant display in the Customizer preview,269 * and to be saved in a `theme_mod` for display on the front-end.271 * The template generates the css dynamically for instant display in the Customizer 272 * preview, and to be saved in a `theme_mod` for display on the front-end. 270 273 * 271 274 * @since Twenty Fifteen 1.0 272 275 */ -
src/wp-content/themes/twentyfifteen/inc/template-tags.php
1 1 <?php 2 2 /** 3 * Custom template tags for this theme.3 * Custom template tags for Twenty Fifteen 4 4 * 5 5 * Eventually, some of the functionality here could be replaced by core features. 6 6 * … … 126 126 endif; 127 127 128 128 /** 129 * Returns true if a blog has more than 1category.129 * Determine whether blog/site has more than one category. 130 130 * 131 131 * @since Twenty Fifteen 1.0 132 132 * 133 * @return bool 133 * @return bool True of there is more than one category, false otherwise. 134 134 */ 135 135 function twentyfifteen_categorized_blog() { 136 136 if ( false === ( $all_the_cool_cats = get_transient( 'twentyfifteen_categories' ) ) ) { … … 159 159 } 160 160 161 161 /** 162 * Flush out the transients used in twentyfifteen_categorized_blog.162 * Flush out the transients used in {@see twentyfifteen_categorized_blog()}. 163 163 * 164 164 * @since Twenty Fifteen 1.0 165 165 */ … … 210 210 * Falls back to the post permalink if no URL is found in the post. 211 211 * 212 212 * @since Twenty Fifteen 1.0 213 * @uses get_url_in_content()214 213 * 214 * @see get_url_in_content() 215 * 215 216 * @return string The Link format URL. 216 217 */ 217 218 function twentyfifteen_get_link_url() { … … 223 224 224 225 if ( ! function_exists( 'twentyfifteen_excerpt_more' ) && ! is_admin() ) : 225 226 /** 226 * Replaces "[...]" (appended to automatically generated excerpts) with ... and a Continue readinglink.227 * Replaces "[...]" (appended to automatically generated excerpts) with ... and a 'Continue reading' link. 227 228 * 228 229 * @since Twenty Fifteen 1.0 229 230 * 231 * @return string 'Continue reading' link prepended with an ellipsis. 230 232 */ 231 233 function twentyfifteen_excerpt_more( $more ) { 232 234 $link = sprintf( '<a href="%1$s" class="more-link">%2$s</a>',