Changeset 3487089
- Timestamp:
- 03/20/2026 09:51:35 AM (8 days ago)
- Location:
- rc-site-manager-optimization/trunk
- Files:
-
- 4 edited
-
agency/check_url/check_url_function.php (modified) (8 diffs)
-
rc-site-manager-optimization.php (modified) (2 diffs)
-
readme.txt (modified) (3 diffs)
-
utility/tab_system_fn.php (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
-
rc-site-manager-optimization/trunk/agency/check_url/check_url_function.php
r3485061 r3487089 83 83 84 84 if (empty($last_response)) { 85 // Nessun check ancora fatto86 85 $badge_class = 'rc_sm_bg_secondary'; 87 86 $status_text = __('In Progress', 'rc-site-manager-optimization'); 88 87 } elseif (substr($last_response, 0, 1) === '2') { 89 // 2xx = Success90 88 $badge_class = 'rc_sm_bg_success'; 91 89 $status_text = $last_response; 92 90 } elseif (substr($last_response, 0, 1) === '3') { 93 // 3xx = Redirect (Warning)94 91 $badge_class = 'rc_sm_bg_warning'; 95 92 $status_text = $last_response; 96 93 } else { 97 // 4xx, 5xx, timeout, error = Failed98 94 $badge_class = 'rc_sm_bg_error'; 99 95 $status_text = $last_response; … … 104 100 echo "<td><a href='" . esc_url($url) . "' target='_blank'>" . esc_html($url) . "</a></td>"; 105 101 echo "<td>" . esc_html($url_group) . "</td>"; 106 echo "<td>" . ($badge_class ? "<a href=' " . esc_url($url) . "' target='_blank'><span class='rc_sm_badge " . esc_attr($badge_class) . "'>" . esc_html($status_text) . "</span></a>" : '') . "</td>";102 echo "<td>" . ($badge_class ? "<a href='#' class='rc_sm_modal_agency_url_history' data-id='" . esc_attr($id) . "' data-url='" . esc_attr($url) . "'><span class='rc_sm_badge " . esc_attr($badge_class) . "'>" . esc_html($status_text) . "</span></a>" : '') . "</td>"; 107 103 echo '<td>' . wp_kses_post($ps_html) . '</td>'; 108 104 echo "<td>" . esc_html($last_check) . "</td>"; … … 138 134 global $wpdb; 139 135 140 // Nonce check141 136 $nonce = rc_sm_security_ajax_get_param('rc_sm_agency_url_add_nonce'); 142 137 … … 152 147 } 153 148 154 // Split by newline and/or spaces, handle %20 as separator155 149 $normalized = str_replace(['\r', '%20'], ['', ' '], $raw_input); 156 150 $parts = preg_split('/[\n\s]+/', $normalized); … … 211 205 212 206 $messages = ''; 213 if ($added) $messages .= '<div class="rc_sm_notice_success">' . sprintf(esc_html(__('%d URL(s) added successfully.', 'rc-site-manager-optimization')), $added) . '</div>';207 if ($added) $messages .= '<div class="rc_sm_notice_success">' . sprintf(esc_html(__('%d URL(s) added successfully.', 'rc-site-manager-optimization')), $added) . '</div>'; 214 208 if (!empty($skipped_urls)) $messages .= '<div class="rc_sm_notice_warning">' . esc_html(__('URL already exist:', 'rc-site-manager-optimization')) . $url_list($skipped_urls) . '</div>'; 215 209 if (!empty($invalid_urls)) $messages .= '<div class="rc_sm_notice_error">' . esc_html(__('Invalid URL format:', 'rc-site-manager-optimization')) . $url_list($invalid_urls) . '</div>'; … … 222 216 global $wpdb; 223 217 224 // Security verification225 218 if (!rc_sm_security_ajax_verify()) { 226 219 return; … … 262 255 global $wpdb; 263 256 264 // Security verification265 257 if (!rc_sm_security_ajax_verify()) { 266 258 wp_send_json_error(['msg' => __('Security error.', 'rc-site-manager-optimization')]); … … 301 293 } 302 294 303 // Genera HTML tabella storico304 295 ob_start(); 305 296 ?> -
rc-site-manager-optimization/trunk/rc-site-manager-optimization.php
r3485061 r3487089 3 3 * Plugin Name: RC Site Manager & Optimization 4 4 * Description: All-in-one Wordpress manager: control WooCommerce, SEO, caching, media, and multilingual tools from one dashboard. 5 * Version: 2.4. 55 * Version: 2.4.6 6 6 * Author: Rocket Comunicazione 7 7 * Author URI: https://www.rocketcomunicazione.com … … 13 13 if (!defined('ABSPATH')) { exit; } 14 14 15 if ( is_admin() ) { 16 @ini_set( 'display_errors', 1 ); 17 } 18 19 20 define('RC_SM_PLUGIN_VERSION', '2.4.5'); 15 16 define('RC_SM_PLUGIN_VERSION', '2.4.6'); 21 17 22 18 define( 'RC_SM_SITE_URL', home_url() ); -
rc-site-manager-optimization/trunk/readme.txt
r3485061 r3487089 5 5 Tested up to: 6.9 6 6 Requires PHP: 8.1 7 Stable tag: 2.4. 57 Stable tag: 2.4.6 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 160 160 == Changelog == 161 161 162 163 = 2.4.6 - March 20, 2026 = 164 * Minor bug fixes and improvement 162 165 163 166 = 2.4.5 - March 17, 2026 = … … 313 316 == Upgrade Notice == 314 317 318 = 2.4.6 - March 20, 2026 = 319 Minor bug fixes. 320 315 321 = 2.4.5 - March 17, 2026 = 316 322 Minor bug fixes. -
rc-site-manager-optimization/trunk/utility/tab_system_fn.php
r3476531 r3487089 32 32 __( 'Upload Max Filesize', 'rc-site-manager-optimization' ) => [ 'value' => rc_sm_system_format_bytes( ini_get( 'upload_max_filesize' ) ), 'source' => "ini_get('upload_max_filesize')" ], 33 33 __( 'Max Input Vars', 'rc-site-manager-optimization' ) => [ 'value' => ini_get( 'max_input_vars' ), 'source' => "ini_get('max_input_vars')" ], 34 __( 'OPcache', 'rc-site-manager-optimization' ) => ( function() { 35 $enabled = function_exists( 'opcache_get_status' ) && @opcache_get_status( false ) !== false; 36 $class = $enabled ? 'rc_sm_color_success' : 'rc_sm_color_error'; 37 $text = $enabled ? __( 'Yes', 'rc-site-manager-optimization' ) : __( 'No', 'rc-site-manager-optimization' ); 38 return [ 'value' => '<span class="rc_sm_bold ' . $class . '">' . esc_html( $text ) . '</span>', 'source' => 'opcache_get_status()', 'raw' => true ]; 39 } )(), 34 40 ]; 35 41 } … … 42 48 $rest_ok = ! is_wp_error( $rest_response ) && wp_remote_retrieve_response_code( $rest_response ) === 200; 43 49 $rest_html = $rest_ok 44 ? esc_html__( ' Active', 'rc-site-manager-optimization' )45 : '<span class="rc_sm_bold rc_sm_color_error">' . esc_html__( 'No t reachable', 'rc-site-manager-optimization' ) . '</span>';50 ? esc_html__( 'Yes', 'rc-site-manager-optimization' ) 51 : '<span class="rc_sm_bold rc_sm_color_error">' . esc_html__( 'No', 'rc-site-manager-optimization' ) . '</span>'; 46 52 47 53 $discourage = get_option( 'blog_public' ) == '0'; … … 51 57 52 58 return [ 53 __( 'WordPress Version', 'rc-site-manager-optimization' ) => [ 'value' => get_bloginfo( 'version' ), 'source' => "get_bloginfo('version')" ], 54 __( 'WP Memory Limit', 'rc-site-manager-optimization' ) => [ 'value' => rc_sm_system_format_bytes( WP_MEMORY_LIMIT ), 'source' => 'WP_MEMORY_LIMIT' ], 59 __( 'WordPress Version', 'rc-site-manager-optimization' ) => ( function() { 60 $update_core = get_site_transient( 'update_core' ); 61 $has_update = false; 62 if ( ! empty( $update_core->updates ) ) { 63 foreach ( $update_core->updates as $update ) { 64 if ( isset( $update->response ) && $update->response === 'upgrade' ) { 65 $has_update = true; 66 break; 67 } 68 } 69 } 70 $class = $has_update ? 'rc_sm_color_error' : 'rc_sm_color_success'; 71 return [ 'value' => '<span class="rc_sm_bold ' . $class . '">' . esc_html( get_bloginfo( 'version' ) ) . '</span>', 'source' => "get_bloginfo('version')", 'raw' => true ]; 72 } )(), 73 __( 'WP Memory Limit', 'rc-site-manager-optimization' ) => ( function() { 74 $raw = WP_MEMORY_LIMIT; 75 $num = (int) $raw; 76 $unit = strtoupper( substr( trim( $raw ), -1 ) ); 77 $mb = $unit === 'G' ? $num * 1024 : ( $unit === 'K' ? $num / 1024 : $num ); 78 $class = $mb <= 40 ? 'rc_sm_color_error' : 'rc_sm_color_success'; 79 $str = rc_sm_system_format_bytes( $raw ); 80 return [ 'value' => '<span class="rc_sm_bold ' . $class . '">' . esc_html( $str ) . '</span>', 'source' => 'WP_MEMORY_LIMIT', 'raw' => true ]; 81 } )(), 55 82 __( 'WP Max Memory Limit', 'rc-site-manager-optimization' ) => [ 'value' => rc_sm_system_format_bytes( WP_MAX_MEMORY_LIMIT ), 'source' => 'WP_MAX_MEMORY_LIMIT' ], 56 83 __( 'Multisite', 'rc-site-manager-optimization' ) => [ 'value' => is_multisite() ? __( 'Yes', 'rc-site-manager-optimization' ) : __( 'No', 'rc-site-manager-optimization' ), 'source' => 'is_multisite()' ], 57 __( 'Debug Mode', 'rc-site-manager-optimization' ) => [ 'value' => defined( 'WP_DEBUG' ) && WP_DEBUG ? __( 'Enabled', 'rc-site-manager-optimization' ) : __( 'Disabled', 'rc-site-manager-optimization' ), 'source' => 'WP_DEBUG' ], 84 __( 'Debug Mode', 'rc-site-manager-optimization' ) => ( function() { 85 $enabled = defined( 'WP_DEBUG' ) && WP_DEBUG; 86 $text = $enabled ? __( 'Enabled', 'rc-site-manager-optimization' ) : __( 'Disabled', 'rc-site-manager-optimization' ); 87 if ( $enabled ) { 88 return [ 'value' => '<span class="rc_sm_bold rc_sm_color_error">' . esc_html( $text ) . '</span>', 'source' => 'WP_DEBUG', 'raw' => true ]; 89 } 90 return [ 'value' => esc_html( $text ), 'source' => 'WP_DEBUG' ]; 91 } )(), 58 92 __( 'REST API', 'rc-site-manager-optimization' ) => [ 'value' => $rest_html, 'source' => 'get_rest_url()', 'raw' => true ], 59 93 __( 'Discourage Search Engines', 'rc-site-manager-optimization' ) => [ 'value' => $discourage_html, 'source' => "get_option('blog_public')", 'raw' => true ], 94 __( 'Timezone', 'rc-site-manager-optimization' ) => [ 'value' => esc_html( wp_timezone_string() ), 'source' => 'wp_timezone_string()' ], 95 __( 'Locale', 'rc-site-manager-optimization' ) => [ 'value' => esc_html( get_locale() ), 'source' => 'get_locale()' ], 96 __( 'Site URL', 'rc-site-manager-optimization' ) => [ 'value' => esc_html( get_option( 'siteurl' ) ), 'source' => "get_option('siteurl')" ], 97 __( 'Home URL', 'rc-site-manager-optimization' ) => [ 'value' => esc_html( get_option( 'home' ) ), 'source' => "get_option('home')" ], 98 __( 'Disable WP Cron', 'rc-site-manager-optimization' ) => ( function() { 99 $disabled = defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON; 100 $text = $disabled ? __( 'Yes', 'rc-site-manager-optimization' ) : __( 'No', 'rc-site-manager-optimization' ); 101 return [ 'value' => esc_html( $text ), 'source' => 'DISABLE_WP_CRON' ]; 102 } )(), 103 __( 'Active Plugins', 'rc-site-manager-optimization' ) => [ 'value' => esc_html( count( get_option( 'active_plugins', [] ) ) ), 'source' => 'get_option(active_plugins)' ], 60 104 ]; 61 105 } … … 64 108 global $wpdb; 65 109 $db_size = $wpdb->get_var( "SELECT SUM(data_length + index_length) FROM information_schema.tables WHERE table_schema = '" . DB_NAME . "'" ); 66 $db_size_str = $db_size ? rc_sm_system_format_bytes( round( $db_size / 1048576 ) . 'M' ) : 'N/A'; 110 if ( $db_size ) { 111 $db_size_mb = round( $db_size / 1048576 ); 112 $db_size_str = rc_sm_system_format_bytes( $db_size_mb . 'M' ); 113 if ( $db_size_mb >= 1024 ) { 114 $db_size_html = '<span class="rc_sm_bold rc_sm_color_error">' . esc_html( $db_size_str ) . '</span>'; 115 } else { 116 $db_size_html = esc_html( $db_size_str ); 117 } 118 } else { 119 $db_size_html = 'N/A'; 120 } 67 121 return [ 68 122 __( 'MySQL Version', 'rc-site-manager-optimization' ) => [ 'value' => $wpdb->db_version(), 'source' => '$wpdb->db_version()' ], 69 123 __( 'Database Name', 'rc-site-manager-optimization' ) => [ 'value' => DB_NAME, 'source' => 'DB_NAME' ], 70 124 __( 'Table Prefix', 'rc-site-manager-optimization' ) => [ 'value' => $wpdb->prefix, 'source' => '$wpdb->prefix' ], 71 __( 'Database Size', 'rc-site-manager-optimization' ) => [ 'value' => $db_size_ str, 'source' => 'information_schema.tables'],125 __( 'Database Size', 'rc-site-manager-optimization' ) => [ 'value' => $db_size_html, 'source' => 'information_schema.tables', 'raw' => true ], 72 126 ]; 73 127 } … … 79 133 __( 'Hostname', 'rc-site-manager-optimization' ) => [ 'value' => php_uname( 'n' ), 'source' => "php_uname('n')" ], 80 134 __( 'Current Server Time', 'rc-site-manager-optimization' ) => [ 'value' => gmdate( 'd/m/Y H:i:s' ) . ' UTC', 'source' => 'gmdate()' ], 135 __( 'SSL', 'rc-site-manager-optimization' ) => ( function() { 136 $host = parse_url( home_url(), PHP_URL_HOST ); 137 $ctx = stream_context_create( [ 'ssl' => [ 'capture_peer_cert' => true, 'verify_peer' => false, 'verify_peer_name' => false ] ] ); 138 $fp = @stream_socket_client( 'ssl://' . $host . ':443', $errno, $errstr, 5, STREAM_CLIENT_CONNECT, $ctx ); 139 if ( $fp ) { 140 fclose( $fp ); 141 return [ 'value' => esc_html__( 'Yes', 'rc-site-manager-optimization' ), 'source' => 'stream_socket_client(ssl)' ]; 142 } 143 return [ 'value' => '<span class="rc_sm_bold rc_sm_color_error">' . esc_html__( 'No', 'rc-site-manager-optimization' ) . '</span>', 'source' => 'stream_socket_client(ssl)', 'raw' => true ]; 144 } )(), 145 __( 'HTTPS Redirect', 'rc-site-manager-optimization' ) => ( function() { 146 $http_url = preg_replace( '#^https://#', 'http://', home_url() ); 147 $response = wp_remote_get( $http_url, [ 'timeout' => 5, 'redirection' => 0, 'sslverify' => false ] ); 148 $code = ! is_wp_error( $response ) ? wp_remote_retrieve_response_code( $response ) : 0; 149 $location = ! is_wp_error( $response ) ? wp_remote_retrieve_header( $response, 'location' ) : ''; 150 $redirects = in_array( $code, [ 301, 302 ], true ) && strpos( $location, 'https://' ) === 0; 151 if ( $redirects ) { 152 return [ 'value' => esc_html__( 'Yes', 'rc-site-manager-optimization' ), 'source' => 'wp_remote_get(http)' ]; 153 } 154 return [ 'value' => '<span class="rc_sm_bold rc_sm_color_error">' . esc_html__( 'No', 'rc-site-manager-optimization' ) . '</span>', 'source' => 'wp_remote_get(http)', 'raw' => true ]; 155 } )(), 156 __( 'Object Cache', 'rc-site-manager-optimization' ) => ( function() { 157 $active = wp_using_ext_object_cache(); 158 $type = ''; 159 if ( $active ) { 160 if ( class_exists( 'Redis' ) || class_exists( 'RedisClient' ) || defined( 'WP_REDIS_VERSION' ) ) $type = 'Redis'; 161 elseif ( class_exists( 'Memcached' ) || class_exists( 'Memcache' ) ) $type = 'Memcached'; 162 } 163 $text = $active ? ( $type ?: __( 'Yes', 'rc-site-manager-optimization' ) ) : __( 'No', 'rc-site-manager-optimization' ); 164 $class = $active ? 'rc_sm_color_success' : 'rc_sm_color_error'; 165 return [ 'value' => '<span class="rc_sm_bold ' . $class . '">' . esc_html( $text ) . '</span>', 'source' => 'wp_using_ext_object_cache()', 'raw' => true ]; 166 } )(), 81 167 ]; 82 168 } … … 116 202 $free = disk_free_space( ABSPATH ); 117 203 $total = disk_total_space( ABSPATH ); 204 205 if ( $free !== false ) { 206 $free_gb = round( $free / 1073741824, 2 ); 207 $free_str = $free_gb . ' GB'; 208 $free_class = $free_gb < 1 ? 'rc_sm_color_error' : 'rc_sm_color_success'; 209 $free_html = '<span class="rc_sm_bold ' . $free_class . '">' . esc_html( $free_str ) . '</span>'; 210 } else { 211 $free_html = 'N/A'; 212 } 213 118 214 return [ 119 __( 'Free Space', 'rc-site-manager-optimization' ) => [ 'value' => $free !== false ? round( $free / 1073741824, 2 ) . ' GB' : 'N/A', 'source' => 'disk_free_space(ABSPATH)'],215 __( 'Free Space', 'rc-site-manager-optimization' ) => [ 'value' => $free_html, 'source' => 'disk_free_space(ABSPATH)', 'raw' => true ], 120 216 __( 'Total Space', 'rc-site-manager-optimization' ) => [ 'value' => $total !== false ? round( $total / 1073741824, 2 ) . ' GB' : 'N/A', 'source' => 'disk_total_space(ABSPATH)' ], 121 217 ]; … … 178 274 $cdn_html = $cdn 179 275 ? '<span class="rc_sm_bold rc_sm_color_success">' . esc_html( $cdn ) . '</span>' 180 : '<span class="rc_sm_bold rc_sm_color_error">None</span>';276 : esc_html__( 'No', 'rc-site-manager-optimization' ); 181 277 182 278 $server_ip = isset( $_SERVER['SERVER_ADDR'] ) ? sanitize_text_field( $_SERVER['SERVER_ADDR'] ) : 'N/A'; … … 231 327 $rows = []; 232 328 $update_plugins = get_site_transient( 'update_plugins' ); 329 $update_themes = get_site_transient( 'update_themes' ); 233 330 $update_core = get_site_transient( 'update_core' ); 234 331 $today = current_time( 'timestamp' ); … … 237 334 if ( ! $mtime ) return ''; 238 335 $days = (int) floor( ( $today - $mtime ) / DAY_IN_SECONDS ); 239 return $days > 30 240 ? ' <span class="rc_sm_bold rc_sm_color_error">(' . $days . ')</span>' 241 : ' (' . $days . ')'; 336 return ' (' . $days . ')'; 242 337 }; 243 338 … … 253 348 } 254 349 } 255 $core_name = 'WordPress ' . get_bloginfo( 'version' ); 256 if ( $core_new_version ) { 257 $core_name .= ' <span class="rc_sm_bold rc_sm_color_error">' . esc_html( $core_new_version ) . '</span>'; 258 } 350 $core_name = $core_new_version 351 ? '<span class="rc_sm_color_error">' . esc_html( 'WordPress ' . get_bloginfo( 'version' ) . ' ' . $core_new_version ) . '</span>' 352 : esc_html( 'WordPress ' . get_bloginfo( 'version' ) ); 259 353 $core_date = $core_mtime ? date_i18n( 'd/m/Y', $core_mtime ) . $days_html( $core_mtime ) : 'N/A'; 260 354 $rows[] = [ 'type' => 'Core', 'name' => $core_name, 'date' => $core_date ]; … … 288 382 } 289 383 290 $name_html = esc_html( $name . ' ' . $version ); 291 if ( $new_version ) { 292 $name_html .= ' <span class="rc_sm_bold rc_sm_color_error">' . esc_html( $new_version ) . '</span>'; 293 } 384 $name_html = $new_version 385 ? '<span class="rc_sm_color_error">' . esc_html( $name . ' ' . $version . ' ' . $new_version ) . '</span>' 386 : esc_html( $name . ' ' . $version ); 294 387 295 388 $is_builder = in_array( dirname( $plugin_file ), $builder_exact_slugs ); … … 313 406 314 407 foreach ( $themes_to_show as $theme ) { 408 $stylesheet = $theme->get_stylesheet(); 315 409 $theme_name = $theme->get( 'Name' ) . ' ' . $theme->get( 'Version' ); 316 $theme_path = get_theme_root() . '/' . $ theme->get_stylesheet(). '/style.css';410 $theme_path = get_theme_root() . '/' . $stylesheet . '/style.css'; 317 411 $theme_mtime = @filemtime( $theme_path ); 318 412 $theme_date = $theme_mtime ? date_i18n( 'd/m/Y', $theme_mtime ) . $days_html( $theme_mtime ) : 'N/A'; 319 $rows[] = [ 'type' => 'Theme', 'name' => esc_html( $theme_name ), 'date' => $theme_date ]; 413 414 $new_version = $update_themes->response[ $stylesheet ]['new_version'] ?? ''; 415 $name_html = $new_version 416 ? '<span class="rc_sm_color_error">' . esc_html( $theme_name . ' ' . $new_version ) . '</span>' 417 : esc_html( $theme_name ); 418 419 $rows[] = [ 'type' => 'Theme', 'name' => $name_html, 'date' => $theme_date ]; 320 420 } 321 421 … … 326 426 327 427 function rc_sm_system_info_table( array $data ): string { 428 $marked_labels = [ 429 __( 'PHP Version', 'rc-site-manager-optimization' ), 430 __( 'WordPress Version', 'rc-site-manager-optimization' ), 431 __( 'Memory Limit', 'rc-site-manager-optimization' ), 432 __( 'WP Memory Limit', 'rc-site-manager-optimization' ), 433 __( 'Debug Mode', 'rc-site-manager-optimization' ), 434 __( 'Discourage Search Engines', 'rc-site-manager-optimization' ), 435 __( 'Database Size', 'rc-site-manager-optimization' ), 436 __( 'CDN', 'rc-site-manager-optimization' ), 437 __( 'Free Space', 'rc-site-manager-optimization' ), 438 'php_errorlog', 439 'debug.log', 440 __( 'OPcache', 'rc-site-manager-optimization' ), 441 __( 'Active Plugins', 'rc-site-manager-optimization' ), 442 __( 'Object Cache', 'rc-site-manager-optimization' ), 443 444 ]; 328 445 $html = '<table class="widefat striped rc_sm_table_system">'; 329 446 foreach ( $data as $label => $row ) { 330 $is_raw = ! empty( $row['raw'] ); 447 $is_raw = ! empty( $row['raw'] ); 448 $label_out = in_array( $label, $marked_labels, true ) 449 ? '<mark>' . esc_html( $label ) . '</mark>' 450 : esc_html( $label ); 331 451 $html .= '<tr>'; 332 $html .= '<td class="rc_sm_width_4"><strong>' . esc_html( $label ). '</strong></td>';452 $html .= '<td class="rc_sm_width_4"><strong>' . $label_out . '</strong></td>'; 333 453 $html .= '<td class="rc_sm_width_4">' . ( $is_raw ? wp_kses_post( $row['value'] ) : esc_html( $row['value'] ) ) . '</td>'; 334 454 $html .= '<td class="rc_sm_width_4"><code>' . esc_html( $row['source'] ) . '</code></td>'; … … 340 460 341 461 function rc_sm_system_info_table_env( array $rows ): string { 462 $marked_types = [ 'Core', 'Builder', 'Theme' ]; 342 463 $html = '<table class="widefat striped rc_sm_table_system">'; 343 464 foreach ( $rows as $row ) { 465 $type_out = in_array( $row['type'], $marked_types, true ) 466 ? '<mark>' . esc_html( $row['type'] ) . '</mark>' 467 : esc_html( $row['type'] ); 344 468 $html .= '<tr>'; 345 $html .= '<td class="rc_sm_width_4"><strong>' . esc_html( $row['type'] ). '</strong></td>';469 $html .= '<td class="rc_sm_width_4"><strong>' . $type_out . '</strong></td>'; 346 470 $html .= '<td class="rc_sm_width_4">' . wp_kses_post( $row['name'] ) . '</td>'; 347 471 $html .= '<td class="rc_sm_width_4">' . wp_kses_post( $row['date'] ) . '</td>';
Note: See TracChangeset
for help on using the changeset viewer.