diff -r 7b1b88e27a20 -r 48c4eec2b7e6 wp/wp-content/plugins/portfolio/bws_menu/class-bws-settings.php --- a/wp/wp-content/plugins/portfolio/bws_menu/class-bws-settings.php Thu Sep 29 08:06:27 2022 +0200 +++ b/wp/wp-content/plugins/portfolio/bws_menu/class-bws-settings.php Fri Sep 05 18:40:08 2025 +0200 @@ -1,4 +1,8 @@ trial_days = $args['trial_days']; $this->licenses = $args['licenses']; - $this->pro_page = $this->bws_license_plugin = ''; + $this->pro_page = ''; + $this->bws_license_plugin = ''; /* get $bws_plugins */ require dirname( __FILE__ ) . '/product_list.php'; if ( isset( $bws_plugins[ $this->plugin_basename ] ) ) { @@ -178,7 +183,7 @@
@@ -222,15 +227,15 @@
-
-
+
+
plugin_basename, 'bws_nonce_name' ); ?> @@ -265,7 +270,8 @@
wp_slug ) ) { - bws_plugin_reviews_block( $this->plugins_info['Name'], $this->wp_slug );} + bws_plugin_reviews_block( $this->plugins_info['Name'], $this->wp_slug ); + } ?>
@@ -291,9 +297,9 @@ display_tabs_content(); ?>
tabs as $tab_slug => $data ) { @@ -357,11 +361,12 @@ * Save all options from all tabs and display errors\messages * * @access public - * @param void * @return array */ public function save_all_tabs_options() { - $message = $notice = $error = ''; + $message = ''; + $notice = ''; + $error = ''; /* Restore default settings */ if ( isset( $_POST['bws_restore_confirm'] ) && check_admin_referer( $this->plugin_basename, 'bws_settings_nonce_name' ) ) { $this->restore_options(); @@ -435,21 +440,24 @@
- >

+ >

- >

+ >

- >

+ >

exists( $real_file ) ) { update_recently_edited( $real_file ); - $this->custom_code_args[ "content_{$extension}" ] = $wp_filesystem->get_contents( $real_file );//file_get_contents( $real_file ); + $this->custom_code_args[ "content_{$extension}" ] = $wp_filesystem->get_contents( $real_file ); if ( ( $this->is_multisite && isset( $bstwbsftwppdtplgns_options['custom_code'][ $this->custom_code_args['blog_id'] ][ $file ] ) ) || - ( ! $this->is_multisite && isset( $bstwbsftwppdtplgns_options['custom_code'][ $file ] ) ) ) { + ( ! $this->is_multisite && isset( $bstwbsftwppdtplgns_options['custom_code'][ $file ] ) ) ) { $this->custom_code_args[ "is_{$extension}_active" ] = true; } if ( is_writeable( $real_file ) ) { @@ -571,7 +578,8 @@ custom_code_args[ "{$extension}_writeable" ] ) { - echo '(' . esc_html__( 'Browsing', 'bestwebsoft' ) . ')';} + echo '(' . esc_html__( 'Browsing', 'bestwebsoft' ) . ')'; + } ?>

@@ -580,21 +588,22 @@ custom_code_args[ "is_{$extension}_active" ] ) { - echo 'checked';} + echo 'checked'; + } ?> />

+ if ( isset( $this->custom_code_args[ "content_{$extension}" ] ) ) { + echo esc_html( stripslashes_deep( $this->custom_code_args[ "content_{$extension}" ] ) ); } + ?>

- +
- +

- ">Upgrade to Pro + Upgrade to Pro
@@ -611,7 +620,7 @@ } else { ?>
- ">Upgrade to Pro + Upgrade to Pro
change_permission_attr ) ); ?> name="bws_hide_premium_options_submit" type="checkbox" value="1" hide_pro_tabs ) { - echo 'checked="checked "';} + echo 'checked="checked "'; + } ?> /> @@ -674,7 +684,8 @@ change_permission_attr ) ); ?> name="bws_track_usage" type="checkbox" value="1" plugin_basename ] ) ) { - echo 'checked="checked "';} + echo 'checked="checked "'; + } ?> /> @@ -878,7 +889,8 @@ bws_license_plugin ]['count'] ) && '5' < $bstwbsftwppdtplgns_options['go_pro'][ $this->bws_license_plugin ]['count'] && $bstwbsftwppdtplgns_options['go_pro'][ $this->bws_license_plugin ]['time'] > ( time() - ( 24 * 60 * 60 ) ) ) { @@ -896,7 +908,7 @@ type="text" name="bws_license_key_" value="" /> type="hidden" name="bws_license_plugin_" value="" /> type="submit" class="button button-secondary" name="bws_license_submit" value="" /> - +
bws_plugin_link ) . '" target="_blank" title="' . esc_html( $pro_plugin_name ) . '">' . esc_html( $pro_plugin_name ) . '' ); ?>
@@ -958,10 +970,12 @@ global $wp_version, $bstwbsftwppdtplgns_options, $wp_filesystem; /*$empty_field_error - added to avoid error when 1 field is empty while another field contains license key*/ - $error = $message = $empty_field_error = ''; + $error = ''; + $message = ''; + $empty_field_error = ''; if ( ! isset( $_REQUEST['_wpnonce'] ) || ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_REQUEST['_wpnonce'] ) ), 'bws_license_key_nonce' ) ) { - die( __( 'Security check', 'bestwebsoft' ) ); + die( esc_html__( 'Security check', 'bestwebsoft' ) ); } else { foreach ( $this->licenses as $single_license ) { @@ -1078,6 +1092,7 @@ /* Go Pro */ } else { $slug = ! empty( $single_license['pro_slug'] ) ? 'bws_license_plugin_' . $single_license['pro_slug'] : 'bws_license_plugin_' . $single_license['slug']; + $bws_license_plugin = isset( $_POST[ $slug ] ) ? sanitize_text_field( wp_unslash( $_POST[ $slug ] ) ) : ''; if ( isset( $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] ) && $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['time'] > ( time() - ( 24 * 60 * 60 ) ) ) { $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] = $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] + 1; @@ -1154,7 +1169,7 @@ } /* add 'track_usage' for Pro version */ if ( ! empty( $bstwbsftwppdtplgns_options['track_usage'][ ( ! empty( $single_license['pro_basename'] ) ) ? $single_license['pro_basename'] : $single_license['basename'] ] ) && - empty( $bstwbsftwppdtplgns_options['track_usage'][ $bws_license_plugin ] ) ) { + empty( $bstwbsftwppdtplgns_options['track_usage'][ $bws_license_plugin ] ) ) { $bstwbsftwppdtplgns_options['track_usage'][ $bws_license_plugin ] = $bstwbsftwppdtplgns_options['track_usage'][ ( ! empty( $single_license['pro_basename'] ) ) ? $single_license['pro_basename'] : $single_license['basename'] ]; } @@ -1181,8 +1196,7 @@ * Display help phrase * * @access public - * @param void - * @return html The Action results + * @echo html The Action results */ public function help_phrase() { /*pls */ @@ -1229,7 +1243,7 @@ $this->default_options['display_settings_notice'] ); /** - * filter - Change default_options array OR process custom functions + * Filter - Change default_options array OR process custom functions */ $this->options = apply_filters( __CLASS__ . '_additional_restore_options', $this->default_options ); if ( $this->is_network_options ) { @@ -1369,18 +1383,18 @@ } } -/** - * Called after the user has submitted his reason for deactivating the plugin. - * - * @since 2.1.3 - */ if ( ! function_exists( 'bws_submit_request_feature_action' ) ) { + /** + * Called after the user has submitted his reason for deactivating the plugin. + * + * @since 2.1.3 + */ function bws_submit_request_feature_action() { global $bstwbsftwppdtplgns_options, $wp_version, $bstwbsftwppdtplgns_active_plugins, $current_user; if ( isset( $_REQUEST['bws_ajax_nonce'] ) ) { - wp_verify_nonce( sanitize_text_field( wp_unslash( $_REQUEST['bws_ajax_nonce'] ) ), 'bws_ajax_nonce' ); + check_ajax_referer( 'bws_ajax_nonce', sanitize_text_field( wp_unslash( $_REQUEST['bws_ajax_nonce'] ) ) ); $basename = isset( $_REQUEST['plugin'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['plugin'] ) ) : ''; $info = isset( $_REQUEST['info'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['info'] ) ) : '';