diff -r 7b1b88e27a20 -r 48c4eec2b7e6 wp/wp-content/plugins/portfolio/bws_menu/bws_menu.php --- a/wp/wp-content/plugins/portfolio/bws_menu/bws_menu.php Thu Sep 29 08:06:27 2022 +0200 +++ b/wp/wp-content/plugins/portfolio/bws_menu/bws_menu.php Fri Sep 05 18:40:08 2025 +0200 @@ -1,17 +1,24 @@ $value_plugin ) { foreach ( $value_plugin['category'] as $category_key ) { @@ -96,6 +104,18 @@ if ( isset( $_SESSION['bws_membership_time_check'] ) && isset( $_SESSION['bws_membership_list'] ) && $_SESSION['bws_membership_time_check'] < strtotime( '+12 hours' ) ) { $update_membership_list = false; $plugins_array = $_SESSION['bws_membership_list']; + foreach ( $plugins_array as $plugins_key => $plugins_value ) { + if ( is_array( $plugins_value ) ) { + $plugins_array[ $plugins_key ] = array_map( 'sanitize_text_field', array_map( 'wp_unslash', $plugins_value ) ); + } elseif ( is_object( $plugins_value ) ) { + foreach ( $plugins_value as $plugins_key2 => $plugins_value2 ) { + $plugins_value->$plugins_key2 = sanitize_text_field( wp_unslash( $plugins_value2 ) ); + } + $plugins_array[ $plugins_key ] = $plugins_value; + } else { + $plugins_array[ $plugins_key ] = sanitize_text_field( wp_unslash( $plugins_value ) ); + } + } } if ( ( $update_membership_list && ! empty( $bws_license_key ) ) || ( isset( $_POST['bws_license_submit'] ) && check_admin_referer( plugin_basename( __FILE__ ), 'bws_license_nonce_name' ) ) ) { @@ -202,50 +222,50 @@ } $system_info = array( - 'wp_environment' => array( + 'wp_environment' => array( 'name' => __( 'WordPress Environment', 'bestwebsoft' ), 'data' => array( - __( 'Home URL', 'bestwebsoft' ) => home_url(), - __( 'Website URL', 'bestwebsoft' ) => get_option( 'siteurl' ), - __( 'WP Version', 'bestwebsoft' ) => $wp_version, - __( 'WP Multisite', 'bestwebsoft' ) => $multisite, - __( 'WP Memory Limit', 'bestwebsoft' ) => $wp_memory_limit, - __( 'Active Theme', 'bestwebsoft' ) => $theme['Name'] . ' ' . $theme['Version'] . ' (' . sprintf( __( 'by %s', 'bestwebsoft' ), $theme['Author'] ) . ')', + __( 'Home URL', 'bestwebsoft' ) => home_url(), + __( 'Website URL', 'bestwebsoft' ) => get_option( 'siteurl' ), + __( 'WP Version', 'bestwebsoft' ) => $wp_version, + __( 'WP Multisite', 'bestwebsoft' ) => $multisite, + __( 'WP Memory Limit', 'bestwebsoft' ) => $wp_memory_limit, + __( 'Active Theme', 'bestwebsoft' ) => $theme['Name'] . ' ' . $theme['Version'] . ' (' . sprintf( __( 'by %s', 'bestwebsoft' ), $theme['Author'] ) . ')', ), ), 'server_environment' => array( 'name' => __( 'Server Environment', 'bestwebsoft' ), 'data' => array( - __( 'Operating System', 'bestwebsoft' ) => PHP_OS, - __( 'Server', 'bestwebsoft' ) => isset( $_SERVER['SERVER_SOFTWARE'] ) ? sanitize_email( wp_unslash( $_SERVER['SERVER_SOFTWARE'] ) ) : '', - __( 'PHP Version', 'bestwebsoft' ) => PHP_VERSION, - __( 'PHP Allow URL fopen', 'bestwebsoft' ) => $allow_url_fopen, - __( 'PHP Memory Limit', 'bestwebsoft' ) => $memory_limit, - __( 'Memory Usage', 'bestwebsoft' ) => $memory_usage, - __( 'PHP Max Upload Size', 'bestwebsoft' ) => $upload_max_filesize, - __( 'PHP Max Post Size', 'bestwebsoft' ) => $post_max_size, + __( 'Operating System', 'bestwebsoft' ) => PHP_OS, + __( 'Server', 'bestwebsoft' ) => isset( $_SERVER['SERVER_SOFTWARE'] ) ? sanitize_email( wp_unslash( $_SERVER['SERVER_SOFTWARE'] ) ) : '', + __( 'PHP Version', 'bestwebsoft' ) => PHP_VERSION, + __( 'PHP Allow URL fopen', 'bestwebsoft' ) => $allow_url_fopen, + __( 'PHP Memory Limit', 'bestwebsoft' ) => $memory_limit, + __( 'Memory Usage', 'bestwebsoft' ) => $memory_usage, + __( 'PHP Max Upload Size', 'bestwebsoft' ) => $upload_max_filesize, + __( 'PHP Max Post Size', 'bestwebsoft' ) => $post_max_size, __( 'PHP Max Script Execute Time', 'bestwebsoft' ) => $max_execution_time, - __( 'PHP Exif support', 'bestwebsoft' ) => $exif_read_data, - __( 'PHP IPTC support', 'bestwebsoft' ) => $iptcparse, - __( 'PHP XML support', 'bestwebsoft' ) => $xml_parser_create, - '$_SERVER[HTTP_HOST]' => isset( $_SERVER['HTTP_HOST'] ) ? sanitize_email( wp_unslash( $_SERVER['HTTP_HOST'] ) ) : '', - '$_SERVER[SERVER_NAME]' => isset( $_SERVER['SERVER_NAME'] ) ? sanitize_email( wp_unslash( $_SERVER['SERVER_NAME'] ) ) : '', + __( 'PHP Exif support', 'bestwebsoft' ) => $exif_read_data, + __( 'PHP IPTC support', 'bestwebsoft' ) => $iptcparse, + __( 'PHP XML support', 'bestwebsoft' ) => $xml_parser_create, + '$_SERVER[HTTP_HOST]' => isset( $_SERVER['HTTP_HOST'] ) ? sanitize_email( wp_unslash( $_SERVER['HTTP_HOST'] ) ) : '', + '$_SERVER[SERVER_NAME]' => isset( $_SERVER['SERVER_NAME'] ) ? sanitize_email( wp_unslash( $_SERVER['SERVER_NAME'] ) ) : '', ), ), - 'db' => array( + 'db' => array( 'name' => __( 'Database', 'bestwebsoft' ), 'data' => array( __( 'WP DB version', 'bestwebsoft' ) => get_option( 'db_version' ), __( 'MySQL version', 'bestwebsoft' ) => $wpdb->get_var( 'SELECT VERSION() AS version' ), - __( 'SQL Mode', 'bestwebsoft' ) => $sql_mode, + __( 'SQL Mode', 'bestwebsoft' ) => $sql_mode, ), ), - 'active_plugins' => array( + 'active_plugins' => array( 'name' => __( 'Active Plugins', 'bestwebsoft' ), 'data' => array(), 'count' => 0, ), - 'inactive_plugins' => array( + 'inactive_plugins' => array( 'name' => __( 'Inactive Plugins', 'bestwebsoft' ), 'data' => array(), 'count' => 0, @@ -305,7 +325,7 @@
@@ -420,7 +462,8 @@
>

@@ -501,7 +544,8 @@ href=""> | @@ -509,7 +553,8 @@ href=""> | @@ -517,7 +562,8 @@ href=""> @@ -536,7 +582,8 @@ href=""> () @@ -547,10 +594,11 @@ href=""> - () + () @@ -567,8 +615,12 @@ } $key_plugin_explode = explode( '/', $key_plugin ); + if ( in_array( $key_plugin_explode[0], array( 'car-rental', 'contact-form-multi', 'custom-admin-page', 'adsense-plugin', 'zendesk-help-center', 'bws-adsense' ) ) ) { + $icon = isset( $value_plugin['icon'] ) ? $value_plugin['icon'] : '//ps.w.org/' . $key_plugin_explode[0] . '/assets/icon-256x256.png'; + } else { + $icon = isset( $value_plugin['icon'] ) ? $value_plugin['icon'] : '//ps.w.org/' . $key_plugin_explode[0] . '/assets/icon-256x256.gif'; + } - $icon = isset( $value_plugin['icon'] ) ? $value_plugin['icon'] : '//ps.w.org/' . $key_plugin_explode[0] . '/assets/icon-256x256.png'; $is_pro_isset = isset( $value_plugin['pro_version'] ); $is_installed = array_key_exists( $key_plugin, $all_plugins ); $is_active = in_array( $key_plugin, $active_plugins ) || isset( $sitewide_active_plugins[ $key_plugin ] ); @@ -584,14 +636,19 @@ continue; } - $link_attr = isset( $value_plugin['install_url'] ) ? 'href="' . esc_url( $value_plugin['install_url'] ) . '" target="_blank"' : 'href="' . esc_url( self_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $key_plugin_explode[0] . '&from=import&TB_iframe=true&width=600&height=550' ) ) . '" class="thickbox open-plugin-details-modal"'; + if ( is_multisite() ) { + $link_attr = isset( $value_plugin['install_url'] ) ? 'href="' . esc_url( $value_plugin['install_url'] ) . '" target="_blank"' : 'href="' . esc_url( network_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $key_plugin_explode[0] . '&from=import&TB_iframe=true&width=600&height=550' ) ) . '" class="thickbox open-plugin-details-modal"'; + } else { + $link_attr = isset( $value_plugin['install_url'] ) ? 'href="' . esc_url( $value_plugin['install_url'] ) . '" target="_blank"' : 'href="' . esc_url( self_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $key_plugin_explode[0] . '&from=import&TB_iframe=true&width=600&height=550' ) ) . '" class="thickbox open-plugin-details-modal"'; + } $nothing_found = false; ?>
@@ -621,12 +678,12 @@ echo ' - ' . esc_html__( 'Renew to get updates', 'bestwebsoft' ) . ''; } elseif ( ! empty( $value_plugin['update_availible'] ) ) { $r = $update_availible_all->response[ $value_plugin['update_availible'] ]; - echo ' - ' . sprintf( esc_html__( 'Update to v %s', 'bestwebsoft' ), esc_html( $r->new_version ) ) . ''; + echo ' - ' . sprintf( esc_html__( 'Update to v %s', 'bestwebsoft' ), esc_html( $r->new_version ) ) . ''; } ?>
- 100 ) ? esc_html( mb_substr( $value_plugin['description'], 0, 100 ) ) . '...' : esc_html( $value_plugin['description'] ); ?> + 100 ? mb_substr( $value_plugin['description'], 0, 100 ) . '...' : $value_plugin['description'] ); ?>