Skip to content

Commit

Permalink
Fixed: codefactor issues
Browse files Browse the repository at this point in the history
Update: readme
  • Loading branch information
thanghv committed Sep 5, 2023
1 parent 0340291 commit 5c2e1f4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion class/class-mainwp-child-actions.php
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ public function callback_upgrader_process_complete( $upgrader, $extra ) { // php
$old_version = $old_theme['version'];
}
} elseif ( ! empty( $upgrader->skin->theme_info ) ) {
$old_version = $upgrader->skin->theme_info->get( 'Version' ); // to fix old version //$theme['Version'];
$old_version = $upgrader->skin->theme_info->get( 'Version' ); // to fix old version //$theme['Version'].
}
$version = $theme_data['Version'];

Expand Down
4 changes: 2 additions & 2 deletions class/class-mainwp-child-misc.php
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ public function uploader_upload_file( $file_url, $path, $file_name ) {


/**
* @credit WordPress.
*
* Sanitizes a filename, replacing whitespace with dashes.
*
* Removes special characters that are illegal in filenames on certain
Expand All @@ -614,7 +614,7 @@ public function uploader_upload_file( $file_url, $path, $file_name ) {
* filename that is allowed to be uploaded.
*
* @since 2.1.0
*
* @credit WordPress.
* @param string $filename The filename to be sanitized.
* @return string The sanitized filename.
*/
Expand Down
2 changes: 1 addition & 1 deletion class/class-mainwp-pages.php
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ public static function render_header( $shownPage, $subpage = true, &$show_clone_
if ( $connected ) {
$current_user = wp_get_current_user();
if ( $current_user ) {
$is_connected_admin = $current_user->user_login === get_option( 'mainwp_child_connected_admin' ) ? true : false;
$is_connected_admin = get_option( 'mainwp_child_connected_admin' ) === $current_user->user_login ? true : false;
}
}
$show_clone_funcs = $connected && $is_connected_admin ? true : false;
Expand Down
6 changes: 6 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,12 @@ Yes, we have a quick FAQ with a lot more questions and answers [here](https://ma

== Changelog ==

= 4.5.1 - 9-5-2023 =
* Fixed: Problem with loading tabs content on the MainWP Child settings page
* Fixed: An issue with selecting Clone options
* Fixed: Usability problem with file name sanitation for the File Uploader
* Updated: Removed clone options for all users except for the Admin user that is used for establishing the connection with the MainWP Dashboard

= 4.5 - 8-15-2023 =
* Added: Support for alternative OpenSSL signature verification algorithm
* Added: PHPSecLib as a fallback for missing or Misconfigured OpenSSL
Expand Down

0 comments on commit 5c2e1f4

Please sign in to comment.