Skip to content

Commit

Permalink
Make variable names consistent.
Browse files Browse the repository at this point in the history
  • Loading branch information
jffng committed Sep 17, 2024
1 parent 8e25b5b commit 52bbdb5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions includes/create-theme/theme-readme.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ public static function update( $theme, $readme_content = '' ) {
$description = $theme['description'] ?? '';
$author = $theme['author'] ?? '';
$wp_version = $theme['wp_version'] ?? CBT_Theme_Utils::get_current_wordpress_version();
$wp_min = $theme['requires_wp'] ?? CBT_Theme_Utils::get_current_wordpress_version();
$requires_wp = $theme['requires_wp'] ?? CBT_Theme_Utils::get_current_wordpress_version();
$image_credits = $theme['image_credits'] ?? '';
$recommended_plugins = $theme['recommended_plugins'] ?? '';
$font_credits = $theme['font_credits'] ?? '';
Expand All @@ -223,7 +223,7 @@ public static function update( $theme, $readme_content = '' ) {
$readme_content = self::add_or_update_prop( 'Contributors', $author, $readme_content );

// Update Required WordPress version.
$readme_content = self::add_or_update_prop( 'Requires at least', $wp_min, $readme_content );
$readme_content = self::add_or_update_prop( 'Requires at least', $requires_wp, $readme_content );

// Update "Tested up to" version.
$readme_content = self::add_or_update_prop( 'Tested up to', $wp_version, $readme_content );
Expand Down
8 changes: 4 additions & 4 deletions includes/create-theme/theme-styles.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public static function update_style_css( $style_css, $theme ) {
$author = stripslashes( $theme['author'] );
$author_uri = $theme['author_uri'];
$wp_version = CBT_Theme_Utils::get_current_wordpress_version();
$wp_min = $theme['requires_wp'] ?? CBT_Theme_Utils::get_current_wordpress_version();
$requires_wp = $theme['requires_wp'] ?? CBT_Theme_Utils::get_current_wordpress_version();
$version = $theme['version'];
$requires_php = $current_theme->get( 'RequiresPHP' );
$text_domain = $theme['slug'];
Expand All @@ -46,7 +46,7 @@ public static function update_style_css( $style_css, $theme ) {
Author: {$author}
Author URI: {$author_uri}
Description: {$description}
Requires at least: {$wp_min}
Requires at least: {$requires_wp}
Tested up to: {$wp_version}
Requires PHP: {$requires_php}
Version: {$version}
Expand All @@ -67,7 +67,7 @@ public static function build_style_css( $theme ) {
$uri = $theme['uri'];
$author = stripslashes( $theme['author'] );
$author_uri = $theme['author_uri'];
$wp_min = $theme['requires_wp'] ?? CBT_Theme_Utils::get_current_wordpress_version();
$requires_wp = $theme['requires_wp'] ?? CBT_Theme_Utils::get_current_wordpress_version();
$wp_version = CBT_Theme_Utils::get_current_wordpress_version();
$text_domain = sanitize_title( $name );
if ( isset( $theme['template'] ) ) {
Expand All @@ -86,7 +86,7 @@ public static function build_style_css( $theme ) {
Author: {$author}
Author URI: {$author_uri}
Description: {$description}
Requires at least: {$wp_min}
Requires at least: {$requires_wp}
Tested up to: {$wp_version}
Requires PHP: 5.7
Version: {$version}
Expand Down

0 comments on commit 52bbdb5

Please sign in to comment.