Changeset 52610
- Timestamp:
- 01/20/2022 11:51:22 PM (3 years ago)
- Location:
- trunk/src
- Files:
-
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-custom-image-header.php
r52580 r52610 1456 1456 /** 1457 1457 * Given an attachment ID for a header image, unsets it as a user-uploaded 1458 * header image for the currenttheme.1458 * header image for the active theme. 1459 1459 * 1460 1460 * Triggered when the user clicks the overlay "X" button next to each image -
trunk/src/wp-admin/includes/class-theme-installer-skin.php
r52580 r52610 224 224 echo '<h2 class="update-from-upload-heading">' . esc_html__( 'This theme is already installed.' ) . '</h2>'; 225 225 226 // Check errors for currenttheme.226 // Check errors for active theme. 227 227 if ( is_wp_error( $current_theme_data->errors() ) ) { 228 228 $this->feedback( 'current_theme_has_errors', $current_theme_data->errors()->get_error_message() ); … … 284 284 * 285 285 * @param string $table The output table with Name, Version, Author, RequiresWP, and RequiresPHP info. 286 * @param WP_Theme $current_theme_data Currenttheme data.286 * @param WP_Theme $current_theme_data Active theme data. 287 287 * @param array $new_theme_data Array with uploaded theme data. 288 288 */ -
trunk/src/wp-admin/includes/class-theme-upgrader.php
r52580 r52610 610 610 611 611 /** 612 * Turn on maintenance mode before attempting to upgrade the currenttheme.612 * Turn on maintenance mode before attempting to upgrade the active theme. 613 613 * 614 614 * Hooked to the {@see 'upgrader_pre_install'} filter by Theme_Upgrader::upgrade() and … … 628 628 $theme = isset( $theme['theme'] ) ? $theme['theme'] : ''; 629 629 630 // Only run if currenttheme630 // Only run if active theme 631 631 if ( get_stylesheet() !== $theme ) { 632 632 return $return; … … 642 642 643 643 /** 644 * Turn off maintenance mode after upgrading the currenttheme.644 * Turn off maintenance mode after upgrading the active theme. 645 645 * 646 646 * Hooked to the {@see 'upgrader_post_install'} filter by Theme_Upgrader::upgrade() … … 660 660 $theme = isset( $theme['theme'] ) ? $theme['theme'] : ''; 661 661 662 // Only run if currenttheme.662 // Only run if active theme. 663 663 if ( get_stylesheet() !== $theme ) { 664 664 return $return; -
trunk/src/wp-admin/includes/dashboard.php
r52442 r52610 1988 1988 * 1989 1989 * @since 3.3.0 1990 * @since 5.9.0 Send users to the Site Editor if the currenttheme is block-based.1990 * @since 5.9.0 Send users to the Site Editor if the active theme is block-based. 1991 1991 */ 1992 1992 function wp_welcome_panel() { -
trunk/src/wp-admin/includes/file.php
r52585 r52610 288 288 * 289 289 * @param string[] $default_types An array of editable theme file extensions. 290 * @param WP_Theme $theme The currenttheme object.290 * @param WP_Theme $theme The active theme object. 291 291 */ 292 292 $file_types = apply_filters( 'wp_theme_editor_filetypes', $default_types, $theme ); -
trunk/src/wp-admin/includes/meta-boxes.php
r52285 r52610 486 486 $post_format = '0'; 487 487 } 488 // Add in the current one if it isn't there yet, in case the currenttheme doesn't support it.488 // Add in the current one if it isn't there yet, in case the active theme doesn't support it. 489 489 if ( $post_format && ! in_array( $post_format, $post_formats[0], true ) ) { 490 490 $post_formats[0][] = $post_format; -
trunk/src/wp-admin/includes/theme.php
r52580 r52610 654 654 * @param array $prepared_themes An associative array of theme data. Default empty array. 655 655 * @param WP_Theme[]|null $themes An array of theme objects to prepare, if any. 656 * @param string $current_theme The currenttheme slug.656 * @param string $current_theme The active theme slug. 657 657 */ 658 658 $prepared_themes = (array) apply_filters( 'pre_prepare_themes_for_js', array(), $themes, $current_theme ); … … 662 662 } 663 663 664 // Make sure the currenttheme is listed first.664 // Make sure the active theme is listed first. 665 665 $prepared_themes[ $current_theme ] = array(); 666 666 -
trunk/src/wp-includes/block-template-utils.php
r52554 r52610 423 423 424 424 /** 425 * Parses wp_template content and injects the currenttheme's425 * Parses wp_template content and injects the active theme's 426 426 * stylesheet as a theme attribute into each wp_template_part 427 427 * -
trunk/src/wp-includes/block-template.php
r52597 r52610 161 161 $parent_theme_base_path = get_template_directory() . DIRECTORY_SEPARATOR; 162 162 163 // Is the currenttheme a child theme, and is the PHP fallback template part of it?163 // Is the active theme a child theme, and is the PHP fallback template part of it? 164 164 if ( 165 165 strpos( $fallback_template, $theme_base_path ) === 0 && … … 181 181 ) { 182 182 // Unfortunately, we cannot trust $templates[0]->theme, since it will always 183 // be set to the currenttheme's slug by _build_block_template_result_from_file(),184 // even if the block template is really coming from the currenttheme's parent.185 // (The reason for this is that we want it to be associated with the currenttheme183 // be set to the active theme's slug by _build_block_template_result_from_file(), 184 // even if the block template is really coming from the active theme's parent. 185 // (The reason for this is that we want it to be associated with the active theme 186 186 // -- not its parent -- once we edit it and store it to the DB as a wp_template CPT.) 187 187 // Instead, we use _get_block_template_file() to locate the block template file. -
trunk/src/wp-includes/class-wp-customize-manager.php
r52371 r52610 497 497 * Start preview and customize theme. 498 498 * 499 * Check if customize query variable exist. Init filters to filter the currenttheme.499 * Check if customize query variable exist. Init filters to filter the active theme. 500 500 * 501 501 * @since 3.4.0 … … 700 700 * Stop previewing the selected theme. 701 701 * 702 * Removes filters to change the currenttheme.702 * Removes filters to change the active theme. 703 703 * 704 704 * @since 3.4.0 … … 1770 1770 if ( isset( $setting_params['type'] ) && 'theme_mod' === $setting_params['type'] ) { 1771 1771 1772 // Ensure that theme mods values are only used if they were saved under the currenttheme.1772 // Ensure that theme mods values are only used if they were saved under the active theme. 1773 1773 $namespace_pattern = '/^(?P<stylesheet>.+?)::(?P<setting_id>.+)$/'; 1774 1774 if ( preg_match( $namespace_pattern, $setting_id, $matches ) && $this->get_stylesheet() === $matches['stylesheet'] ) { … … 2298 2298 2299 2299 /** 2300 * Filters the currenttheme and return the name of the previewed theme.2300 * Filters the active theme and return the name of the previewed theme. 2301 2301 * 2302 2302 * @since 3.4.0 -
trunk/src/wp-includes/class-wp-theme-json-resolver.php
r52597 r52610 218 218 /** 219 219 * Returns the custom post type that contains the user's origin config 220 * for the currenttheme or a void array if none are found.220 * for the active theme or a void array if none are found. 221 221 * 222 222 * This can also create and return a new draft custom post type. … … 225 225 * 226 226 * @param WP_Theme $theme The theme object. If empty, it 227 * defaults to the currenttheme.227 * defaults to the active theme. 228 228 * @param bool $create_post Optional. Whether a new custom post 229 229 * type should be created if none are … … 397 397 398 398 /** 399 * Whether the currenttheme has a theme.json file.399 * Whether the active theme has a theme.json file. 400 400 * 401 401 * @since 5.8.0 -
trunk/src/wp-includes/class-wp-theme-json.php
r52597 r52610 709 709 710 710 /** 711 * Returns the page templates of the currenttheme.711 * Returns the page templates of the active theme. 712 712 * 713 713 * @since 5.9.0 … … 733 733 734 734 /** 735 * Returns the template part data of currenttheme.735 * Returns the template part data of active theme. 736 736 * 737 737 * @since 5.9.0 -
trunk/src/wp-includes/class-wp-theme.php
r52603 r52610 699 699 * @since 3.4.0 700 700 * 701 * @return WP_Theme|false Parent theme, or false if the currenttheme is not a child theme.701 * @return WP_Theme|false Parent theme, or false if the active theme is not a child theme. 702 702 */ 703 703 public function parent() { … … 1218 1218 */ 1219 1219 public function get_post_templates() { 1220 // If you screw up your currenttheme and we invalidate your parent, most things still work. Let it slide.1220 // If you screw up your active theme and we invalidate your parent, most things still work. Let it slide. 1221 1221 if ( $this->errors() && $this->errors()->get_error_codes() !== array( 'theme_parent_invalid' ) ) { 1222 1222 return array(); -
trunk/src/wp-includes/class.wp-scripts.php
r51518 r52610 126 126 * Holds a string which contains the type attribute for script tag. 127 127 * 128 * If the currenttheme does not declare HTML5 support for 'script',128 * If the active theme does not declare HTML5 support for 'script', 129 129 * then it initializes as `type='text/javascript'`. 130 130 * -
trunk/src/wp-includes/class.wp-styles.php
r51518 r52610 104 104 * Holds a string which contains the type attribute for style tag. 105 105 * 106 * If the currenttheme does not declare HTML5 support for 'style',106 * If the active theme does not declare HTML5 support for 'style', 107 107 * then it initializes as `type='text/css'`. 108 108 * -
trunk/src/wp-includes/customize/class-wp-customize-themes-panel.php
r46586 r52610 28 28 * An Underscore (JS) template for rendering this panel's container. 29 29 * 30 * The themes panel renders a custom panel heading with the currenttheme and a switch themes button.30 * The themes panel renders a custom panel heading with the active theme and a switch themes button. 31 31 * 32 32 * @see WP_Customize_Panel::print_template() -
trunk/src/wp-includes/default-constants.php
r52093 r52610 403 403 * Slug of the default theme for this installation. 404 404 * Used as the default theme when installing new sites. 405 * It will be used as the fallback if the currenttheme doesn't exist.405 * It will be used as the fallback if the active theme doesn't exist. 406 406 * 407 407 * @since 3.0.0 -
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php
r52399 r52610 335 335 336 336 if ( $theme->get_stylesheet() === wp_get_theme()->get_stylesheet() ) { 337 // This creates a record for the currenttheme if not existent.337 // This creates a record for the active theme if not existent. 338 338 $id = WP_Theme_JSON_Resolver::get_user_global_styles_post_id(); 339 339 } else { -
trunk/src/wp-includes/theme.php
r52440 r52610 46 46 47 47 if ( is_array( $wp_theme_directories ) && count( $wp_theme_directories ) > 1 ) { 48 // Make sure the currenttheme wins out, in case search_theme_directories() picks the wrong48 // Make sure the active theme wins out, in case search_theme_directories() picks the wrong 49 49 // one in the case of a conflict. (Normally, last registered theme root wins.) 50 50 $current_theme = get_stylesheet(); … … 106 106 * @global array $wp_theme_directories 107 107 * 108 * @param string $stylesheet Optional. Directory name for the theme. Defaults to currenttheme.108 * @param string $stylesheet Optional. Directory name for the theme. Defaults to active theme. 109 109 * @param string $theme_root Optional. Absolute path of the theme root to look in. 110 110 * If not specified, get_raw_theme_root() is used to calculate 111 * the theme root for the $stylesheet provided (or currenttheme).111 * the theme root for the $stylesheet provided (or active theme). 112 112 * @return WP_Theme Theme object. Be sure to check the object's exists() method 113 113 * if you need to confirm the theme's existence. … … 183 183 184 184 /** 185 * Retrieves stylesheet directory path for currenttheme.185 * Retrieves stylesheet directory path for the active theme. 186 186 * 187 187 * @since 1.5.0 188 188 * 189 * @return string Path to currenttheme's stylesheet directory.189 * @return string Path to active theme's stylesheet directory. 190 190 */ 191 191 function get_stylesheet_directory() { … … 195 195 196 196 /** 197 * Filters the stylesheet directory path for currenttheme.197 * Filters the stylesheet directory path for the active theme. 198 198 * 199 199 * @since 1.5.0 200 200 * 201 * @param string $stylesheet_dir Absolute path to the currenttheme.202 * @param string $stylesheet Directory name of the currenttheme.201 * @param string $stylesheet_dir Absolute path to the active theme. 202 * @param string $stylesheet Directory name of the active theme. 203 203 * @param string $theme_root Absolute path to themes directory. 204 204 */ … … 207 207 208 208 /** 209 * Retrieves stylesheet directory URI for currenttheme.209 * Retrieves stylesheet directory URI for the active theme. 210 210 * 211 211 * @since 1.5.0 212 212 * 213 * @return string URI to currenttheme's stylesheet directory.213 * @return string URI to active theme's stylesheet directory. 214 214 */ 215 215 function get_stylesheet_directory_uri() { … … 231 231 232 232 /** 233 * Retrieves stylesheet URI for currenttheme.233 * Retrieves stylesheet URI for the active theme. 234 234 * 235 235 * The stylesheet file name is 'style.css' which is appended to the stylesheet directory URI path. … … 238 238 * @since 1.5.0 239 239 * 240 * @return string URI to currenttheme's stylesheet.240 * @return string URI to active theme's stylesheet. 241 241 */ 242 242 function get_stylesheet_uri() { … … 244 244 $stylesheet_uri = $stylesheet_dir_uri . '/style.css'; 245 245 /** 246 * Filters the URI of the currenttheme stylesheet.246 * Filters the URI of the active theme stylesheet. 247 247 * 248 248 * @since 1.5.0 249 249 * 250 * @param string $stylesheet_uri Stylesheet URI for the currenttheme/child theme.251 * @param string $stylesheet_dir_uri Stylesheet directory URI for the currenttheme/child theme.250 * @param string $stylesheet_uri Stylesheet URI for the active theme/child theme. 251 * @param string $stylesheet_dir_uri Stylesheet directory URI for the active theme/child theme. 252 252 */ 253 253 return apply_filters( 'stylesheet_uri', $stylesheet_uri, $stylesheet_dir_uri ); … … 273 273 * @global WP_Locale $wp_locale WordPress date and time locale object. 274 274 * 275 * @return string URI to currenttheme's localized stylesheet.275 * @return string URI to active theme's localized stylesheet. 276 276 */ 277 277 function get_locale_stylesheet_uri() { … … 299 299 300 300 /** 301 * Retrieves name of the currenttheme.301 * Retrieves name of the active theme. 302 302 * 303 303 * @since 1.5.0 … … 307 307 function get_template() { 308 308 /** 309 * Filters the name of the currenttheme.309 * Filters the name of the active theme. 310 310 * 311 311 * @since 1.5.0 312 312 * 313 * @param string $template Currenttheme's directory name.313 * @param string $template active theme's directory name. 314 314 */ 315 315 return apply_filters( 'template', get_option( 'template' ) ); … … 317 317 318 318 /** 319 * Retrieves template directory path for currenttheme.319 * Retrieves template directory path for the active theme. 320 320 * 321 321 * @since 1.5.0 322 322 * 323 * @return string Path to currenttheme's template directory.323 * @return string Path to active theme's template directory. 324 324 */ 325 325 function get_template_directory() { … … 329 329 330 330 /** 331 * Filters the currenttheme directory path.331 * Filters the active theme directory path. 332 332 * 333 333 * @since 1.5.0 334 334 * 335 * @param string $template_dir The path of the currenttheme directory.336 * @param string $template Directory name of the currenttheme.335 * @param string $template_dir The path of the active theme directory. 336 * @param string $template Directory name of the active theme. 337 337 * @param string $theme_root Absolute path to the themes directory. 338 338 */ … … 341 341 342 342 /** 343 * Retrieves template directory URI for currenttheme.343 * Retrieves template directory URI for the active theme. 344 344 * 345 345 * @since 1.5.0 346 346 * 347 * @return string URI to currenttheme's template directory.347 * @return string URI to active theme's template directory. 348 348 */ 349 349 function get_template_directory_uri() { … … 353 353 354 354 /** 355 * Filters the currenttheme directory URI.355 * Filters the active theme directory URI. 356 356 * 357 357 * @since 1.5.0 358 358 * 359 * @param string $template_dir_uri The URI of the currenttheme directory.360 * @param string $template Directory name of the currenttheme.359 * @param string $template_dir_uri The URI of the active theme directory. 360 * @param string $template Directory name of the active theme. 361 361 * @param string $theme_root_uri The themes root URI. 362 362 */ … … 500 500 foreach ( $wp_theme_directories as $theme_root ) { 501 501 502 // Start with directories in the root of the currenttheme directory.502 // Start with directories in the root of the active theme directory. 503 503 $dirs = @ scandir( $theme_root ); 504 504 if ( ! $dirs ) { … … 684 684 $theme_root = false; 685 685 686 // If requesting the root for the currenttheme, consult options to avoid calling get_theme_roots().686 // If requesting the root for the active theme, consult options to avoid calling get_theme_roots(). 687 687 if ( ! $skip_cache ) { 688 688 if ( get_option( 'stylesheet' ) == $stylesheet_or_template ) { … … 831 831 832 832 /** 833 * Checks that the currenttheme has 'index.php' and 'style.css' files.833 * Checks that the active theme has 'index.php' and 'style.css' files. 834 834 * 835 835 * Does not initially check the default theme, which is the fallback and should always exist. 836 836 * But if it doesn't exist, it'll fall back to the latest core default theme that does exist. 837 * Will switch theme to the fallback theme if currenttheme does not validate.837 * Will switch theme to the fallback theme if active theme does not validate. 838 838 * 839 839 * You can use the {@see 'validate_current_theme'} filter to return false to disable … … 848 848 function validate_current_theme() { 849 849 /** 850 * Filters whether to validate the currenttheme.850 * Filters whether to validate the active theme. 851 851 * 852 852 * @since 2.7.0 853 853 * 854 * @param bool $validate Whether to validate the currenttheme. Default true.854 * @param bool $validate Whether to validate the active theme. Default true. 855 855 */ 856 856 if ( wp_installing() || ! apply_filters( 'validate_current_theme', true ) ) { … … 982 982 983 983 /** 984 * Retrieves theme modification value for the currenttheme.984 * Retrieves theme modification value for the active theme. 985 985 * 986 986 * If the modification name does not exist and `$default` is a string, then the … … 1008 1008 * @since 2.2.0 1009 1009 * 1010 * @param mixed $current_mod The value of the currenttheme modification.1010 * @param mixed $current_mod The value of the active theme modification. 1011 1011 */ 1012 1012 return apply_filters( "theme_mod_{$name}", $mods[ $name ] ); … … 1027 1027 1028 1028 /** 1029 * Updates theme modification value for the currenttheme.1029 * Updates theme modification value for the active theme. 1030 1030 * 1031 1031 * @since 2.1.0 … … 1060 1060 1061 1061 /** 1062 * Removes theme modification name from currenttheme list.1062 * Removes theme modification name from active theme list. 1063 1063 * 1064 1064 * If removing the name also removes all elements, then the entire option … … 1089 1089 1090 1090 /** 1091 * Removes theme modifications option for currenttheme.1091 * Removes theme modifications option for the active theme. 1092 1092 * 1093 1093 * @since 2.1.0 … … 1396 1396 1397 1397 /** 1398 * Gets the header images uploaded for the currenttheme.1398 * Gets the header images uploaded for the active theme. 1399 1399 * 1400 1400 * @since 3.2.0 … … 1876 1876 * @since 4.7.0 1877 1877 * 1878 * @param string $stylesheet Optional. A theme object stylesheet name. Defaults to the currenttheme.1878 * @param string $stylesheet Optional. A theme object stylesheet name. Defaults to the active theme. 1879 1879 * @return WP_Post|null The custom_css post or null if none exists. 1880 1880 */ … … 1927 1927 * @since 4.7.0 1928 1928 * 1929 * @param string $stylesheet Optional. A theme object stylesheet name. Defaults to the currenttheme.1929 * @param string $stylesheet Optional. A theme object stylesheet name. Defaults to the active theme. 1930 1930 * @return string The Custom CSS Post content. 1931 1931 */ … … 1969 1969 * Normally empty string. 1970 1970 * @type string $stylesheet Optional. Stylesheet (child theme) to update. 1971 * Defaults to currenttheme/stylesheet.1971 * Defaults to active theme/stylesheet. 1972 1972 * } 1973 1973 * @return WP_Post|WP_Error Post on success, error on failure. … … 2128 2128 function get_editor_stylesheets() { 2129 2129 $stylesheets = array(); 2130 // Load editor_style.css if the currenttheme supports it.2130 // Load editor_style.css if the active theme supports it. 2131 2131 if ( ! empty( $GLOBALS['editor_styles'] ) && is_array( $GLOBALS['editor_styles'] ) ) { 2132 2132 $editor_styles = $GLOBALS['editor_styles']; … … 3025 3025 * of possible values. 3026 3026 * @param mixed ...$args Optional extra arguments to be checked against certain features. 3027 * @return bool True if the currenttheme supports the feature, false otherwise.3027 * @return bool True if the active theme supports the feature, false otherwise. 3028 3028 */ 3029 3029 function current_theme_supports( $feature, ...$args ) { … … 3075 3075 3076 3076 /** 3077 * Filters whether the currenttheme supports a specific feature.3077 * Filters whether the active theme supports a specific feature. 3078 3078 * 3079 3079 * The dynamic portion of the hook name, `$feature`, refers to the specific … … 3082 3082 * @since 3.4.0 3083 3083 * 3084 * @param bool $supports Whether the currenttheme supports the given feature. Default true.3084 * @param bool $supports Whether the active theme supports the given feature. Default true. 3085 3085 * @param array $args Array of arguments for the feature. 3086 3086 * @param string $feature The theme feature. … … 3097 3097 * of possible values. 3098 3098 * @param string $include Path to the file. 3099 * @return bool True if the currenttheme supports the supplied feature, false otherwise.3099 * @return bool True if the active theme supports the supplied feature, false otherwise. 3100 3100 */ 3101 3101 function require_if_theme_supports( $feature, $include ) { … … 3110 3110 * Registers a theme feature for use in add_theme_support(). 3111 3111 * 3112 * This does not indicate that the currenttheme supports the feature, it only describes3112 * This does not indicate that the active theme supports the feature, it only describes 3113 3113 * the feature's supported options. 3114 3114 * … … 3623 3623 * @since 3.4.0 3624 3624 * 3625 * @param string $stylesheet Optional. Theme to customize. Defaults to currenttheme.3625 * @param string $stylesheet Optional. Theme to customize. Defaults to active theme. 3626 3626 * The theme's stylesheet will be urlencoded if necessary. 3627 3627 * @return string … … 4156 4156 4157 4157 /** 4158 * Returns whether the currenttheme is a block-based theme or not.4158 * Returns whether the active theme is a block-based theme or not. 4159 4159 * 4160 4160 * @since 5.9.0 4161 4161 * 4162 * @return boolean Whether the currenttheme is a block-based theme or not.4162 * @return boolean Whether the active theme is a block-based theme or not. 4163 4163 */ 4164 4164 function wp_is_block_theme() { -
trunk/src/wp-includes/update.php
r52351 r52610 569 569 $request = array(); 570 570 571 // Put slug of currenttheme into request.571 // Put slug of active theme into request. 572 572 $request['active'] = get_option( 'stylesheet' ); 573 573 -
trunk/src/wp-includes/widgets/class-wp-widget-search.php
r50995 r52610 52 52 } 53 53 54 // Use currenttheme search form if it exists.54 // Use active theme search form if it exists. 55 55 get_search_form(); 56 56
Note: See TracChangeset
for help on using the changeset viewer.