Changeset 61309
- Timestamp:
- 11/25/2025 06:53:28 PM (2 weeks ago)
- Location:
- trunk/src/wp-content/themes/twentyeleven/inc
- Files:
-
- 2 edited
-
theme-options.php (modified) (17 diffs)
-
widgets.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentyeleven/inc/theme-options.php
r60513 r61309 9 9 10 10 /** 11 * Properly enqueues styles and scripts for ourtheme options page.11 * Enqueues styles and scripts for the theme options page. 12 12 * 13 13 * This function is attached to the admin_enqueue_scripts action hook. … … 76 76 * to allow for finer-grained control for roles and users. 77 77 * 78 * @since Twenty Eleven 1.1 79 * 78 80 * @param string $capability The capability used for the page, which is manage_options by default. 79 81 * @return string The capability to actually use. … … 85 87 86 88 /** 87 * Adds a theme options page to the admin menu, including somehelp documentation.89 * Adds the theme options page to the admin menu, including help documentation. 88 90 * 89 91 * This function is attached to the admin_menu action hook. … … 108 110 add_action( 'admin_menu', 'twentyeleven_theme_options_add_page' ); 109 111 112 /** 113 * Adds help documentation to the theme options page. 114 * 115 * @since Twenty Eleven 1.3 116 */ 110 117 function twentyeleven_theme_options_help() { 111 118 … … 145 152 * 146 153 * @since Twenty Eleven 1.0 154 * 155 * @return array<string, array<string, string>> An associative array of color scheme options. 147 156 */ 148 157 function twentyeleven_color_schemes() { … … 167 176 * @since Twenty Eleven 1.0 168 177 * 169 * @param array $color_scheme_options An associative array of color scheme options.178 * @param array<string, array<string, string>> $color_scheme_options An associative array of color scheme options. 170 179 */ 171 180 return apply_filters( 'twentyeleven_color_schemes', $color_scheme_options ); … … 176 185 * 177 186 * @since Twenty Eleven 1.0 187 * 188 * @return array<string, array<string, string>> An associative array of layout options. 178 189 */ 179 190 function twentyeleven_layouts() { … … 201 212 * @since Twenty Eleven 1.0 202 213 * 203 * @param array $layout_options An associative array of layout options.214 * @param array<string, array<string, string>> $layout_options An associative array of layout options. 204 215 */ 205 216 return apply_filters( 'twentyeleven_layouts', $layout_options ); … … 211 222 * @since Twenty Eleven 1.0 212 223 * 213 * @return array An array of default theme options.224 * @return array<string, string> An array of default theme options. 214 225 */ 215 226 function twentyeleven_get_default_theme_options() { … … 229 240 * @since Twenty Eleven 1.0 230 241 * 231 * @param array $default_theme_options An array of default theme options.242 * @param array<string, string> $default_theme_options An array of default theme options. 232 243 */ 233 244 return apply_filters( 'twentyeleven_default_theme_options', $default_theme_options ); … … 241 252 * @param string $color_scheme Optional. Color scheme. 242 253 * Default null (or the active color scheme). 243 * @return string The default link color.254 * @return string|false The default link color, or false if not set. 244 255 */ 245 256 function twentyeleven_get_default_link_color( $color_scheme = null ) { … … 261 272 * 262 273 * @since Twenty Eleven 1.0 274 * 275 * @return array<string, string> The theme options array. 263 276 */ 264 277 function twentyeleven_get_theme_options() { … … 373 386 * 374 387 * @param array $input An array of form input. 388 * @return array<string, string> An array of sanitized and validated form output. 375 389 */ 376 390 function twentyeleven_theme_options_validate( $input ) { … … 402 416 * @since Twenty Eleven 1.0 403 417 * 404 * @param array $output An array of sanitized form output.405 * @param array $input An array of un-sanitized form input.406 * @param array $defaults An array of default theme options.418 * @param array<string, string> $output An array of sanitized form output. 419 * @param array $input An array of un-sanitized form input. 420 * @param array<string, string> $defaults An array of default theme options. 407 421 */ 408 422 return apply_filters( 'twentyeleven_theme_options_validate', $output, $input, $defaults ); … … 487 501 * @since Twenty Eleven 1.0 488 502 * 489 * @param array $existing_classes An array of existing body classes. 503 * @param string[] $existing_classes An array of existing body classes. 504 * @return string[] The filtered array of body classes. 490 505 */ 491 506 function twentyeleven_layout_classes( $existing_classes ) { … … 512 527 * @since Twenty Eleven 1.0 513 528 * 514 * @param array$classes An array of body classes.515 * @param string $current_layout The current theme layout.529 * @param string[] $classes An array of body classes. 530 * @param string $current_layout The current theme layout. 516 531 */ 517 532 $classes = apply_filters( 'twentyeleven_layout_classes', $classes, $current_layout ); … … 522 537 523 538 /** 524 * Implements Twenty Eleven theme options into Customizer 539 * Implements Twenty Eleven theme options into Customizer. 525 540 * 526 541 * @since Twenty Eleven 1.3 -
trunk/src/wp-content/themes/twentyeleven/inc/widgets.php
r60513 r61309 50 50 * @since Twenty Eleven 1.0 51 51 * 52 * @param array $args An array of standard parameters for widgets in this theme.53 * @param array $instance An array of settings for this widget instance.52 * @param array $args An array of standard parameters for widgets in this theme. 53 * @param array<string, string|int> $instance An array of settings for this widget instance. 54 54 */ 55 55 public function widget( $args, $instance ) { … … 157 157 * 158 158 * @since Twenty Eleven 1.0 159 * 160 * @param array $new_instance New widget instance. 161 * @param array $old_instance Original widget instance. 162 * @return array<string, string|int> Updated widget instance. 159 163 */ 160 164 public function update( $new_instance, $old_instance ) {
Note: See TracChangeset
for help on using the changeset viewer.