Plugin Directory

Changeset 3219455


Ignore:
Timestamp:
01/09/2025 08:09:55 AM (12 months ago)
Author:
nsp-code
Message:

Version: 2.5.8

Location:
wp-hide-security-enhancer
Files:
208 added
41 edited

Legend:

Unmodified
Added
Removed
  • wp-hide-security-enhancer/trunk/include/admin-interfaces/security-scan.class.php

    r3183924 r3219455  
    2525            function init()
    2626                {
     27                    if ( is_admin() )
     28                        $this->run();
    2729                    if ( is_admin() &&  current_user_can ( 'manage_options' ) )
    28                         $this->run();
     30                        $this->scan_ajax();
    2931                }
    3032           
     
    137139 
    138140                    add_action( 'admin_notice',                     array ( $this, 'admin_notices' ) ); 
    139                    
     141                }
     142               
     143               
     144            function scan_ajax()
     145                {
    140146                    add_action( 'wp_ajax_wph_site_scan',            array ( $this, 'wp_ajax_wph_site_scan' ) );
    141147                    add_action( 'wp_ajax_wph_site_scan_progress',   array ( $this, 'wp_ajax_wph_site_scan_progress' ) );
    142148                    add_action( 'wp_ajax_wph_site_scan_ignore',     array ( $this, 'wp_ajax_wph_site_scan_ignore' ) );
    143149                    add_action( 'wp_ajax_wph_site_scan_restore',    array ( $this, 'wp_ajax_wph_site_scan_restore' ) );
    144                    
    145150                }
    146151               
  • wp-hide-security-enhancer/trunk/include/functions.class.php

    r3209226 r3219455  
    28012801                    return $plugin_data;
    28022802                }
    2803                
     2803
    28042804               
    28052805               
  • wp-hide-security-enhancer/trunk/include/module.class.php

    r2709073 r3219455  
    3737                   
    3838                    return FALSE;   
     39                }
     40               
     41            function get_interface_menu_position()
     42                {
     43                    return 10;
    3944                }
    4045           
  • wp-hide-security-enhancer/trunk/include/module.component.class.php

    r2977600 r3219455  
    2121                   
    2222                    $this->module_settings  =   $this->get_module_settings();
     23                   
     24                    $this->init();
     25                }
     26               
     27            function init()
     28                {
     29                   
    2330                }
    2431           
  • wp-hide-security-enhancer/trunk/include/wph.class.php

    r3209226 r3219455  
    230230                            do_action('wp-hide/loaded_module', $module);
    231231                           
    232                             $interface_menu_data    =   $module->get_interface_menu_data();
    233                             $menu_position          =   $interface_menu_data['menu_position'];
     232                            $menu_position    =   $module->get_interface_menu_position();
    234233                           
    235234                            $this->modules[$menu_position]        =   $module;
     
    720719            function ob_start_callback( $buffer )
    721720                {
    722                    
    723                     if($this->disable_ob_start_callback === TRUE)
     721                    if ( ! function_exists( 'do_action' ) )
     722                        return $buffer;
     723                           
     724                    do_action( 'wp-hide/before_ob_start_callback', $buffer );
     725                   
     726                    if( $this->disable_ob_start_callback === TRUE )
    724727                        return $buffer;
    725728                   
     
    744747                            return $buffer;
    745748                        }
     749                   
     750                    //provide a filter to disable the buffer processing
     751                    if  ( apply_filters('wp-hide/ignore_ob_start_callback', FALSE, $buffer )     ===    TRUE   )
     752                        return $buffer;
    746753                       
    747754                    //check for xml content tupe
     
    751758                    if ( in_array( $headers_content_type , array( 'text/xml', 'application/rss+xml' ) )    &&  ! is_null ( $this->functions ) )
    752759                        {
    753 
     760                            $buffer =   apply_filters( 'wp-hide/ob_start_callback/pre_replacements',  $buffer );
     761                           
    754762                            //do only url replacements
    755763                            $replacement_list   =   $this->functions->get_replacement_list();
     
    758766                            $buffer =   $this->functions->content_urls_replacement($buffer,  $replacement_list );
    759767                           
    760                             //if html comments remove is on, run a regex
    761                             $option_remove_html_comments =   $this->functions->get_module_item_setting( 'remove_html_comments' );
    762                             if ( ! empty ( $option_remove_html_comments )   &&  $option_remove_html_comments    ==  'yes' )
    763                                 $buffer =   WPH_module_general_html::remove_html_comments( $buffer );   
     768                            //if html comments remove is on, run a regex, unless is application/json
     769                            if ( ! in_array( $headers_content_type , array( 'application/json' ) ) )
     770                                {
     771                                    $option_remove_html_comments =   $this->functions->get_module_item_setting( 'remove_html_comments' );
     772                                    if ( ! empty ( $option_remove_html_comments )   &&  $option_remove_html_comments    ==  'yes' )
     773                                        $buffer =   WPH_module_general_html::remove_html_comments( $buffer );;   
     774                                }   
    764775                           
    765776                            return $buffer;   
    766777                        }   
    767                    
    768                        
    769                     //provide a filter to disable the replacements
    770                     if  ( apply_filters('wp-hide/ignore_ob_start_callback', FALSE, $buffer)     === TRUE   )
    771                         return $buffer;
    772                        
     778                         
    773779                    //check headers fir content-encoding
    774780                    if(function_exists('apache_response_headers'))
  • wp-hide-security-enhancer/trunk/modules/components/general-admin-bar.php

    r2632106 r3219455  
    2121                    $wp_roles   =   get_option( $wpdb->base_prefix . 'user_roles');
    2222                   
     23                    if ( ! is_array ( $wp_roles ) )
     24                        return $this->module_settings;
     25                   
    2326                    $first  =   TRUE;
    2427                    foreach  ( $wp_roles     as  $role_slug  =>  $role )
     
    3538            function _prepare_modle_setting( $role_slug, $role_name, $first )
    3639                {
    37                     $help_description   =   '';
    38                    
    39                     if  ( $first )
    40                         $help_description   =   'The admin bar is a floating bar that contains useful administration screen links such as add a new post, see pending comments, edit your profile etc. It can be extended by plugins to add additional functionality for example SEO and more. <br /><br />';
    41                        
    42                     $help_description   .=  __('Remove WordPress Admin Bar for ',    'wp-hide-security-enhancer') . $role_name . ' ' .  __('role' ,    'wp-hide-security-enhancer');
    43                    
    4440                    $module_setting     =   array(
    4541                                                                    'id'                    =>  'remove_admin_bar_' . $role_slug,
    46                                                                     'label'                 =>  __('Remove Admin Bar for ',    'wp-hide-security-enhancer') . $role_name,
    47                                                                     'description'           =>  __('Remove WordPress Admin Bar for ',    'wp-hide-security-enhancer') . $role_name . ' ' .  __('role, which is being displayed by default on front side of your website.',    'wp-hide-security-enhancer'),
    48                                                                    
    49                                                                     'help'          =>  array(
    50                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove Admin Bar for ',    'wp-hide-security-enhancer') . $role_name . ' ' .  __('role.',    'wp-hide-security-enhancer'),
    51                                                                                                 'description'               =>  $help_description,
    52                                                                                                 'option_documentation_url'  =>  'https://wp-hide.com/documentation/general-html-admin-bar/'
    53                                                                                                 ),
    5442                                                                   
    5543                                                                    'input_type'            =>  'radio',
    56                                                                     'options'               =>  array(
    57                                                                                                         'no'        =>  __('No',     'wp-hide-security-enhancer'),
    58                                                                                                         'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
    59                                                                                                         ),
     44                                                   
    6045                                                                    'default_value'         =>  'no',
    6146                                                                   
     
    6752                                                                    );
    6853                   
    69                     return $module_setting;   
     54                    return $module_setting;
     55         
     56                }
     57               
     58               
     59            /**
     60            * Add the descriptin options to the component
     61            *
     62            * @param mixed $component_settings
     63            */
     64            function set_module_components_description( $component_settings )
     65                {
     66                    global $wpdb;
     67                   
     68                    $wp_roles   =   get_option( $wpdb->prefix . 'user_roles');
     69                   
     70                    $first  =   TRUE;
     71                   
     72                    foreach ( $component_settings   as  $component_key  =>  $component_setting )
     73                        {
     74                   
     75                            foreach  ( $wp_roles     as  $role_slug  =>  $role )
     76                                {
     77                                    if ( strcmp( 'remove_admin_bar_' . $role_slug , $component_setting['id'] ) !== 0 )
     78                                        continue;
     79                                   
     80                                    $help_description   =   '';
     81                   
     82                                    if  ( $first )
     83                                        $help_description   =   __( 'The admin bar is a floating bar that contains useful administration screen links such as add a new post, see pending comments, edit your profile etc. It can be extended by plugins to add additional functionality for example SEO and more.',    'wp-hide-security-enhancer') . ' <br /><br />';
     84                                       
     85                                    $help_description   .=  __('Remove WordPress Admin Bar for ',    'wp-hide-security-enhancer') . $role['name'] . ' ' .  __('role' ,    'wp-hide-security-enhancer');
     86                                   
     87                                   
     88                                    $component_setting =   array_merge ( $component_setting , array(
     89                                                                                                        'label'                 =>  __('Remove Admin Bar for ',    'wp-hide-security-enhancer') . $role['name'],
     90                                                                                                        'description'           =>  __('Remove WordPress Admin Bar for ',    'wp-hide-security-enhancer') . $role['name'] . ' ' .  __('role, which is being displayed by default on front side of your website.',    'wp-hide-security-enhancer'),
     91                                                                                                       
     92                                                                                                        'help'          =>  array(
     93                                                                                                                                    'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove Admin Bar for ',    'wp-hide-security-enhancer') . $role['name'] . ' ' .  __('role.',    'wp-hide-security-enhancer'),
     94                                                                                                                                    'description'               =>  $help_description,
     95                                                                                                                                    'option_documentation_url'  =>  'https://www.wp-hide.com/documentation/general-html-admin-bar/'
     96                                                                                                                                    ),
     97                                                                                                       
     98                                                                                                        'options'               =>  array(
     99                                                                                                                                            'no'        =>  __('No',     'wp-hide-security-enhancer'),
     100                                                                                                                                            'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
     101                                                                                                                                            ),                       
     102                                                                                                                                ) );
     103                                                                                                                               
     104                                    $component_settings[ $component_key ]   =   $component_setting;
     105                                   
     106                                    $first  =   FALSE;
     107                                   
     108                                    break;
     109                                }
     110                        }   
     111                   
     112                    return $component_settings;
     113                   
    70114                }
    71115               
  • wp-hide-security-enhancer/trunk/modules/components/general-block-detectors.php

    r3104976 r3219455  
    1515                    $this->module_settings[]                  =   array(
    1616                                                                    'id'            =>  'block_detectors',
    17                                                                     'label'         =>  __('Block Theme / Plugin detectors.',    'wp-hide-security-enhancer'),
    18                                                                     'description'   =>  __('Block common Theme / Plugin detectors and scanners.', 'wp-hide-security-enhancer'),
    19                                                                    
    20                                                                     'help'          =>  array(
    21                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Block Theme / Plugin detectors',    'wp-hide-security-enhancer'),
    22                                                                                                 'description'               =>  __("Enhance your website's privacy and security with the Block Theme Detectors feature. This tool prevents known user agents and IP addresses associated with popular theme detectors from accessing your site's design and theme-related information. By doing so, it keeps your creative choices private and reduces the risk of targeted attacks exploiting specific theme vulnerabilities." , 'wp-hide-security-enhancer')
    23                                                                                                                                 . "<br /><strong>" . __( "Key Benefits", 'wp-hide-security-enhancer') . ":</strong>
    24                                                                                                                                         <ul>
    25                                                                                                                                              <li>" . __(  "Privacy: Protect your website's theme details from being copied or analyzed", 'wp-hide-security-enhancer') . "</li>
    26                                                                                                                                              <li>" . __('Security: Minimize exposure to potential threats',    'wp-hide-security-enhancer') .".</li>
    27                                                                                                                                              <li>" . __('Performance: Optimize server resources by blocking unnecessary traffic',    'wp-hide-security-enhancer') .".</li>
    28                                                                                                                                              <li>" . __('Competitive Edge: Maintain a unique brand identity',    'wp-hide-security-enhancer') .".</li>
    29                                                                                                                                         </ul>",
    30                                                                                                 'option_documentation_url'  =>  'https://wp-hide.com/documentation/block-theme-plugin-detectors/'
    31                                                                                                 ),
    3217                                                                   
    3318                                                                    'input_type'    =>  'radio',
    34                                                                     'options'       =>  array(
    35                                                                                                 'no'        =>  __('No',     'wp-hide-security-enhancer'),
    36                                                                                                 'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
    37                                                                                                 ),
     19                                             
    3820                                                                    'default_value' =>  'no',
    3921                                                                   
     
    4628                    return $this->module_settings;   
    4729                }
     30               
     31           
     32            function set_module_components_description( $component_settings )
     33                {
     34
     35                    foreach ( $component_settings   as  $component_key  =>  $component_setting )
     36                        {
     37                            if ( ! isset ( $component_setting['id'] ) )
     38                                continue;
     39                           
     40                            switch ( $component_setting['id'] )
     41                                {
     42                                    case 'block_detectors' :
     43                                                                $component_setting =   array_merge ( $component_setting , array(
     44                                                                                                                                    'label'         =>  __('Block Theme / Plugin detectors.',    'wp-hide-security-enhancer'),
     45                                                                                                                                    'description'   =>  __('Block common Theme / Plugin detectors and scanners.', 'wp-hide-security-enhancer'),
     46                                                                                                                                   
     47                                                                                                                                    'help'          =>  array(
     48                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Block Theme / Plugin detectors',    'wp-hide-security-enhancer'),
     49                                                                                                                                                                'description'               =>  __("Enhance your website's privacy and security with the Block Theme Detectors feature. This tool prevents known user agents and IP addresses associated with popular theme detectors from accessing your site's design and theme-related information. By doing so, it keeps your creative choices private and reduces the risk of targeted attacks exploiting specific theme vulnerabilities." , 'wp-hide-security-enhancer')
     50                                                                                                                                                                                                . "<br /><strong>" . __( "Key Benefits", 'wp-hide-security-enhancer') . ":</strong>
     51                                                                                                                                                                                                        <ul>
     52                                                                                                                                                                                                             <li>" . __(  "Privacy: Protect your website's theme details from being copied or analyzed", 'wp-hide-security-enhancer') . "</li>
     53                                                                                                                                                                                                             <li>" . __('Security: Minimize exposure to potential threats',    'wp-hide-security-enhancer') .".</li>
     54                                                                                                                                                                                                             <li>" . __('Performance: Optimize server resources by blocking unnecessary traffic',    'wp-hide-security-enhancer') .".</li>
     55                                                                                                                                                                                                             <li>" . __('Competitive Edge: Maintain a unique brand identity',    'wp-hide-security-enhancer') .".</li>
     56                                                                                                                                                                                                        </ul>",
     57                                                                                                                                                                'option_documentation_url'  =>  'https://wp-hide.com/documentation/block-theme-plugin-detectors/'
     58                                                                                                                                                                ),
     59                                                                                                                                   
     60                                                                                                                                    'options'       =>  array(
     61                                                                                                                                                                'no'        =>  __('No',     'wp-hide-security-enhancer'),
     62                                                                                                                                                                'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
     63                                                                                                                                                                ),
     64                                                                                                                                ) );
     65                                                                break;
     66                                                     
     67                                }
     68                               
     69                            $component_settings[ $component_key ]   =   $component_setting;
     70                        }
     71                   
     72                    return $component_settings;
     73                   
     74                }
     75               
    4876               
    4977            function _callback_saved_block_detectors ( $saved_field_data )
  • wp-hide-security-enhancer/trunk/modules/components/general-emulate.php

    r2800513 r3219455  
    1414                    $this->module_settings[]                  =   array(
    1515                                                                    'id'            =>  'emulate_cms',
    16                                                                     'label'         =>  __('Emulate CMS',    'wp-hide-security-enhancer'),
    17                                                                     'description'   =>  __('Use the option to output specific CMSs HTML traces to mislead any peculiar check.',  'wp-hide-security-enhancer'),
    18                                                                    
    19                                                                     'help'          =>  array(
    20                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Emulate CMS',    'wp-hide-security-enhancer'),
    21                                                                                                 'description'               =>  __("Using the option the system try to misguide the used WordPress by outputting the wrong traces, of the selected CMS.",    'wp-hide-security-enhancer') . "<br />" .
    22                                                                                                                                 __("Misleading and making a false lead provides an extra security, as the attacker search and attempt to hack something which not exist.",    'wp-hide-security-enhancer') . "<br />" .
    23                                                                                                                                 __("The plugin can emulate systems like:",    'wp-hide-security-enhancer') . "<br />" .
    24                                                                                                                                 __("- Drupal",    'wp-hide-security-enhancer') . "<br />" .
    25                                                                                                                                 __("- Ghost",    'wp-hide-security-enhancer') . "<br />" .
    26                                                                                                                                 __("- HubSpot",    'wp-hide-security-enhancer') . "<br />" .
    27                                                                                                                                 __("- Joomla",    'wp-hide-security-enhancer') . "<br />" .
    28                                                                                                                                 __("- TYPO3",    'wp-hide-security-enhancer') . "<br />" .
    29                                                                                                                                 __("- Wix",    'wp-hide-security-enhancer') . "<br />" ,
    30                                                                                                 'option_documentation_url'  =>  'https://wp-hide.com/documentation/general-emulate-cms/'
    31                                                                                                 ),
    32                                                                    
     16                                     
    3317                                                                    'input_type'    =>  'radio',
    34                                                                     'options'       =>  array(
    35                                                                                                 'no'            =>  __('No',     'wp-hide-security-enhancer'),
    36                                                                                                 'drupal_8'      =>  __('Drupal 8',    'wp-hide-security-enhancer'),
    37                                                                                                 'drupal_9'      =>  __('Drupal 9',    'wp-hide-security-enhancer'),
    38                                                                                                 'ghost_4_15'    =>  __('Ghost 4.15',    'wp-hide-security-enhancer'),
    39                                                                                                 'ghost_4_31'    =>  __('Ghost 4.31',    'wp-hide-security-enhancer'),
    40                                                                                                 'hubspot'       =>  __('HubSpot',    'wp-hide-security-enhancer'),
    41                                                                                                 'joomla'        =>  __('Joomla',    'wp-hide-security-enhancer'),
    42                                                                                                 'typo3'         =>  __('TYPO3',    'wp-hide-security-enhancer'),
    43                                                                                                 'wix'           =>  __('Wix',    'wp-hide-security-enhancer'),
    44                                                                                                 ),
     18                                           
    4519                                                                    'default_value' =>  'no',
    4620                                                                   
     
    5125                                                                   
    5226                    return $this->module_settings;   
     27                }
     28               
     29               
     30        function set_module_components_description( $component_settings )
     31                {
     32
     33                    foreach ( $component_settings   as  $component_key  =>  $component_setting )
     34                        {
     35                            if ( ! isset ( $component_setting['id'] ) )
     36                                continue;
     37                           
     38                            switch ( $component_setting['id'] )
     39                                {
     40                                    case 'emulate_cms' :
     41                                                                $component_setting =   array_merge ( $component_setting , array(
     42                                                                                                                                    'label'         =>  __('Emulate CMS',    'wp-hide-security-enhancer'),
     43                                                                                                                                    'description'   =>  __('Use the option to output specific CMSs HTML traces to mislead any peculiar check.',  'wp-hide-security-enhancer'),
     44                                                                                                                                   
     45                                                                                                                                    'help'          =>  array(
     46                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Emulate CMS',    'wp-hide-security-enhancer'),
     47                                                                                                                                                                'description'               =>  __("Using the option the system try to misguide the used WordPress by outputting the wrong traces, of the selected CMS.",    'wp-hide-security-enhancer') . "<br />" .
     48                                                                                                                                                                                                __("Misleading and making a false lead provides an extra security, as the attacker search and attempt to hack something which not exist.",    'wp-hide-security-enhancer') . "<br />" .
     49                                                                                                                                                                                                __("The plugin can emulate systems like:",    'wp-hide-security-enhancer') . "<br />" .
     50                                                                                                                                                                                                __("- Drupal",    'wp-hide-security-enhancer') . "<br />" .
     51                                                                                                                                                                                                __("- Ghost",    'wp-hide-security-enhancer') . "<br />" .
     52                                                                                                                                                                                                __("- HubSpot",    'wp-hide-security-enhancer') . "<br />" .
     53                                                                                                                                                                                                __("- Joomla",    'wp-hide-security-enhancer') . "<br />" .
     54                                                                                                                                                                                                __("- TYPO3",    'wp-hide-security-enhancer') . "<br />" .
     55                                                                                                                                                                                                __("- Wix",    'wp-hide-security-enhancer') . "<br />" ,
     56                                                                                                                                                                'option_documentation_url'  =>  'https://wp-hide.com/documentation/general-emulate-cms/'
     57                                                                                                                                                                ),
     58                                                                                                                                   
     59                                                                                                                                    'options'       =>  array(
     60                                                                                                                                                                'no'            =>  __('No',     'wp-hide-security-enhancer'),
     61                                                                                                                                                                'drupal_8'      =>  __('Drupal 8',    'wp-hide-security-enhancer'),
     62                                                                                                                                                                'drupal_9'      =>  __('Drupal 9',    'wp-hide-security-enhancer'),
     63                                                                                                                                                                'ghost_4_15'    =>  __('Ghost 4.15',    'wp-hide-security-enhancer'),
     64                                                                                                                                                                'ghost_4_31'    =>  __('Ghost 4.31',    'wp-hide-security-enhancer'),
     65                                                                                                                                                                'hubspot'       =>  __('HubSpot',    'wp-hide-security-enhancer'),
     66                                                                                                                                                                'joomla'        =>  __('Joomla',    'wp-hide-security-enhancer'),
     67                                                                                                                                                                'typo3'         =>  __('TYPO3',    'wp-hide-security-enhancer'),
     68                                                                                                                                                                'wix'           =>  __('Wix',    'wp-hide-security-enhancer'),
     69                                                                                                                                                                ),
     70                                                                                                                                ) );
     71                                                                break;
     72                                                     
     73                                }
     74                               
     75                            $component_settings[ $component_key ]   =   $component_setting;
     76                        }
     77                   
     78                    return $component_settings;
     79                   
    5380                }
    5481               
  • wp-hide-security-enhancer/trunk/modules/components/general-feed.php

    r2632106 r3219455  
    1414                    $this->module_settings[]                  =   array(
    1515                                                                    'id'            =>  'remove_feed_links',
    16                                                                     'label'         =>  __('Remove feed|rdf|rss|rss2|atom links',    'wp-hide-security-enhancer'),
    17                                                                     'description'   =>  __('Remove feed|rdf|rss|rss2|atom links within head. Also block such content functionality.',  'wp-hide-security-enhancer'),
    18                                                                    
    19                                                                     'help'          =>  array(
    20                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove feed|rdf|rss|rss2|atom links',    'wp-hide-security-enhancer'),
    21                                                                                                 'description'               =>  __("A feed is a function of special software that allows feedreaders to access a site, automatically looking for new content and then posting the information about new content and updates to another site. This provides a way for users to keep up with the latest and hottest information posted on different blogging sites.",    'wp-hide-security-enhancer') .
    22                                                                                                                                 "<br />" . __("There are several different kinds of feeds, read by different feedreaders. Some feeds include RSS (alternately defined as 'Rich Site Summary' or 'Really Simple Syndication'), Atom or RDF files.",    'wp-hide-security-enhancer') .
    23                                                                                                                                 "<br /><br/>" . __("Sample tag:",    'wp-hide-security-enhancer') . 
    24                                                                                                                                 "<br /><code>&lt;link rel=&quot;alternate&quot; type=&quot;application/rss+xml&quot; title=&quot;WP Hide Demo Feed&quot; href=&quot;http://-domain-name-/feed/&quot; /&gt;</code>
    25                                                                                                                                 <br /><br/>" . __("Set this option to Yes also disable the feed service.",   'wp-hide-security-enhancer'),
    26                                                                                                 'option_documentation_url'  =>  'https://wp-hide.com/documentation/general-html-feed/'
    27                                                                                                 ),
    28                                                                    
     16                                                                                                                 
    2917                                                                    'input_type'    =>  'radio',
    30                                                                     'options'       =>  array(
    31                                                                                                 'no'        =>  __('No',     'wp-hide-security-enhancer'),
    32                                                                                                 'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
    33                                                                                                 ),
     18                                                           
    3419                                                                    'default_value' =>  'no',
    3520                                                                   
     
    4025                                                                   
    4126                    return $this->module_settings;   
     27                }
     28               
     29
     30        function set_module_components_description( $component_settings )
     31                {
     32
     33                    foreach ( $component_settings   as  $component_key  =>  $component_setting )
     34                        {
     35                            if ( ! isset ( $component_setting['id'] ) )
     36                                continue;
     37                           
     38                            switch ( $component_setting['id'] )
     39                                {
     40                                    case 'remove_feed_links' :
     41                                                                $component_setting =   array_merge ( $component_setting , array(
     42                                                                                                                                    'label'         =>  __('Remove feed|rdf|rss|rss2|atom links',    'wp-hide-security-enhancer'),
     43                                                                                                                                    'description'   =>  __('Remove feed|rdf|rss|rss2|atom links within head. Also block such content functionality.',  'wp-hide-security-enhancer'),
     44                                                                                                                                   
     45                                                                                                                                    'help'          =>  array(
     46                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove feed|rdf|rss|rss2|atom links',    'wp-hide-security-enhancer'),
     47                                                                                                                                                                'description'               =>  __("A feed is a function of special software that allows feedreaders to access a site, automatically looking for new content and then posting the information about new content and updates to another site. This provides a way for users to keep up with the latest and hottest information posted on different blogging sites.",    'wp-hide-security-enhancer') .
     48                                                                                                                                                                                                "<br />" . __("There are several different kinds of feeds, read by different feedreaders. Some feeds include RSS (alternately defined as 'Rich Site Summary' or 'Really Simple Syndication'), Atom or RDF files.",    'wp-hide-security-enhancer') .
     49                                                                                                                                                                                                "<br /><br/>" . __("Sample tag:",    'wp-hide-security-enhancer') . 
     50                                                                                                                                                                                                "<br /><code>&lt;link rel=&quot;alternate&quot; type=&quot;application/rss+xml&quot; title=&quot;WP Hide Demo Feed&quot; href=&quot;http://-domain-name-/feed/&quot; /&gt;</code>
     51                                                                                                                                                                                                <br /><br/>" . __("Set this option to Yes also disable the feed service.",   'wp-hide-security-enhancer'),
     52                                                                                                                                                                'option_documentation_url'  =>  'https://wp-hide.com/documentation/general-html-feed/'
     53                                                                                                                                                                ),
     54                                                                                                                                   
     55                                                                                                                                    'options'       =>  array(
     56                                                                                                                                                                'no'        =>  __('No',     'wp-hide-security-enhancer'),
     57                                                                                                                                                                'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
     58                                                                                                                                                                ),
     59                                                                                                                                ) );
     60                                                                break;
     61                                                     
     62                                }
     63                               
     64                            $component_settings[ $component_key ]   =   $component_setting;
     65                        }
     66                   
     67                    return $component_settings;
     68                   
    4269                }
    4370               
  • wp-hide-security-enhancer/trunk/modules/components/general-headers.php

    r2984937 r3219455  
    1515                    $this->module_settings[]                  =   array(
    1616                                                                    'id'            =>  'remove_header_link',
    17                                                                     'label'         =>  __('Remove Link Header',    'wp-hide-security-enhancer'),
    18                                                                     'description'   =>  __('Remove Link Header being set as default by WordPress which outputs the site JSON url.', 'wp-hide-security-enhancer'),
    19                                                                    
    20                                                                     'help'          =>  array(
    21                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove Link Header',    'wp-hide-security-enhancer'),
    22                                                                                                 'description'               =>  __("HTTP header fields are components of the header section of a request and response messages in the Hypertext Transfer Protocol (HTTP). They define the operating parameters of an HTTP transaction.",    'wp-hide-security-enhancer') .
    23                                                                                                                                     "<br /><br />" . __("Sample header:",    'wp-hide-security-enhancer') .
    24                                                                                                                                     "<br /><code>Link: &lt;http://-domain-name-/wp-json/&gt;; rel=&quot;https://api.w.org/&quot;</code>",
    25                                                                                                 'option_documentation_url'  =>  'https://wp-hide.com/documentation/request-headers/'
    26                                                                                                 ),
    27                                                                    
    28                                                                     'input_type'    =>  'radio',
    29                                                                     'options'       =>  array(
    30                                                                                                 'no'        =>  __('No',     'wp-hide-security-enhancer'),
    31                                                                                                 'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
    32                                                                                                 ),
     17                                                                                                                         
     18                                                                    'input_type'    =>  'radio',
     19                                                       
    3320                                                                    'default_value' =>  'no',
    3421                                                                   
     
    4027                    $this->module_settings[]                  =   array(
    4128                                                                    'id'            =>  'remove_x_powered_by',
    42                                                                     'label'         =>  __('Remove X-Powered-By Header',    'wp-hide-security-enhancer'),
    43                                                                     'description'   =>  __('Remove X-Powered-By Header if set.', 'wp-hide-security-enhancer'),
    44                                                                    
    45                                                                     'help'          =>  array(
    46                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove X-Powered-By Header',    'wp-hide-security-enhancer'),
    47                                                                                                 'description'               =>  __("Sample header:",    'wp-hide-security-enhancer') .
    48                                                                                                                                     "<br /><code>x-powered-by: 'W3 Total Cache/0.9.5'</code>",
    49                                                                                                 'option_documentation_url'  =>  'https://wp-hide.com/documentation/request-headers/'
    50                                                                                                 ),
    51                                                                    
    52                                                                     'input_type'    =>  'radio',
    53                                                                     'options'       =>  array(
    54                                                                                                 'no'        =>  __('No',     'wp-hide-security-enhancer'),
    55                                                                                                 'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
    56                                                                                                 ),
     29                                                                                                                 
     30                                                                    'input_type'    =>  'radio',
     31                                             
    5732                                                                    'default_value' =>  'no',
    5833                                                                   
     
    6338                    $this->module_settings[]                  =   array(
    6439                                                                    'id'            =>  'remove_header_server',
    65                                                                     'label'         =>  __('Remove Server Header',    'wp-hide-security-enhancer'),
    66                                                                     'description'   =>  __('Remove Server Header if set.', 'wp-hide-security-enhancer'),
    67                                                                    
    68                                                                     'help'          =>  array(
    69                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove Server Header',    'wp-hide-security-enhancer'),
    70                                                                                                 'description'               =>  __("Sample header:",    'wp-hide-security-enhancer') .
    71                                                                                                                                     "<br /><code>server: 'Apache/2.4.1 (Unix)'</code>",
    72                                                                                                 'option_documentation_url'  =>  'https://wp-hide.com/documentation/request-headers/'
    73                                                                                                 ),
    74                                                                    
    75                                                                     'input_type'    =>  'radio',
    76                                                                     'options'       =>  array(
    77                                                                                                 'no'        =>  __('No',     'wp-hide-security-enhancer'),
    78                                                                                                 'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
    79                                                                                                 ),
     40                                                                                                                                   
     41                                                                    'input_type'    =>  'radio',
     42                                                                   
    8043                                                                    'default_value' =>  'no',
    8144                                                                   
     
    8649                    $this->module_settings[]                  =   array(
    8750                                                                    'id'            =>  'remove_x_pingback',
    88                                                                     'label'         =>  __('Remove X-Pingback Header',    'wp-hide-security-enhancer'),
    89                                                                     'description'   =>  __('Remove X-Pingback Header if being set.', 'wp-hide-security-enhancer'),
    90                                                                    
    91                                                                     'help'          =>  array(
    92                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove X-Pingback Header',    'wp-hide-security-enhancer'),
    93                                                                                                 'description'               =>  __("Pingback is one of four types of linkback methods for Web authors to request notification when somebody links to one of their documents. This enables authors to keep track of who is linking to, or referring to their articles. Pingback-enabled resources must either use an X-Pingback header or contain a element to the XML-RPC script.",    'wp-hide-security-enhancer'),
    94                                                                                                 'option_documentation_url'  =>  'https://wp-hide.com/documentation/request-headers/'
    95                                                                                                 ),
    96                                                                    
    97                                                                     'input_type'    =>  'radio',
    98                                                                     'options'       =>  array(
    99                                                                                                 'no'        =>  __('No',     'wp-hide-security-enhancer'),
    100                                                                                                 'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
    101                                                                                                 ),
     51                                                                                                               
     52                                                                    'input_type'    =>  'radio',
     53                                             
    10254                                                                    'default_value' =>  'no',
    10355                                                                   
     
    10860                                                                   
    10961                    return $this->module_settings;   
     62                }
     63               
     64               
     65        function set_module_components_description( $component_settings )
     66                {
     67
     68                    foreach ( $component_settings   as  $component_key  =>  $component_setting )
     69                        {
     70                            if ( ! isset ( $component_setting['id'] ) )
     71                                continue;
     72                           
     73                            switch ( $component_setting['id'] )
     74                                {
     75                                    case 'remove_header_link' :
     76                                                                $component_setting =   array_merge ( $component_setting , array(
     77                                                                                                                                    'label'         =>  __('Remove Link Header',    'wp-hide-security-enhancer'),
     78                                                                                                                                    'description'   =>  __('Remove Link Header being set as default by WordPress which outputs the site JSON url.', 'wp-hide-security-enhancer'),
     79                                                                                                                                   
     80                                                                                                                                    'help'          =>  array(
     81                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove Link Header',    'wp-hide-security-enhancer'),
     82                                                                                                                                                                'description'               =>  __("HTTP header fields are components of the header section of a request and response messages in the Hypertext Transfer Protocol (HTTP). They define the operating parameters of an HTTP transaction.",    'wp-hide-security-enhancer') .
     83                                                                                                                                                                                                    "<br /><br />" . __("Sample header:",    'wp-hide-security-enhancer') .
     84                                                                                                                                                                                                    "<br /><code>Link: &lt;http://-domain-name-/wp-json/&gt;; rel=&quot;https://api.w.org/&quot;</code>",
     85                                                                                                                                                                'option_documentation_url'  =>  'https://wp-hide.com/documentation/request-headers/'
     86                                                                                                                                                                ),
     87                                                                                                                                   
     88                                                                                                                                    'options'       =>  array(
     89                                                                                                                                                                'no'        =>  __('No',     'wp-hide-security-enhancer'),
     90                                                                                                                                                                'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
     91                                                                                                                                                                ),
     92                                                                                                                                ) );
     93                                                                break;
     94                                   
     95                                    case 'remove_x_powered_by' :
     96                                                                $component_setting =   array_merge ( $component_setting , array(
     97                                                                                                                                    'label'         =>  __('Remove X-Powered-By Header',    'wp-hide-security-enhancer'),
     98                                                                                                                                    'description'   =>  __('Remove X-Powered-By Header if set.', 'wp-hide-security-enhancer'),
     99                                                                                                                                   
     100                                                                                                                                    'help'          =>  array(
     101                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove X-Powered-By Header',    'wp-hide-security-enhancer'),
     102                                                                                                                                                                'description'               =>  __("Sample header:",    'wp-hide-security-enhancer') .
     103                                                                                                                                                                                                    "<br /><code>x-powered-by: 'W3 Total Cache/0.9.5'</code>",
     104                                                                                                                                                                'option_documentation_url'  =>  'https://wp-hide.com/documentation/request-headers/'
     105                                                                                                                                                                ),
     106
     107                                                                                                                                    'options'       =>  array(
     108                                                                                                                                                                'no'        =>  __('No',     'wp-hide-security-enhancer'),
     109                                                                                                                                                                'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
     110                                                                                                                                                                ),
     111                                                                                                                                ) );
     112                                                                break;
     113                                                               
     114                                    case 'remove_header_server' :
     115                                                                $component_setting =   array_merge ( $component_setting , array(
     116                                                                                                                                    'label'         =>  __('Remove Server Header',    'wp-hide-security-enhancer'),
     117                                                                                                                                    'description'   =>  __('Remove Server Header if set.', 'wp-hide-security-enhancer'),
     118                                                                                                                                   
     119                                                                                                                                    'help'          =>  array(
     120                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove Server Header',    'wp-hide-security-enhancer'),
     121                                                                                                                                                                'description'               =>  __("Sample header:",    'wp-hide-security-enhancer') .
     122                                                                                                                                                                                                    "<br /><code>server: 'Apache/2.4.1 (Unix)'</code>",
     123                                                                                                                                                                'option_documentation_url'  =>  'https://wp-hide.com/documentation/request-headers/'
     124                                                                                                                                                                ),
     125                                                                                                                                   
     126                                                                                                                                    'input_type'    =>  'radio',
     127                                                                                                                                    'options'       =>  array(
     128                                                                                                                                                                'no'        =>  __('No',     'wp-hide-security-enhancer'),
     129                                                                                                                                                                'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
     130                                                                                                                                                                ),
     131                                                                                                                                ) );
     132                                                                break;
     133                                                               
     134                                    case 'remove_x_pingback' :
     135                                                                $component_setting =   array_merge ( $component_setting , array(
     136                                                                                                                                    'label'         =>  __('Remove X-Pingback Header',    'wp-hide-security-enhancer'),
     137                                                                                                                                    'description'   =>  __('Remove X-Pingback Header if being set.', 'wp-hide-security-enhancer'),
     138                                                                                                                                   
     139                                                                                                                                    'help'          =>  array(
     140                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove X-Pingback Header',    'wp-hide-security-enhancer'),
     141                                                                                                                                                                'description'               =>  __("Pingback is one of four types of linkback methods for Web authors to request notification when somebody links to one of their documents. This enables authors to keep track of who is linking to, or referring to their articles. Pingback-enabled resources must either use an X-Pingback header or contain a element to the XML-RPC script.",    'wp-hide-security-enhancer'),
     142                                                                                                                                                                'option_documentation_url'  =>  'https://wp-hide.com/documentation/request-headers/'
     143                                                                                                                                                                ),
     144                                                                                                                                   
     145                                                                                                                                    'options'       =>  array(
     146                                                                                                                                                                'no'        =>  __('No',     'wp-hide-security-enhancer'),
     147                                                                                                                                                                'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
     148                                                                                                                                                                ),
     149                                                                                                                                ) );
     150                                                                break;                 
     151                                }
     152                               
     153                            $component_settings[ $component_key ]   =   $component_setting;
     154                        }
     155                   
     156                    return $component_settings;
     157                   
    110158                }
    111159               
  • wp-hide-security-enhancer/trunk/modules/components/general-html.php

    r3013473 r3219455  
    1919                    $this->module_settings[]                  =   array(
    2020                                                                    'id'            =>  'remove_html_comments',
    21                                                                     'label'         =>  __('Remove Comments',    'wp-hide-security-enhancer'),
    22                                                                     'description'   =>  __('Remove comments from HTML source code.', 'wp-hide-security-enhancer'),
    23                                                                    
    24                                                                     'help'          =>  array(
    25                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove Comments',    'wp-hide-security-enhancer'),
    26                                                                                                 'description'               =>  __("The HTML source code usually contain many comment lines, however there is no use for that, unless debugging. Remove all HTML Comments, which usually specify Plugins Name and Version. Any Internet Explorer conditional tags are preserved.",    'wp-hide-security-enhancer'),
    27                                                                                                 'option_documentation_url'  =>  'https://wp-hide.com/documentation/remove-classes-from-html/'
    28                                                                                                 ),
    29                                                                    
     21                                                                                                                             
    3022                                                                    'input_type'    =>  'radio',
    31                                                                     'options'       =>  array(
    32                                                                                                 'no'        =>  __('No',     'wp-hide-security-enhancer'),
    33                                                                                                 'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
    34                                                                                                 ),
     23                                                           
    3524                                                                    'default_value' =>  'no',
    3625                                                                   
     
    4130                    $this->module_settings[]                  =   array(
    4231                                                                    'id'            =>  'remove_html_new_lines',
    43                                                                     'label'         =>  __('Minify',    'wp-hide-security-enhancer'),
    44                                                                     'description'   =>  __('Minify HTML, Inline Styles, Inline JavaScripts.', 'wp-hide-security-enhancer'),
    45                                                                    
    46                                                                     'help'          =>  array(
    47                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Minify',    'wp-hide-security-enhancer'),
    48                                                                                                 'description'               =>  __("When you minify HTML it removes the unnecessary characters and lines in the source code. Indentation, comments, empty lines, etc. are not required in HTML. They just make the file easier to read. Cutting out all this unnecessary stuff can shave down your file size considerably. When you minify HTML code on your website, the server will send a much smaller page to the client making your website load quicker.",    'wp-hide-security-enhancer') .
    49                                                                                                                                     "<br /><br />" . __("The Minify component include multiple options:",    'wp-hide-security-enhancer') .
    50                                                                                                                                     "<br />Html
    51                                                                                                                                       <br />Html & Css
    52                                                                                                                                       <br />Html & JavaScript
    53                                                                                                                                       <br />All
    54                                                                                                                                       <br /><span class='important'>" . __("Minify JavaScript might produce errors for specific plugins.",    'wp-hide-security-enhancer') . "</span>",
    55                                                                                                 'option_documentation_url'  =>  'https://wp-hide.com/documentation/remove-classes-from-html/'
    56                                                                                                 ),
    57                                                                    
    5832                                                                   
    5933                                                                    'input_type'    =>  'radio',
    60                                                                     'options'       =>  array(
    61                                                                                                 'no'                =>  __('No',                'wp-hide-security-enhancer'),
    62                                                                                                 'html'              =>  __('Html',              'wp-hide-security-enhancer'),
    63                                                                                                 'html_css'          =>  __('Html & Css',        'wp-hide-security-enhancer'),
    64                                                                                                 'html_js'           =>  __('Html & JavaScript', 'wp-hide-security-enhancer'),
    65                                                                                                 'all'               =>  __('All',               'wp-hide-security-enhancer'),
    66                                                                                                 ),
     34                                       
    6735                                                                    'default_value' =>  'no',
    6836                                                                   
     
    7442                    $this->module_settings[]                  =   array(
    7543                                                                    'id'            =>  'clean_body_classes',
    76                                                                     'label'         =>  __('Remove general classes from body tag',    'wp-hide-security-enhancer'),
    77                                                                     'description'   =>  __('Remove general classes from body tag.', 'wp-hide-security-enhancer'),                                                                   
    78                                                                    
    79                                                                     'help'          =>  array(
    80                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove general classes from body tag',    'wp-hide-security-enhancer'),
    81                                                                                                 'description'               =>  __("Remove general classes from body tag.",    'wp-hide-security-enhancer') .
    82                                                                                                                                     "<br /><span class='important'>" . __('This can produce layout issues with certain themes, if something break this should be turned off.', 'wp-hide-security-enhancer') ."</span>",
    83                                                                                                 'option_documentation_url'  =>  'https://wp-hide.com/documentation/remove-classes-from-html/'
    84                                                                                                 ),
    85                                                                    
     44                                                                                                           
    8645                                                                    'input_type'    =>  'radio',
    87                                                                     'options'       =>  array(
    88                                                                                                 'no'        =>  __('No',     'wp-hide-security-enhancer'),
    89                                                                                                 'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
    90                                                                                                 ),
     46                                                           
    9147                                                                    'default_value' =>  'no',
    9248                                                                   
     
    9753                    $this->module_settings[]                  =   array(
    9854                                                                    'id'            =>  'clean_menu_items_id',
    99                                                                     'label'         =>  __('Remove ID from Menu items',    'wp-hide-security-enhancer'),
    100                                                                     'description'   =>  __('Remove ID attribute from all menu items.', 'wp-hide-security-enhancer'),
    101                                                                    
    102                                                                     'help'          =>  array(
    103                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove ID from Menu items',    'wp-hide-security-enhancer'),
    104                                                                                                 'description'               =>  __("Remove ID attribute from all menu items.",    'wp-hide-security-enhancer') .
    105                                                                                                                                     "<br /><span class='important'>" . __('This can produce layout issues with certain themes, if something break this should be turned off.', 'wp-hide-security-enhancer') ."</span>",
    106                                                                                                 'option_documentation_url'  =>  'https://wp-hide.com/documentation/remove-classes-from-html/'
    107                                                                                                 ),
    108                                                                                                
     55                                                       
    10956                                                                    'input_type'    =>  'radio',
    110                                                                     'options'       =>  array(
    111                                                                                                 'no'        =>  __('No',     'wp-hide-security-enhancer'),
    112                                                                                                 'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
    113                                                                                                 ),
     57                                                       
    11458                                                                    'default_value' =>  'no',
    11559                                                                   
     
    12064                    $this->module_settings[]                  =   array(
    12165                                                                    'id'            =>  'clean_menu_items_classes',
    122                                                                     'label'         =>  __('Remove class from Menu items',    'wp-hide-security-enhancer'),
    123                                                                     'description'   =>  __('Remove class attribute from all menu items.', 'wp-hide-security-enhancer'),
    124                                                                    
    125                                                                     'help'          =>  array(
    126                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove class from Menu items',    'wp-hide-security-enhancer'),
    127                                                                                                 'description'               =>  __("Remove class attribute from all menu items. Any classes which include a 'current' prefix or contain 'has-children' will be preserved.",    'wp-hide-security-enhancer') .
    128                                                                                                                                     "<br /><span class='important'>" . __('This can produce layout issues with certain themes, if something break this should be turned off.', 'wp-hide-security-enhancer') ."</span>",
    129                                                                                                 'option_documentation_url'  =>  'https://wp-hide.com/documentation/remove-classes-from-html/'
    130                                                                                                 ),
    131                                                                    
     66                                               
    13267                                                                    'input_type'    =>  'radio',
    133                                                                     'options'       =>  array(
    134                                                                                                 'no'        =>  __('No',     'wp-hide-security-enhancer'),
    135                                                                                                 'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
    136                                                                                                 ),
     68                                                       
    13769                                                                    'default_value' =>  'no',
    13870                                                                   
     
    14375                    $this->module_settings[]                  =   array(
    14476                                                                    'id'            =>  'clean_post_classes',
    145                                                                     'label'         =>  __('Remove class from Menu items',    'wp-hide-security-enhancer'),
    146                                                                     'description'   =>  __('Remove general classes from post.', 'wp-hide-security-enhancer'),
    147                                                                    
    148                                                                     'help'          =>  array(
    149                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove class from Menu items',    'wp-hide-security-enhancer'),
    150                                                                                                 'description'               =>  __("Remove general classes from post.",    'wp-hide-security-enhancer') .
    151                                                                                                                                     "<br /><span class='important'>" . __('This can produce layout issues with certain themes, if something break this should be turned off.', 'wp-hide-security-enhancer') ."</span>",
    152                                                                                                 'option_documentation_url'  =>  'https://wp-hide.com/documentation/remove-classes-from-html/'
    153                                                                                                 ),
    154                                                                    
     77                                       
    15578                                                                    'input_type'    =>  'radio',
    156                                                                     'options'       =>  array(
    157                                                                                                 'no'        =>  __('No',     'wp-hide-security-enhancer'),
    158                                                                                                 'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
    159                                                                                                 ),
     79                                     
    16080                                                                    'default_value' =>  'no',
    16181                                                                   
     
    16686                    $this->module_settings[]                  =   array(
    16787                                                                    'id'            =>  'clean_image_classes',
    168                                                                     'label'         =>  __('Remove general classes from images',    'wp-hide-security-enhancer'),
    169                                                                     'description'   =>  __('Remove general classes from media tags.', 'wp-hide-security-enhancer'),
    170                                                                    
    171                                                                     'help'          =>  array(
    172                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove general classes from images',    'wp-hide-security-enhancer'),
    173                                                                                                 'description'               =>  __("Remove general classes from media tags.",    'wp-hide-security-enhancer') .
    174                                                                                                                                     "<br /><span class='important'>" . __('This can produce layout issues with certain themes, if something break this should be turned off.', 'wp-hide-security-enhancer') ."</span>",
    175                                                                                                 'option_documentation_url'  =>  'https://wp-hide.com/documentation/remove-classes-from-html/'
    176                                                                                                 ),
    177                                                                                                
     88                                                                                                                                             
    17889                                                                    'input_type'    =>  'radio',
    179                                                                     'options'       =>  array(
    180                                                                                                 'no'        =>  __('No',     'wp-hide-security-enhancer'),
    181                                                                                                 'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
    182                                                                                                 ),
     90                                       
    18391                                                                    'default_value' =>  'no',
    18492                                                                   
     
    18997                    return $this->module_settings;   
    19098                }
    191                
    192                
     99       
     100               
     101        function set_module_components_description( $component_settings )
     102                {
     103
     104                    foreach ( $component_settings   as  $component_key  =>  $component_setting )
     105                        {
     106                            if ( ! isset ( $component_setting['id'] ) )
     107                                continue;
     108                           
     109                            switch ( $component_setting['id'] )
     110                                {
     111                                    case 'remove_html_comments' :
     112                                                                $component_setting =   array_merge ( $component_setting , array(
     113                                                                                                                                    'label'         =>  __('Remove Comments',    'wp-hide-security-enhancer'),
     114                                                                                                                                    'description'   =>  __('Remove comments from HTML source code.', 'wp-hide-security-enhancer'),
     115                                                                                                                                   
     116                                                                                                                                    'help'          =>  array(
     117                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove Comments',    'wp-hide-security-enhancer'),
     118                                                                                                                                                                'description'               =>  __("The HTML source code usually contain many comment lines, however there is no use for that, unless debugging. Remove all HTML Comments, which usually specify Plugins Name and Version. Any Internet Explorer conditional tags are preserved.",    'wp-hide-security-enhancer'),
     119                                                                                                                                                                'option_documentation_url'  =>  'https://wp-hide.com/documentation/remove-classes-from-html/'
     120                                                                                                                                                                ),
     121                                                                                                                                   
     122                                                                                                                                    'options'       =>  array(
     123                                                                                                                                                                'no'        =>  __('No',     'wp-hide-security-enhancer'),
     124                                                                                                                                                                'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
     125                                                                                                                                                                ),
     126                                                                                                                                ) );
     127                                                                break;
     128                                   
     129                                    case 'remove_html_new_lines' :
     130                                                                $component_setting =   array_merge ( $component_setting , array(
     131                                                                                                                                    'label'         =>  __('Minify',    'wp-hide-security-enhancer'),
     132                                                                                                                                    'description'   =>  __('Minify HTML, Inline Styles, Inline JavaScripts.', 'wp-hide-security-enhancer'),
     133                                                                                                                                   
     134                                                                                                                                    'help'          =>  array(
     135                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Minify',    'wp-hide-security-enhancer'),
     136                                                                                                                                                                'description'               =>  __("When you minify HTML it removes the unnecessary characters and lines in the source code. Indentation, comments, empty lines, etc. are not required in HTML. They just make the file easier to read. Cutting out all this unnecessary stuff can shave down your file size considerably. When you minify HTML code on your website, the server will send a much smaller page to the client making your website load quicker.",    'wp-hide-security-enhancer') .
     137                                                                                                                                                                                                    "<br /><br />" . __("The Minify component include multiple options:",    'wp-hide-security-enhancer') .
     138                                                                                                                                                                                                    "<br />Html
     139                                                                                                                                                                                                      <br />Html & Css
     140                                                                                                                                                                                                      <br />Html & JavaScript
     141                                                                                                                                                                                                      <br />All
     142                                                                                                                                                                                                      <br /><span class='important'>" . __("Minify JavaScript might produce errors for specific plugins.",    'wp-hide-security-enhancer') . "</span>",
     143                                                                                                                                                                'option_documentation_url'  =>  'https://wp-hide.com/documentation/remove-classes-from-html/'
     144                                                                                                                                                                ),
     145                                                                                                                                   
     146                                                                                                                                    'options'       =>  array(
     147                                                                                                                                                                'no'                =>  __('No',                'wp-hide-security-enhancer'),
     148                                                                                                                                                                'html'              =>  __('Html',              'wp-hide-security-enhancer'),
     149                                                                                                                                                                'html_css'          =>  __('Html & Css',        'wp-hide-security-enhancer'),
     150                                                                                                                                                                'html_js'           =>  __('Html & JavaScript', 'wp-hide-security-enhancer'),
     151                                                                                                                                                                'all'               =>  __('All',               'wp-hide-security-enhancer'),
     152                                                                                                                                                                ),
     153                                                                                                                                ) );
     154                                                                break;
     155                                                               
     156                                    case 'clean_body_classes' :
     157                                                                $component_setting =   array_merge ( $component_setting , array(
     158                                                                                                                                    'label'         =>  __('Remove general classes from body tag',    'wp-hide-security-enhancer'),
     159                                                                                                                                    'description'   =>  __('Remove general classes from body tag.', 'wp-hide-security-enhancer'),                                                                   
     160                                                                                                                                   
     161                                                                                                                                    'help'          =>  array(
     162                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove general classes from body tag',    'wp-hide-security-enhancer'),
     163                                                                                                                                                                'description'               =>  __("Remove general classes from body tag.",    'wp-hide-security-enhancer') .
     164                                                                                                                                                                                                    "<br /><span class='important'>" . __('This can produce layout issues with certain themes, if something break this should be turned off.', 'wp-hide-security-enhancer') ."</span>",
     165                                                                                                                                                                'option_documentation_url'  =>  'https://wp-hide.com/documentation/remove-classes-from-html/'
     166                                                                                                                                                                ),
     167                                                                                                                                   
     168                                                                                                                                    'options'       =>  array(
     169                                                                                                                                                                'no'        =>  __('No',     'wp-hide-security-enhancer'),
     170                                                                                                                                                                'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
     171                                                                                                                                                                ),
     172                                                                                                                                ) );
     173                                                                break;
     174                                                               
     175                                    case 'clean_menu_items_id' :
     176                                                                $component_setting =   array_merge ( $component_setting , array(
     177                                                                                                                                    'label'         =>  __('Remove ID from Menu items',    'wp-hide-security-enhancer'),
     178                                                                                                                                    'description'   =>  __('Remove ID attribute from all menu items.', 'wp-hide-security-enhancer'),
     179                                                                                                                                   
     180                                                                                                                                    'help'          =>  array(
     181                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove ID from Menu items',    'wp-hide-security-enhancer'),
     182                                                                                                                                                                'description'               =>  __("Remove ID attribute from all menu items.",    'wp-hide-security-enhancer') .
     183                                                                                                                                                                                                    "<br /><span class='important'>" . __('This can produce layout issues with certain themes, if something break this should be turned off.', 'wp-hide-security-enhancer') ."</span>",
     184                                                                                                                                                                'option_documentation_url'  =>  'https://wp-hide.com/documentation/remove-classes-from-html/'
     185                                                                                                                                                                ),
     186                                                                                                                                                               
     187                                                                                                                                    'options'       =>  array(
     188                                                                                                                                                                'no'        =>  __('No',     'wp-hide-security-enhancer'),
     189                                                                                                                                                                'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
     190                                                                                                                                                                ),
     191                                                                                                                                ) );
     192                                                                break;
     193                                                               
     194                                    case 'clean_menu_items_classes' :
     195                                                                $component_setting =   array_merge ( $component_setting , array(
     196                                                                                                                                    'label'         =>  __('Remove class from Menu items',    'wp-hide-security-enhancer'),
     197                                                                                                                                    'description'   =>  __('Remove class attribute from all menu items.', 'wp-hide-security-enhancer'),
     198                                                                                                                                   
     199                                                                                                                                    'help'          =>  array(
     200                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove class from Menu items',    'wp-hide-security-enhancer'),
     201                                                                                                                                                                'description'               =>  __("Remove class attribute from all menu items. Any classes which include a 'current' prefix or contain 'has-children' will be preserved.",    'wp-hide-security-enhancer') .
     202                                                                                                                                                                                                    "<br /><span class='important'>" . __('This can produce layout issues with certain themes, if something break this should be turned off.', 'wp-hide-security-enhancer') ."</span>",
     203                                                                                                                                                                'option_documentation_url'  =>  'https://wp-hide.com/documentation/remove-classes-from-html/'
     204                                                                                                                                                                ),
     205
     206                                                                                                                                    'options'       =>  array(
     207                                                                                                                                                                'no'        =>  __('No',     'wp-hide-security-enhancer'),
     208                                                                                                                                                                'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
     209                                                                                                                                                                ),
     210                                                                                                                                ) );
     211                                                                break;
     212                                                               
     213                                    case 'clean_post_classes' :
     214                                                                $component_setting =   array_merge ( $component_setting , array(
     215                                                                                                                                    'label'         =>  __('Remove class from Menu items',    'wp-hide-security-enhancer'),
     216                                                                                                                                    'description'   =>  __('Remove general classes from post.', 'wp-hide-security-enhancer'),
     217                                                                                                                                   
     218                                                                                                                                    'help'          =>  array(
     219                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove class from Menu items',    'wp-hide-security-enhancer'),
     220                                                                                                                                                                'description'               =>  __("Remove general classes from post.",    'wp-hide-security-enhancer') .
     221                                                                                                                                                                                                    "<br /><span class='important'>" . __('This can produce layout issues with certain themes, if something break this should be turned off.', 'wp-hide-security-enhancer') ."</span>",
     222                                                                                                                                                                'option_documentation_url'  =>  'https://wp-hide.com/documentation/remove-classes-from-html/'
     223                                                                                                                                                                ),
     224
     225                                                                                                                                    'options'       =>  array(
     226                                                                                                                                                                'no'        =>  __('No',     'wp-hide-security-enhancer'),
     227                                                                                                                                                                'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
     228                                                                                                                                                                ),
     229                                                                                                                                ) );
     230                                                                break;
     231                                                               
     232                                    case 'clean_image_classes' :
     233                                                                $component_setting =   array_merge ( $component_setting , array(
     234                                                                                                                                    'label'         =>  __('Remove general classes from images',    'wp-hide-security-enhancer'),
     235                                                                                                                                    'description'   =>  __('Remove general classes from media tags.', 'wp-hide-security-enhancer'),
     236                                                                                                                                   
     237                                                                                                                                    'help'          =>  array(
     238                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove general classes from images',    'wp-hide-security-enhancer'),
     239                                                                                                                                                                'description'               =>  __("Remove general classes from media tags.",    'wp-hide-security-enhancer') .
     240                                                                                                                                                                                                    "<br /><span class='important'>" . __('This can produce layout issues with certain themes, if something break this should be turned off.', 'wp-hide-security-enhancer') ."</span>",
     241                                                                                                                                                                'option_documentation_url'  =>  'https://wp-hide.com/documentation/remove-classes-from-html/'
     242                                                                                                                                                                ),
     243                                                                                                                                                               
     244                                                                                                                                    'options'       =>  array(
     245                                                                                                                                                                'no'        =>  __('No',     'wp-hide-security-enhancer'),
     246                                                                                                                                                                'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
     247                                                                                                                                                                ),
     248                                                                                                                                ) );
     249                                                                break;                                                                                                                                                             
     250                                }
     251                               
     252                            $component_settings[ $component_key ]   =   $component_setting;
     253                        }
     254                   
     255                    return $component_settings;
     256                   
     257                }
     258                   
    193259               
    194260            function _init_remove_html_comments($saved_field_data)
  • wp-hide-security-enhancer/trunk/modules/components/general-meta.php

    r3013473 r3219455  
    1515                    $this->module_settings[]                  =   array(
    1616                                                                    'id'            =>  'remove_generator_meta',
    17                                                                     'label'         =>  __('Remove WordPress Generator Meta',    'wp-hide-security-enhancer'),
    18                                                                     'description'   =>  __('Remove the autogenerated meta generator tag within head (WordPress Version).',  'wp-hide-security-enhancer'),
    19                                                                    
    20                                                                     'help'          =>  array(
    21                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove WordPress Generator Meta',    'wp-hide-security-enhancer'),
    22                                                                                                 'description'               =>  __("Remove the autogenerated meta generator tag within head (WordPress Version).",    'wp-hide-security-enhancer') .
    23                                                                                                                                     "<br />" . __("Tag example:",    'wp-hide-security-enhancer') . "<br />  <br />
    24                                                                                                                                     <code>&lt;meta name=&quot;generator&quot; content=&quot;WordPress 5.3.1&quot; /&gt;</code>",
    25                                                                                                 'option_documentation_url'  =>  'https://wp-hide.com/documentation/general-html-meta/'
    26                                                                                                 ),
    27                                                                    
    28                                                                     'input_type'    =>  'radio',
    29                                                                     'options'       =>  array(
    30                                                                                                 'no'        =>  __('No',     'wp-hide-security-enhancer'),
    31                                                                                                 'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
    32                                                                                                 ),
     17                                                                                                               
     18                                                                    'input_type'    =>  'radio',
     19                                 
    3320                                                                    'default_value' =>  'no',
    3421                                                                   
     
    3926                    $this->module_settings[]                  =   array(
    4027                                                                    'id'            =>  'remove_other_generator_meta',
    41                                                                     'label'         =>  __('Remove Other Generator Meta',    'wp-hide-security-enhancer'),
    42                                                                     'description'   =>  __('Remove other meta generated tags within head (eg Theme Name, Theme Version).',  'wp-hide-security-enhancer'),
    43                                                                    
    44                                                                     'help'          =>  array(
    45                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove Other Generator Meta',    'wp-hide-security-enhancer'),
    46                                                                                                 'description'               =>  __("Remove other meta generated tags within head (eg Theme Name, Theme Version).",    'wp-hide-security-enhancer') .
    47                                                                                                                                     "<br />" . __("Tag example:",    'wp-hide-security-enhancer') . "<br />  <br />
    48                                                                                                                                     <code>&lt;meta content=&quot;Divi -  Child v.1.0.0&quot; name=&quot;generator&quot;/&gt;</code>",
    49                                                                                                 'option_documentation_url'  =>  'https://wp-hide.com/documentation/general-html-meta/'
    50                                                                                                 ),
    51                                                                    
    52                                                                     'input_type'    =>  'radio',
    53                                                                     'options'       =>  array(
    54                                                                                                 'no'        =>  __('No',     'wp-hide-security-enhancer'),
    55                                                                                                 'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
    56                                                                                                 ),
     28                                                                                                                 
     29                                                                    'input_type'    =>  'radio',
     30                                                     
    5731                                                                    'default_value' =>  'no',
    5832                                                                   
     
    6337                    $this->module_settings[]                  =   array(
    6438                                                                    'id'            =>  'remove_shortlink_meta',
    65                                                                     'label'         =>  __('Remove Shortlink Meta',    'wp-hide-security-enhancer'),
    66                                                                     'description'   =>  __('Remove shortlink tags within head.',  'wp-hide-security-enhancer'),
    67                                                                    
    68                                                                     'input_type'    =>  'radio',
    69                                                                     'options'       =>  array(
    70                                                                                                 'no'        =>  __('No',     'wp-hide-security-enhancer'),
    71                                                                                                 'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
    72                                                                                                 ),
     39                                                                                                         
     40                                                                    'input_type'    =>  'radio',
     41                                                           
    7342                                                                    'default_value' =>  'no',
    7443                                                                   
     
    7948                    $this->module_settings[]                  =   array(
    8049                                                                    'id'            =>  'remove_dns_prefetch',
    81                                                                     'label'         =>  __('Remove DNS Prefetch',    'wp-hide-security-enhancer'),
    82                                                                     'description'   =>  __('Remove DNS Prefetch meta generated tag.',  'wp-hide-security-enhancer'),
    83                                                                    
    84                                                                     'help'          =>  array(
    85                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove DNS Prefetch',    'wp-hide-security-enhancer'),
    86                                                                                                 'description'               =>  __("DNS prefetching allows you to resolve domain names (perform a DNS lookup in the background) before a user clicks on a link, which in turn can help improve performance.",    'wp-hide-security-enhancer'),
    87                                                                                                 'option_documentation_url'  =>  'https://wp-hide.com/documentation/general-html-meta/'
    88                                                                                                 ),
    89                                                                    
    90                                                                     'input_type'    =>  'radio',
    91                                                                     'options'       =>  array(
    92                                                                                                 'no'        =>  __('No',     'wp-hide-security-enhancer'),
    93                                                                                                 'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
    94                                                                                                 ),
     50                                                                                                                             
     51                                                                    'input_type'    =>  'radio',
     52                                                 
    9553                                                                    'default_value' =>  'no',
    9654                                                                   
     
    10159                    $this->module_settings[]                  =   array(
    10260                                                                    'id'            =>  'remove_resource_hints',
    103                                                                     'label'         =>  __('Remove Resource Hints',    'wp-hide-security-enhancer'),
    104                                                                     'description'   =>  __('Remove Resource Hints meta generated tags within head (eg dns-prefetch, preconnect).',  'wp-hide-security-enhancer'),
    105                                                                    
    106                                                                     'help'          =>  array(
    107                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove Resource Hints',    'wp-hide-security-enhancer'),
    108                                                                                                 'description'               =>  __("DNS prefetching and preconect allows you to resolve domain names before a user clicks on a link, which in turn can help and slightly improve performance.",    'wp-hide-security-enhancer'),
    109                                                                                                 'option_documentation_url'  =>  'https://wp-hide.com/documentation/general-html-meta/'
    110                                                                                                 ),
    111                                                                    
    112                                                                     'input_type'    =>  'radio',
    113                                                                     'options'       =>  array(
    114                                                                                                 'no'        =>  __('No',     'wp-hide-security-enhancer'),
    115                                                                                                 'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
    116                                                                                                 ),
     61                                                                                                                     
     62                                                                    'input_type'    =>  'radio',
     63                                                 
    11764                                                                    'default_value' =>  'no',
    11865                                                                   
     
    12370                    $this->module_settings[]                  =   array(
    12471                                                                    'id'            =>  'remove_wlwmanifest',
    125                                                                     'label'         =>  __('Remove wlwmanifest Meta',    'wp-hide-security-enhancer'),
    126                                                                     'description'   =>  __('Remove the wlwmanifest tag within head.',  'wp-hide-security-enhancer'),
    127                                                                    
    128                                                                     'help'          =>  array(
    129                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove wlwmanifest Meta',    'wp-hide-security-enhancer'),
    130                                                                                                 'description'               =>  __("The above link is actually used by Windows Live Writer. If you don't te application, this is just unnecessary code.",    'wp-hide-security-enhancer') .
    131                                                                                                                                 "<br /><br/>" . __("Sample tag:",    'wp-hide-security-enhancer') .
    132                                                                                                                                 "<br /><code>&lt;link rel=&quot;wlwmanifest&quot; type=&quot;application/wlwmanifest+xml&quot; href=&quot;http://-domain-name-/wp-includes/wlwmanifest.xml&quot; /&gt;</code>",
    133                                                                                                 'option_documentation_url'  =>  'https://wp-hide.com/documentation/general-html-meta/'
    134                                                                                                 ),
    135                                                                    
    136                                                                     'input_type'    =>  'radio',
    137                                                                     'options'       =>  array(
    138                                                                                                 'no'        =>  __('No',     'wp-hide-security-enhancer'),
    139                                                                                                 'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
    140                                                                                                 ),
     72                                           
     73                                                                    'input_type'    =>  'radio',
     74                                               
    14175                                                                    'default_value' =>  'no',
    14276                                                                   
     
    14882                    $this->module_settings[]                  =   array(
    14983                                                                    'id'            =>  'disable_json_rest_wphead_link',
    150                                                                     'label'         =>  __('Disable output the REST API link tag into page header',    'wp-hide-security-enhancer'),
    151                                                                     'description'   =>  __('By default a REST API link tag is being append to HTML.',    'wp-hide-security-enhancer'),
    152                                                                    
    153                                                                     'help'          =>  array(
    154                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Disable output the REST API link tag into page header',    'wp-hide-security-enhancer'),
    155                                                                                                 'description'               =>  __("This option disable the tag output with the JSON API url.",    'wp-hide-security-enhancer') .
    156                                                                                                                                 "<br /><br/>" . __("Sample tag:",    'wp-hide-security-enhancer') .
    157                                                                                                                                 "<br /><code>&lt;link rel='https://api.w.org/' href='https://-domain-name-/wp-json/' /&gt;</code>",
    158                                                                                                 'option_documentation_url'  =>  'https://wp-hide.com/documentation/general-html-meta/'
    159                                                                                                 ),
    160                                                                    
    161                                                                     'input_type'    =>  'radio',
    162                                                                     'options'       =>  array(
    163                                                                                                 'no'        =>  __('No',     'wp-hide-security-enhancer'),
    164                                                                                                 'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
    165                                                                                                 ),
     84                                                                                                                     
     85                                                                    'input_type'    =>  'radio',
     86                                                     
    16687                                                                    'default_value' =>  'no',
    16788                                                                   
     
    17596                    $this->module_settings[]                  =   array(
    17697                                                                    'id'            =>  'remove_rsd_link',
    177                                                                     'label'         =>  __('Remove rsd_link Meta',    'wp-hide-security-enhancer'),
    178                                                                     'description'   =>  __('Remove the rsd_link tag within head.',  'wp-hide-security-enhancer'),
    179                                                                    
    180                                                                     'help'          =>  array(
    181                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove rsd_link Meta',    'wp-hide-security-enhancer'),
    182                                                                                                 'description'               =>  __("This helps to hide the link to the Really Simple Discovery service endpoint.",    'wp-hide-security-enhancer') .
    183                                                                                                                                 "<br /><br/>" . __("Sample tag:",    'wp-hide-security-enhancer') .
    184                                                                                                                                 "<br /><code>&lt;link rel='EditURI' type='application/rsd+xml' title='RSD' href='https://-domain-name-/xmlrpc.php?rsd' /&gt;</code>",
    185                                                                                                 'option_documentation_url'  =>  'https://wp-hide.com/documentation/general-html-meta/'
    186                                                                                                 ),
    187                                                                    
    188                                                                     'input_type'    =>  'radio',
    189                                                                     'options'       =>  array(
    190                                                                                                 'no'        =>  __('No',     'wp-hide-security-enhancer'),
    191                                                                                                 'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
    192                                                                                                 ),
     98                                                                                                                       
     99                                                                    'input_type'    =>  'radio',
     100                                                   
    193101                                                                    'default_value' =>  'no',
    194102                                                                   
     
    201109                    $this->module_settings[]                  =   array(
    202110                                                                    'id'            =>  'remove_adjacent_posts_rel',
    203                                                                     'label'         =>  __('Remove adjacent_posts_rel Meta',    'wp-hide-security-enhancer'),
    204                                                                     'description'   =>  __('Remove the adjacent_posts_rel tag within head.',  'wp-hide-security-enhancer'),
    205                                                                    
    206                                                                     'help'          =>  array(
    207                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove adjacent_posts_rel Meta',    'wp-hide-security-enhancer'),
    208                                                                                                 'description'               =>  __("This helps to hide the post adjacent tags.",    'wp-hide-security-enhancer') .
    209                                                                                                                                 "<br /><br/>" . __("Sample tag:",    'wp-hide-security-enhancer') .
    210                                                                                                                                 "<br /><code>&lt;link rel='next' title='Dummy Post' href='http://-domain-name-/dummy-post/' /&gt;</code>",
    211                                                                                                 'option_documentation_url'  =>  'https://wp-hide.com/documentation/general-html-meta/'
    212                                                                                                 ),
    213                                                                    
    214                                                                     'input_type'    =>  'radio',
    215                                                                     'options'       =>  array(
    216                                                                                                 'no'        =>  __('No',     'wp-hide-security-enhancer'),
    217                                                                                                 'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
    218                                                                                                 ),
     111                                                                                                                       
     112                                                                    'input_type'    =>  'radio',
     113                                                           
    219114                                                                    'default_value' =>  'no',
    220115                                                                   
     
    225120                    $this->module_settings[]                  =   array(
    226121                                                                    'id'            =>  'remove_profile',
    227                                                                     'label'         =>  __('Remove profile link',    'wp-hide-security-enhancer'),
    228                                                                     'description'   =>  __('Remove profile link meta tag within head.',  'wp-hide-security-enhancer'),
    229                                                                    
    230                                                                     'help'          =>  array(
    231                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove adjacent_posts_rel Meta',    'wp-hide-security-enhancer'),
    232                                                                                                 'description'               =>  __("This helps to hide the profile tags.",    'wp-hide-security-enhancer') .
    233                                                                                                                                 "<br /><br/>" . __("Sample tag:",    'wp-hide-security-enhancer') .
    234                                                                                                                                 "<br /><code>&lt;link rel='profile' href='http://-domain-name-/profile/' /&gt;</code>",
    235                                                                                                 'option_documentation_url'  =>  'https://wp-hide.com/documentation/general-html-meta/'
    236                                                                                                 ),
    237                                                                    
    238                                                                     'input_type'    =>  'radio',
    239                                                                     'options'       =>  array(
    240                                                                                                 'no'        =>  __('No',     'wp-hide-security-enhancer'),
    241                                                                                                 'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
    242                                                                                                 ),
     122                                                       
     123                                                                    'input_type'    =>  'radio',
     124                                               
    243125                                                                    'default_value' =>  'no',
    244126                                                                   
     
    249131                    $this->module_settings[]                  =   array(
    250132                                                                    'id'            =>  'remove_canonical',
    251                                                                     'label'         =>  __('Remove canonical link',    'wp-hide-security-enhancer'),
    252                                                                     'description'   =>  __('Remove canonical link meta tag within head.',  'wp-hide-security-enhancer'),
    253                                                                    
    254                                                                     'help'          =>  array(
    255                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove adjacent_posts_rel Meta',    'wp-hide-security-enhancer'),
    256                                                                                                 'description'               =>  __("The rel=canonical element, often called the 'canonical link', is an HTML element that helps webmasters prevent duplicate content issues. It does this by specifying the 'canonical URL', the 'preferred' version of a web page - the original source, even.",    'wp-hide-security-enhancer') .
    257                                                                                                                                 "<br /><br/>" . __("Sample tag:",    'wp-hide-security-enhancer') .
    258                                                                                                                                 "<br /><code>&lt;link rel=&quot;canonical&quot; href=&quot;http://-domain-name-/dummy-post/&quot; /&gt;</code>",
    259                                                                                                 'option_documentation_url'  =>  'https://wp-hide.com/documentation/general-html-meta/'
    260                                                                                                 ),
    261                                                                    
    262                                                                     'input_type'    =>  'radio',
    263                                                                     'options'       =>  array(
    264                                                                                                 'no'        =>  __('No',     'wp-hide-security-enhancer'),
    265                                                                                                 'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
    266                                                                                                 ),
     133                                                                                                                   
     134                                                                    'input_type'    =>  'radio',
     135                                                       
    267136                                                                    'default_value' =>  'no',
    268137                                                                   
     
    274143                }
    275144               
    276                
     145
     146        function set_module_components_description( $component_settings )
     147                {
     148
     149                    foreach ( $component_settings   as  $component_key  =>  $component_setting )
     150                        {
     151                            if ( ! isset ( $component_setting['id'] ) )
     152                                continue;
     153                           
     154                            switch ( $component_setting['id'] )
     155                                {
     156                                    case 'remove_generator_meta' :
     157                                                                $component_setting =   array_merge ( $component_setting , array(
     158                                                                                                                                    'label'         =>  __('Remove WordPress Generator Meta',    'wp-hide-security-enhancer'),
     159                                                                                                                                    'description'   =>  __('Remove the autogenerated meta generator tag within head (WordPress Version).',  'wp-hide-security-enhancer'),
     160                                                                                                                                   
     161                                                                                                                                    'help'          =>  array(
     162                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove WordPress Generator Meta',    'wp-hide-security-enhancer'),
     163                                                                                                                                                                'description'               =>  __("Remove the autogenerated meta generator tag within head (WordPress Version).",    'wp-hide-security-enhancer') .
     164                                                                                                                                                                                                    "<br />" . __("Tag example:",    'wp-hide-security-enhancer') . "<br />  <br />
     165                                                                                                                                                                                                    <code>&lt;meta name=&quot;generator&quot; content=&quot;WordPress 5.3.1&quot; /&gt;</code>",
     166                                                                                                                                                                'option_documentation_url'  =>  'https://wp-hide.com/documentation/general-html-meta/'
     167                                                                                                                                                                ),
     168
     169                                                                                                                                    'options'       =>  array(
     170                                                                                                                                                                'no'        =>  __('No',     'wp-hide-security-enhancer'),
     171                                                                                                                                                                'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
     172                                                                                                                                                                ),
     173                                                                                                                                ) );
     174                                                                break;
     175                                                               
     176                                    case 'remove_other_generator_meta' :
     177                                                                $component_setting =   array_merge ( $component_setting , array(
     178                                                                                                                                    'label'         =>  __('Remove Other Generator Meta',    'wp-hide-security-enhancer'),
     179                                                                                                                                    'description'   =>  __('Remove other meta generated tags within head (eg Theme Name, Theme Version).',  'wp-hide-security-enhancer'),
     180                                                                                                                                   
     181                                                                                                                                    'help'          =>  array(
     182                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove Other Generator Meta',    'wp-hide-security-enhancer'),
     183                                                                                                                                                                'description'               =>  __("Remove other meta generated tags within head (eg Theme Name, Theme Version).",    'wp-hide-security-enhancer') .
     184                                                                                                                                                                                                    "<br />" . __("Tag example:",    'wp-hide-security-enhancer') . "<br />  <br />
     185                                                                                                                                                                                                    <code>&lt;meta content=&quot;Divi -  Child v.1.0.0&quot; name=&quot;generator&quot;/&gt;</code>",
     186                                                                                                                                                                'option_documentation_url'  =>  'https://wp-hide.com/documentation/general-html-meta/'
     187                                                                                                                                                                ),
     188                                                                                                                                   
     189                                                                                                                                    'options'       =>  array(
     190                                                                                                                                                                'no'        =>  __('No',     'wp-hide-security-enhancer'),
     191                                                                                                                                                                'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
     192                                                                                                                                                                ),
     193                                                                                                                                ) );
     194                                                                break;
     195                                                               
     196                                    case 'remove_shortlink_meta' :
     197                                                                $component_setting =   array_merge ( $component_setting , array(
     198                                                                                                                                    'label'         =>  __('Remove Shortlink Meta',    'wp-hide-security-enhancer'),
     199                                                                                                                                    'description'   =>  __('Remove shortlink tags within head.',  'wp-hide-security-enhancer'),
     200                                                                                                                                   
     201                                                                                                                                    'options'       =>  array(
     202                                                                                                                                                                'no'        =>  __('No',     'wp-hide-security-enhancer'),
     203                                                                                                                                                                'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
     204                                                                                                                                                                ),
     205                                                                                                                                ) );
     206                                                                break;
     207                                                               
     208                                    case 'remove_dns_prefetch' :
     209                                                                $component_setting =   array_merge ( $component_setting , array(
     210                                                                                                                                    'label'         =>  __('Remove DNS Prefetch',    'wp-hide-security-enhancer'),
     211                                                                                                                                    'description'   =>  __('Remove DNS Prefetch meta generated tag.',  'wp-hide-security-enhancer'),
     212                                                                                                                                   
     213                                                                                                                                    'help'          =>  array(
     214                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove DNS Prefetch',    'wp-hide-security-enhancer'),
     215                                                                                                                                                                'description'               =>  __("DNS prefetching allows you to resolve domain names (perform a DNS lookup in the background) before a user clicks on a link, which in turn can help improve performance.",    'wp-hide-security-enhancer'),
     216                                                                                                                                                                'option_documentation_url'  =>  'https://wp-hide.com/documentation/general-html-meta/'
     217                                                                                                                                                                ),
     218
     219                                                                                                                                    'options'       =>  array(
     220                                                                                                                                                                'no'        =>  __('No',     'wp-hide-security-enhancer'),
     221                                                                                                                                                                'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
     222                                                                                                                                                                ),   
     223                                                                                                                                ) );
     224                                                                break;
     225                                                               
     226                                    case 'remove_resource_hints' :
     227                                                                $component_setting =   array_merge ( $component_setting , array(
     228                                                                                                                                    'label'         =>  __('Remove Resource Hints',    'wp-hide-security-enhancer'),
     229                                                                                                                                    'description'   =>  __('Remove Resource Hints meta generated tags within head (eg dns-prefetch, preconnect).',  'wp-hide-security-enhancer'),
     230                                                                                                                                   
     231                                                                                                                                    'help'          =>  array(
     232                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove Resource Hints',    'wp-hide-security-enhancer'),
     233                                                                                                                                                                'description'               =>  __("DNS prefetching and preconect allows you to resolve domain names before a user clicks on a link, which in turn can help and slightly improve performance.",    'wp-hide-security-enhancer'),
     234                                                                                                                                                                'option_documentation_url'  =>  'https://wp-hide.com/documentation/general-html-meta/'
     235                                                                                                                                                                ),
     236                                                                                                                                   
     237                                                                                                                                    'options'       =>  array(
     238                                                                                                                                                                'no'        =>  __('No',     'wp-hide-security-enhancer'),
     239                                                                                                                                                                'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
     240                                                                                                                                                                ),
     241                                                                                                                                ) );
     242                                                                break;
     243                                                               
     244                                    case 'remove_wlwmanifest' :
     245                                                                $component_setting =   array_merge ( $component_setting , array(
     246                                                                                                                                    'label'         =>  __('Remove wlwmanifest Meta',    'wp-hide-security-enhancer'),
     247                                                                                                                                    'description'   =>  __('Remove the wlwmanifest tag within head.',  'wp-hide-security-enhancer'),
     248                                                                                                                                   
     249                                                                                                                                    'help'          =>  array(
     250                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove wlwmanifest Meta',    'wp-hide-security-enhancer'),
     251                                                                                                                                                                'description'               =>  __("The above link is actually used by Windows Live Writer. If you don't te application, this is just unnecessary code.",    'wp-hide-security-enhancer') .
     252                                                                                                                                                                                                "<br /><br/>" . __("Sample tag:",    'wp-hide-security-enhancer') .
     253                                                                                                                                                                                                "<br /><code>&lt;link rel=&quot;wlwmanifest&quot; type=&quot;application/wlwmanifest+xml&quot; href=&quot;http://-domain-name-/wp-includes/wlwmanifest.xml&quot; /&gt;</code>",
     254                                                                                                                                                                'option_documentation_url'  =>  'https://wp-hide.com/documentation/general-html-meta/'
     255                                                                                                                                                                ),
     256                                                                                                                                   
     257                                                                                                                                    'options'       =>  array(
     258                                                                                                                                                                'no'        =>  __('No',     'wp-hide-security-enhancer'),
     259                                                                                                                                                                'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
     260                                                                                                                                                                ),
     261                                                                                                                                ) );
     262                                                                break;
     263                                                               
     264                                    case 'disable_json_rest_wphead_link' :
     265                                                                $component_setting =   array_merge ( $component_setting , array(
     266                                                                                                                                    'label'         =>  __('Disable output the REST API link tag into page header',    'wp-hide-security-enhancer'),
     267                                                                                                                                    'description'   =>  __('By default a REST API link tag is being append to HTML.',    'wp-hide-security-enhancer'),
     268                                                                                                                                   
     269                                                                                                                                    'help'          =>  array(
     270                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Disable output the REST API link tag into page header',    'wp-hide-security-enhancer'),
     271                                                                                                                                                                'description'               =>  __("This option disable the tag output with the JSON API url.",    'wp-hide-security-enhancer') .
     272                                                                                                                                                                                                "<br /><br/>" . __("Sample tag:",    'wp-hide-security-enhancer') .
     273                                                                                                                                                                                                "<br /><code>&lt;link rel='https://api.w.org/' href='https://-domain-name-/wp-json/' /&gt;</code>",
     274                                                                                                                                                                'option_documentation_url'  =>  'https://wp-hide.com/documentation/general-html-meta/'
     275                                                                                                                                                                ),
     276                                                                                                                                   
     277                                                                                                                                    'options'       =>  array(
     278                                                                                                                                                                'no'        =>  __('No',     'wp-hide-security-enhancer'),
     279                                                                                                                                                                'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
     280                                                                                                                                                                ),
     281                                                                                                                                ) );
     282                                                                break;
     283                                                               
     284                                    case 'remove_rsd_link' :
     285                                                                $component_setting =   array_merge ( $component_setting , array(
     286                                                                                                                                    'label'         =>  __('Remove rsd_link Meta',    'wp-hide-security-enhancer'),
     287                                                                                                                                    'description'   =>  __('Remove the rsd_link tag within head.',  'wp-hide-security-enhancer'),
     288                                                                                                                                   
     289                                                                                                                                    'help'          =>  array(
     290                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove rsd_link Meta',    'wp-hide-security-enhancer'),
     291                                                                                                                                                                'description'               =>  __("This helps to hide the link to the Really Simple Discovery service endpoint.",    'wp-hide-security-enhancer') .
     292                                                                                                                                                                                                "<br /><br/>" . __("Sample tag:",    'wp-hide-security-enhancer') .
     293                                                                                                                                                                                                "<br /><code>&lt;link rel='EditURI' type='application/rsd+xml' title='RSD' href='https://-domain-name-/xmlrpc.php?rsd' /&gt;</code>",
     294                                                                                                                                                                'option_documentation_url'  =>  'https://wp-hide.com/documentation/general-html-meta/'
     295                                                                                                                                                                ),
     296                                                                                                                                   
     297                                                                                                                                    'options'       =>  array(
     298                                                                                                                                                                'no'        =>  __('No',     'wp-hide-security-enhancer'),
     299                                                                                                                                                                'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
     300                                                                                                                                                                ),
     301                                                                                                                                ) );
     302                                                                break;
     303                                                               
     304                                    case 'remove_adjacent_posts_rel' :
     305                                                                $component_setting =   array_merge ( $component_setting , array(
     306                                                                                                                                    'label'         =>  __('Remove adjacent_posts_rel Meta',    'wp-hide-security-enhancer'),
     307                                                                                                                                    'description'   =>  __('Remove the adjacent_posts_rel tag within head.',  'wp-hide-security-enhancer'),
     308                                                                                                                                   
     309                                                                                                                                    'help'          =>  array(
     310                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove adjacent_posts_rel Meta',    'wp-hide-security-enhancer'),
     311                                                                                                                                                                'description'               =>  __("This helps to hide the post adjacent tags.",    'wp-hide-security-enhancer') .
     312                                                                                                                                                                                                "<br /><br/>" . __("Sample tag:",    'wp-hide-security-enhancer') .
     313                                                                                                                                                                                                "<br /><code>&lt;link rel='next' title='Dummy Post' href='http://-domain-name-/dummy-post/' /&gt;</code>",
     314                                                                                                                                                                'option_documentation_url'  =>  'https://wp-hide.com/documentation/general-html-meta/'
     315                                                                                                                                                                ),
     316
     317                                                                                                                                    'options'       =>  array(
     318                                                                                                                                                                'no'        =>  __('No',     'wp-hide-security-enhancer'),
     319                                                                                                                                                                'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
     320                                                                                                                                                                ),
     321                                                                                                                                ) );
     322                                                                break;
     323                                                               
     324                                    case 'remove_profile' :
     325                                                                $component_setting =   array_merge ( $component_setting , array(
     326                                                                                                                                    'label'         =>  __('Remove profile link',    'wp-hide-security-enhancer'),
     327                                                                                                                                    'description'   =>  __('Remove profile link meta tag within head.',  'wp-hide-security-enhancer'),
     328                                                                                                                                   
     329                                                                                                                                    'help'          =>  array(
     330                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove adjacent_posts_rel Meta',    'wp-hide-security-enhancer'),
     331                                                                                                                                                                'description'               =>  __("This helps to hide the profile tags.",    'wp-hide-security-enhancer') .
     332                                                                                                                                                                                                "<br /><br/>" . __("Sample tag:",    'wp-hide-security-enhancer') .
     333                                                                                                                                                                                                "<br /><code>&lt;link rel='profile' href='http://-domain-name-/profile/' /&gt;</code>",
     334                                                                                                                                                                'option_documentation_url'  =>  'https://wp-hide.com/documentation/general-html-meta/'
     335                                                                                                                                                                ),
     336
     337                                                                                                                                    'options'       =>  array(
     338                                                                                                                                                                'no'        =>  __('No',     'wp-hide-security-enhancer'),
     339                                                                                                                                                                'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
     340                                                                                                                                                                ),
     341                                                                                                                                ) );
     342                                                                break;
     343                                                               
     344                                    case 'remove_canonical' :
     345                                                                $component_setting =   array_merge ( $component_setting , array(
     346                                                                                                                                    'label'         =>  __('Remove canonical link',    'wp-hide-security-enhancer'),
     347                                                                                                                                    'description'   =>  __('Remove canonical link meta tag within head.',  'wp-hide-security-enhancer'),
     348                                                                                                                                   
     349                                                                                                                                    'help'          =>  array(
     350                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove adjacent_posts_rel Meta',    'wp-hide-security-enhancer'),
     351                                                                                                                                                                'description'               =>  __("The rel=canonical element, often called the 'canonical link', is an HTML element that helps webmasters prevent duplicate content issues. It does this by specifying the 'canonical URL', the 'preferred' version of a web page - the original source, even.",    'wp-hide-security-enhancer') .
     352                                                                                                                                                                                                "<br /><br/>" . __("Sample tag:",    'wp-hide-security-enhancer') .
     353                                                                                                                                                                                                "<br /><code>&lt;link rel=&quot;canonical&quot; href=&quot;http://-domain-name-/dummy-post/&quot; /&gt;</code>",
     354                                                                                                                                                                'option_documentation_url'  =>  'https://wp-hide.com/documentation/general-html-meta/'
     355                                                                                                                                                                ),
     356
     357                                                                                                                                    'options'       =>  array(
     358                                                                                                                                                                'no'        =>  __('No',     'wp-hide-security-enhancer'),
     359                                                                                                                                                                'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
     360                                                                                                                                                                ),
     361                                                                                                                                ) );
     362                                                                break;
     363                                                     
     364                                }
     365                               
     366                            $component_settings[ $component_key ]   =   $component_setting;
     367                        }
     368                   
     369                    return $component_settings;
     370                   
     371                }
     372                   
    277373               
    278374            function _init_remove_generator_meta($saved_field_data)
  • wp-hide-security-enhancer/trunk/modules/components/general-oembed.php

    r2417390 r3219455  
    1414                    $this->module_settings[]                  =   array(
    1515                                                                    'id'            =>  'remove_oembed',
    16                                                                     'label'         =>  __('Remove Oembed',    'wp-hide-security-enhancer'),
    17                                                                     'description'   =>  __('Remove Oembed tags from header.', 'wp-hide-security-enhancer'),
    18                                                                    
    19                                                                     'help'          =>  array(
    20                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove Oembed',    'wp-hide-security-enhancer'),
    21                                                                                                 'description'               =>  __("WordPress oEmbed recognizes URLs to a number of services, for example Youtube videos. When WordPress sees the URL it will connect to the external service (Youtube) and ask for the relevant HTML code to embed the video into the page or post.",    'wp-hide-security-enhancer'),
    22                                                                                                 ),
    23                                                                    
     16                                                                                                             
    2417                                                                    'input_type'    =>  'radio',
    25                                                                     'options'       =>  array(
    26                                                                                                 'no'        =>  __('No',     'wp-hide-security-enhancer'),
    27                                                                                                 'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
    28                                                                                                 ),
     18                                             
    2919                                                                    'default_value' =>  'no',
    3020                                                                   
     
    3424                                                                   
    3525                    return $this->module_settings;   
     26                }
     27               
     28        function set_module_components_description( $component_settings )
     29                {
     30
     31                    foreach ( $component_settings   as  $component_key  =>  $component_setting )
     32                        {
     33                            if ( ! isset ( $component_setting['id'] ) )
     34                                continue;
     35                           
     36                            switch ( $component_setting['id'] )
     37                                {
     38                                    case 'remove_oembed' :
     39                                                                $component_setting =   array_merge ( $component_setting , array(
     40                                                                                                                                    'label'         =>  __('Remove Oembed',    'wp-hide-security-enhancer'),
     41                                                                                                                                    'description'   =>  __('Remove Oembed tags from header.', 'wp-hide-security-enhancer'),
     42                                                                                                                                   
     43                                                                                                                                    'help'          =>  array(
     44                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove Oembed',    'wp-hide-security-enhancer'),
     45                                                                                                                                                                'description'               =>  __("WordPress oEmbed recognizes URLs to a number of services, for example Youtube videos. When WordPress sees the URL it will connect to the external service (Youtube) and ask for the relevant HTML code to embed the video into the page or post.",    'wp-hide-security-enhancer'),
     46                                                                                                                                                                ),
     47
     48                                                                                                                                    'options'       =>  array(
     49                                                                                                                                                                'no'        =>  __('No',     'wp-hide-security-enhancer'),
     50                                                                                                                                                                'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
     51                                                                                                                                                                ),
     52                                                                                                                                ) );
     53                                                                break;
     54                                                     
     55                                }
     56                               
     57                            $component_settings[ $component_key ]   =   $component_setting;
     58                        }
     59                   
     60                    return $component_settings;
     61                   
    3662                }
    3763           
  • wp-hide-security-enhancer/trunk/modules/components/general-robots-txt.php

    r2800513 r3219455  
    1414                    $this->module_settings[]                  =   array(
    1515                                                                    'id'            =>  'disable_robots_txt',
    16                                                                     'label'         =>  __('Change the default urls within Robots.txt',    'wp-hide-security-enhancer'),
    17                                                                     'description'   =>  __('Change any default url which is being automatically generated by WordPress when called robots.txt.',  'wp-hide-security-enhancer'),
    18                                                                    
    19                                                                     'help'          =>  array(
    20                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Change the default urls within Robots.txt',    'wp-hide-security-enhancer'),
    21                                                                                                 'description'               =>  __("The robots.txt file plays a major role in search engine ranking. It blocks search engine bots and helps index and crawl important parts of your site.",    'wp-hide-security-enhancer') .
    22                                                                                                                                     "<br /><br />" . __("As default the robots.txt also includes an allow clause to admin URL and admin-ajax.php url. Once customized those areas, the new slugs might not want to be show to anyone. Turn this option to Yes removed any reference to new wp-admin and admin-ajax.php.",    'wp-hide-security-enhancer') .
    23                                                                                                                                     "<br/><br />" . __("Sample robots.txt url:" ,    'wp-hide-security-enhancer') .
    24                                                                                                                                     "<br /><code>https://-domain-name-/robots.txt</code>",
    25                                                                                                 'option_documentation_url'  =>  'https://wp-hide.com/documentation/general-html-robots-txt/'
    26                                                                                                 ),
    27                                                                    
     16                                                                                                     
    2817                                                                    'input_type'    =>  'radio',
    29                                                                     'options'       =>  array(
    30                                                                                                 'no'        =>  __('No',     'wp-hide-security-enhancer'),
    31                                                                                                 'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
    32                                                                                                 ),
     18                             
    3319                                                                    'default_value' =>  'no',
    3420                                                                   
     
    4228               
    4329               
     30        function set_module_components_description( $component_settings )
     31                {
     32
     33                    foreach ( $component_settings   as  $component_key  =>  $component_setting )
     34                        {
     35                            if ( ! isset ( $component_setting['id'] ) )
     36                                continue;
     37                           
     38                            switch ( $component_setting['id'] )
     39                                {
     40                                    case 'disable_robots_txt' :
     41                                                                $component_setting =   array_merge ( $component_setting , array(
     42                                                                                                                                    'label'         =>  __('Change the default urls within Robots.txt',    'wp-hide-security-enhancer'),
     43                                                                                                                                    'description'   =>  __('Change any default url which is being automatically generated by WordPress when called robots.txt.',  'wp-hide-security-enhancer'),
     44                                                                                                                                   
     45                                                                                                                                    'help'          =>  array(
     46                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Change the default urls within Robots.txt',    'wp-hide-security-enhancer'),
     47                                                                                                                                                                'description'               =>  __("The robots.txt file plays a major role in search engine ranking. It blocks search engine bots and helps index and crawl important parts of your site.",    'wp-hide-security-enhancer') .
     48                                                                                                                                                                                                    "<br /><br />" . __("As default the robots.txt also includes an allow clause to admin URL and admin-ajax.php url. Once customized those areas, the new slugs might not want to be show to anyone. Turn this option to Yes removed any reference to new wp-admin and admin-ajax.php.",    'wp-hide-security-enhancer') .
     49                                                                                                                                                                                                    "<br/><br />" . __("Sample robots.txt url:" ,    'wp-hide-security-enhancer') .
     50                                                                                                                                                                                                    "<br /><code>https://-domain-name-/robots.txt</code>",
     51                                                                                                                                                                'option_documentation_url'  =>  'https://wp-hide.com/documentation/general-html-robots-txt/'
     52                                                                                                                                                                ),
     53
     54                                                                                                                                    'options'       =>  array(
     55                                                                                                                                                                'no'        =>  __('No',     'wp-hide-security-enhancer'),
     56                                                                                                                                                                'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
     57                                                                                                                                                                ),
     58                                                                                                                                ) );
     59                                                                break;
     60                                                     
     61                                }
     62                               
     63                            $component_settings[ $component_key ]   =   $component_setting;
     64                        }
     65                   
     66                    return $component_settings;
     67                   
     68                }
    4469               
     70                   
    4571            function _init_disable_robots_txt($saved_field_data)
    4672                {
  • wp-hide-security-enhancer/trunk/modules/components/general-scripts.php

    r3013473 r3219455  
    1414                    $this->module_settings[]                  =   array(
    1515                                                                    'id'            =>  'scripts_remove_version',
    16                                                                     'label'         =>  __('Remove Version',    'wp-hide-security-enhancer'),
    17                                                                     'description'   =>  __('Remove version number from enqueued script files.', 'wp-hide-security-enhancer'),
    18                                                                    
    19                                                                     'help'          =>  array(
    20                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove Version',    'wp-hide-security-enhancer'),
    21                                                                                                 'description'               =>  __("This provide a method to remove the JavaScript version number which is being append at the end of every script file. Generally this is intended to be a plain information upon the JavaScript code version, however not being used within any functionality or code run.",    'wp-hide-security-enhancer') .
    22                                                                                                                                     "<br /><br />" . __("Keeping version number for scripts provide additional information to hackers which try to identify specific JavaScript code and version which know as being vulnerable.",    'wp-hide-security-enhancer') .
    23                                                                                                                                     "<br /><br />" . __("Sample tag:",    'wp-hide-security-enhancer') .
    24                                                                                                                                     "<br /><code>&lt;script type='text/javascript' src='https://-domain-name-/wp-includes/js/jquery/jquery.js?ver=1.12.4'&gt;&lt;/script&gt;</code>
    25                                                                                                                                     <br />" . __("Once option set to Yes the tag becomes:",    'wp-hide-security-enhancer') .
    26                                                                                                                                     "<br /><code>&lt;script type='text/javascript' src='https://-domain-name-/wp-includes/js/jquery/jquery.js'&gt;&lt;/script&gt;</code>",
    27                                                                                                 'option_documentation_url'  =>  'https://wp-hide.com/documentation/general-html-scripts/'
    28                                                                                                 ),
    29                                                                    
     16                                                                                                         
    3017                                                                    'input_type'    =>  'radio',
    31                                                                     'options'       =>  array(
    32                                                                                                 'no'        =>  __('No',     'wp-hide-security-enhancer'),
    33                                                                                                 'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
    34                                                                                                 ),
     18                                       
    3519                                                                    'default_value' =>  'no',
    3620                                                                   
     
    4226                }
    4327               
    44                
     28           
     29        function set_module_components_description( $component_settings )
     30                {
     31
     32                    foreach ( $component_settings   as  $component_key  =>  $component_setting )
     33                        {
     34                            if ( ! isset ( $component_setting['id'] ) )
     35                                continue;
     36                           
     37                            switch ( $component_setting['id'] )
     38                                {
     39                                    case 'scripts_remove_version' :
     40                                                                $component_setting =   array_merge ( $component_setting , array(
     41                                                                                                                                    'label'         =>  __('Remove Version',    'wp-hide-security-enhancer'),
     42                                                                                                                                    'description'   =>  __('Remove version number from enqueued script files.', 'wp-hide-security-enhancer'),
     43                                                                                                                                   
     44                                                                                                                                    'help'          =>  array(
     45                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove Version',    'wp-hide-security-enhancer'),
     46                                                                                                                                                                'description'               =>  __("This provide a method to remove the JavaScript version number which is being append at the end of every script file. Generally this is intended to be a plain information upon the JavaScript code version, however not being used within any functionality or code run.",    'wp-hide-security-enhancer') .
     47                                                                                                                                                                                                    "<br /><br />" . __("Keeping version number for scripts provide additional information to hackers which try to identify specific JavaScript code and version which know as being vulnerable.",    'wp-hide-security-enhancer') .
     48                                                                                                                                                                                                    "<br /><br />" . __("Sample tag:",    'wp-hide-security-enhancer') .
     49                                                                                                                                                                                                    "<br /><code>&lt;script type='text/javascript' src='https://-domain-name-/wp-includes/js/jquery/jquery.js?ver=1.12.4'&gt;&lt;/script&gt;</code>
     50                                                                                                                                                                                                    <br />" . __("Once option set to Yes the tag becomes:",    'wp-hide-security-enhancer') .
     51                                                                                                                                                                                                    "<br /><code>&lt;script type='text/javascript' src='https://-domain-name-/wp-includes/js/jquery/jquery.js'&gt;&lt;/script&gt;</code>",
     52                                                                                                                                                                'option_documentation_url'  =>  'https://wp-hide.com/documentation/general-html-scripts/'
     53                                                                                                                                                                ),
     54
     55                                                                                                                                    'options'       =>  array(
     56                                                                                                                                                                'no'        =>  __('No',     'wp-hide-security-enhancer'),
     57                                                                                                                                                                'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
     58                                                                                                                                                                ),
     59                                                                                                                                ) );
     60                                                                break;
     61                                                     
     62                                }
     63                               
     64                            $component_settings[ $component_key ]   =   $component_setting;
     65                        }
     66                   
     67                    return $component_settings;
     68                   
     69                }
     70                   
    4571               
    4672            function _init_scripts_remove_version($saved_field_data)
  • wp-hide-security-enhancer/trunk/modules/components/general-styles.php

    r3013473 r3219455  
    1414                    $this->module_settings[]                  =   array(
    1515                                                                    'id'            =>  'styles_remove_version',
    16                                                                     'label'         =>  __('Remove Version',    'wp-hide-security-enhancer'),
    17                                                                     'description'   =>  __('Remove version number from enqueued style files.', 'wp-hide-security-enhancer'),
    18                                                                    
    19                                                                     'help'          =>  array(
    20                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove Version',    'wp-hide-security-enhancer'),
    21                                                                                                 'description'               =>  __("This provide a method to remove the Style file version number which is being append at the end of every style tag. Generally this is intended to be a plain information upon the style code version, however not being used within any functionality or code run.",    'wp-hide-security-enhancer') .
    22                                                                                                                                 "<br /><br />" . __("Keeping version number for styles provide additional information to hackers which try to identify specific code and version which know as being vulnerable.",    'wp-hide-security-enhancer'),
    23                                                                                                 'option_documentation_url'  =>  'https://wp-hide.com/documentation/general-html-styles/'
    24                                                                                                 ),
    25                                                                    
     16                                               
    2617                                                                    'input_type'    =>  'radio',
    27                                                                     'options'       =>  array(
    28                                                                                                 'no'        =>  __('No',     'wp-hide-security-enhancer'),
    29                                                                                                 'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
    30                                                                                                 ),
     18                                               
    3119                                                                    'default_value' =>  'no',
    3220                                                                   
     
    3725                    $this->module_settings[]                  =   array(
    3826                                                                    'id'            =>  'styles_remove_id_attribute',
    39                                                                     'label'         =>  __('Remove ID from link tags',    'wp-hide-security-enhancer'),
    40                                                                     'description'   =>  __('Remove ID attribute from all link tags which include a stylesheet.', 'wp-hide-security-enhancer'),
    41                                                                    
    42                                                                     'help'          =>  array(
    43                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove ID from link tags',    'wp-hide-security-enhancer'),
    44                                                                                                 'description'               =>  __("This provide a method to remove the Style file ID attribute which generally has no usage.",    'wp-hide-security-enhancer'),
    45                                                                                                 'option_documentation_url'  =>  'https://wp-hide.com/documentation/general-html-styles/'
    46                                                                                                 ),
    47                                                                    
     27                                                                                                                       
    4828                                                                    'input_type'    =>  'radio',
    49                                                                     'options'       =>  array(
    50                                                                                                 'no'        =>  __('No',     'wp-hide-security-enhancer'),
    51                                                                                                 'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
    52                                                                                                 ),
     29                                                       
    5330                                                                    'default_value' =>  'no',
    5431                                                                   
     
    6037                }
    6138               
    62                
     39           
     40        function set_module_components_description( $component_settings )
     41                {
     42
     43                    foreach ( $component_settings   as  $component_key  =>  $component_setting )
     44                        {
     45                            if ( ! isset ( $component_setting['id'] ) )
     46                                continue;
     47                           
     48                            switch ( $component_setting['id'] )
     49                                {
     50                                    case 'styles_remove_version' :
     51                                                                $component_setting =   array_merge ( $component_setting , array(
     52                                                                                                                                    'label'         =>  __('Remove Version',    'wp-hide-security-enhancer'),
     53                                                                                                                                    'description'   =>  __('Remove version number from enqueued style files.', 'wp-hide-security-enhancer'),
     54                                                                                                                                   
     55                                                                                                                                    'help'          =>  array(
     56                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove Version',    'wp-hide-security-enhancer'),
     57                                                                                                                                                                'description'               =>  __("This provide a method to remove the Style file version number which is being append at the end of every style tag. Generally this is intended to be a plain information upon the style code version, however not being used within any functionality or code run.",    'wp-hide-security-enhancer') .
     58                                                                                                                                                                                                "<br /><br />" . __("Keeping version number for styles provide additional information to hackers which try to identify specific code and version which know as being vulnerable.",    'wp-hide-security-enhancer'),
     59                                                                                                                                                                'option_documentation_url'  =>  'https://wp-hide.com/documentation/general-html-styles/'
     60                                                                                                                                                                ),
     61
     62                                                                                                                                    'options'       =>  array(
     63                                                                                                                                                                'no'        =>  __('No',     'wp-hide-security-enhancer'),
     64                                                                                                                                                                'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
     65                                                                                                                                                                ),
     66                                                                                                                                ) );
     67                                                                break;
     68                                                               
     69                                    case 'styles_remove_id_attribute' :
     70                                                                $component_setting =   array_merge ( $component_setting , array(
     71                                                                                                                                    'label'         =>  __('Remove ID from link tags',    'wp-hide-security-enhancer'),
     72                                                                                                                                    'description'   =>  __('Remove ID attribute from all link tags which include a stylesheet.', 'wp-hide-security-enhancer'),
     73                                                                                                                                   
     74                                                                                                                                    'help'          =>  array(
     75                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove ID from link tags',    'wp-hide-security-enhancer'),
     76                                                                                                                                                                'description'               =>  __("This provide a method to remove the Style file ID attribute which generally has no usage.",    'wp-hide-security-enhancer'),
     77                                                                                                                                                                'option_documentation_url'  =>  'https://wp-hide.com/documentation/general-html-styles/'
     78                                                                                                                                                                ),
     79
     80                                                                                                                                    'options'       =>  array(
     81                                                                                                                                                                'no'        =>  __('No',     'wp-hide-security-enhancer'),
     82                                                                                                                                                                'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
     83                                                                                                                                                                ),
     84                                                                                                                                ) );
     85                                                                break;
     86                                                     
     87                                }
     88                               
     89                            $component_settings[ $component_key ]   =   $component_setting;
     90                        }
     91                   
     92                    return $component_settings;
     93                   
     94                }
     95                   
    6396               
    6497            function _init_styles_remove_version($saved_field_data)
  • wp-hide-security-enhancer/trunk/modules/components/general-user-interactions.php

    r3183924 r3219455  
    2222                    $this->module_settings[]                  =   array(
    2323                                                                    'id'            =>  'disable_mouse_right_click',
    24                                                                     'label'         =>  __('Disable Mouse right click',    'wp-hide-security-enhancer'),
    25                                                                     'description'   =>  __('Disable mouse right click on your pages.', 'wp-hide-security-enhancer'),
    26                                                                    
    27                                                                     'help'          =>  array(
    28                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Disable right Mouse click',    'wp-hide-security-enhancer'),
    29                                                                                                 'description'               =>  __("Disable right mouse click on your pages can protect your site content from being copied.",    'wp-hide-security-enhancer') .
    30                                                                                                                                 "<br />" . __("Some plugins, mainly visual editors, use mouse right-click, if use such code this option should be set to No.",    'wp-hide-security-enhancer'),
    31                                                                                                 'option_documentation_url'  =>  'https://wp-hide.com/documentation/user-interactions/'
    32                                                                                                 ),
    33                                                                    
    34                                                                     'input_type'    =>  'radio',
    35                                                                     'options'       =>  array(
    36                                                                                                 'no'        =>  __('No',     'wp-hide-security-enhancer'),
    37                                                                                                 'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
    38                                                                                                 ),
     24                                                                                                                     
     25                                                                    'input_type'    =>  'radio',
     26                                                           
    3927                                                                    'default_value' =>  'no',
    4028                                                                   
     
    4533                    $this->module_settings[]                  =   array(
    4634                                                                    'id'            =>  'disable_text_selection',
    47                                                                     'label'         =>  __('Disable Text Selection',    'wp-hide-security-enhancer'),
    48                                                                     'description'   =>  __('Disable Text Selection on your pages.', 'wp-hide-security-enhancer'),
    49                                                                    
    50                                                                     'help'          =>  array(
    51                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Disable Text Selection',    'wp-hide-security-enhancer'),
    52                                                                                                 'description'               =>  __("When the option is active, the text selection on pages is not possible.",    'wp-hide-security-enhancer') .
    53                                                                                                                                 "<br />" . __("This is useful when don't want the site texts to be copied.",    'wp-hide-security-enhancer'),
    54                                                                                                 'option_documentation_url'  =>  'https://wp-hide.com/documentation/user-interactions/'
    55                                                                                                 ),
    56                                                                    
    57                                                                     'input_type'    =>  'radio',
    58                                                                     'options'       =>  array(
    59                                                                                                 'no'        =>  __('No',     'wp-hide-security-enhancer'),
    60                                                                                                 'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
    61                                                                                                 ),
     35                                         
     36                                                                    'input_type'    =>  'radio',
     37                                         
    6238                                                                    'default_value' =>  'no',
    6339                                                                   
     
    6844                    $this->module_settings[]                  =   array(
    6945                                                                    'id'            =>  'disable_copy',
    70                                                                     'label'         =>  __('Disable Copy',    'wp-hide-security-enhancer'),
    71                                                                     'description'   =>  __('Disable text copy on your pages.', 'wp-hide-security-enhancer'),
    72                                                                    
    73                                                                     'help'          =>  array(
    74                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Disable Copy',    'wp-hide-security-enhancer'),
    75                                                                                                 'description'               =>  __("Through this option, the browser copy functionality is disabled.",    'wp-hide-security-enhancer') ,
    76                                                                                                 'option_documentation_url'  =>  'https://wp-hide.com/documentation/user-interactions/'
    77                                                                                                 ),
    78                                                                    
    79                                                                     'input_type'    =>  'radio',
    80                                                                     'options'       =>  array(
    81                                                                                                 'no'        =>  __('No',     'wp-hide-security-enhancer'),
    82                                                                                                 'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
    83                                                                                                 ),
     46                                             
     47                                                                    'input_type'    =>  'radio',
     48                                                         
    8449                                                                    'default_value' =>  'no',
    8550                                                                   
     
    9055                    $this->module_settings[]                  =   array(
    9156                                                                    'id'            =>  'disable_cut',
    92                                                                     'label'         =>  __('Disable Cut',    'wp-hide-security-enhancer'),
    93                                                                     'description'   =>  __('Disable text cut on your pages.', 'wp-hide-security-enhancer'),
    94                                                                    
    95                                                                     'help'          =>  array(
    96                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Disable Cut',    'wp-hide-security-enhancer'),
    97                                                                                                 'description'               =>  __("Through this option, the browser cut functionality is disabled.",    'wp-hide-security-enhancer') ,
    98                                                                                                 'option_documentation_url'  =>  'https://wp-hide.com/documentation/user-interactions/'
    99                                                                                                 ),
    100                                                                    
    101                                                                     'input_type'    =>  'radio',
    102                                                                     'options'       =>  array(
    103                                                                                                 'no'        =>  __('No',     'wp-hide-security-enhancer'),
    104                                                                                                 'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
    105                                                                                                 ),
     57                                                       
     58                                                                    'input_type'    =>  'radio',
     59                                                     
    10660                                                                    'default_value' =>  'no',
    10761                                                                   
     
    11266                    $this->module_settings[]                  =   array(
    11367                                                                    'id'            =>  'disable_paste',
    114                                                                     'label'         =>  __('Disable Paste',    'wp-hide-security-enhancer'),
    115                                                                     'description'   =>  __('Disable text paste on your pages.', 'wp-hide-security-enhancer'),
    116                                                                    
    117                                                                     'help'          =>  array(
    118                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Disable Paste',    'wp-hide-security-enhancer'),
    119                                                                                                 'description'               =>  __("Through this option, the browser paste functionality is disabled.",    'wp-hide-security-enhancer') ,
    120                                                                                                 'option_documentation_url'  =>  'https://wp-hide.com/documentation/user-interactions/'
    121                                                                                                 ),
    122                                                                    
    123                                                                     'input_type'    =>  'radio',
    124                                                                     'options'       =>  array(
    125                                                                                                 'no'        =>  __('No',     'wp-hide-security-enhancer'),
    126                                                                                                 'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
    127                                                                                                 ),
     68                                             
     69                                                                    'input_type'    =>  'radio',
     70                                                             
    12871                                                                    'default_value' =>  'no',
    12972                                                                   
     
    13477                    $this->module_settings[]                  =   array(
    13578                                                                    'id'            =>  'disable_print',
    136                                                                     'label'         =>  __('Disable Print',    'wp-hide-security-enhancer'),
    137                                                                     'description'   =>  __('Disable Print function on your pages.', 'wp-hide-security-enhancer'),
    138                                                                    
    139                                                                     'help'          =>  array(
    140                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Disable Print',    'wp-hide-security-enhancer'),
    141                                                                                                 'description'               =>  __("When using the option, the browser Print dialogue is not available so a site print is disabled.",    'wp-hide-security-enhancer'),
    142                                                                                                 'option_documentation_url'  =>  'https://wp-hide.com/documentation/user-interactions/'
    143                                                                                                 ),
    144                                                                    
    145                                                                     'input_type'    =>  'radio',
    146                                                                     'options'       =>  array(
    147                                                                                                 'no'        =>  __('No',     'wp-hide-security-enhancer'),
    148                                                                                                 'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
    149                                                                                                 ),
     79                                       
     80                                                                    'input_type'    =>  'radio',
     81                                                   
    15082                                                                    'default_value' =>  'no',
    15183                                                                   
     
    15688                    $this->module_settings[]                  =   array(
    15789                                                                    'id'            =>  'disable_print_screen',
    158                                                                     'label'         =>  __('Disable Print Screen',    'wp-hide-security-enhancer'),
    159                                                                     'description'   =>  __('Disable Print Screen function on your pages.', 'wp-hide-security-enhancer'),
    160                                                                    
    161                                                                     'help'          =>  array(
    162                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Disable Print Screen',    'wp-hide-security-enhancer'),
    163                                                                                                 'description'               =>  __("The Print Screen function captures an image of the entire screen and copies it to the Clipboard in the computer's memory.",    'wp-hide-security-enhancer') .
    164                                                                                                                                 "<br />" . __("If the functionality is not required, the option helps to disable it.",    'wp-hide-security-enhancer'),
    165                                                                                                 'option_documentation_url'  =>  'https://wp-hide.com/documentation/user-interactions/'
    166                                                                                                 ),
    167                                                                    
    168                                                                     'input_type'    =>  'radio',
    169                                                                     'options'       =>  array(
    170                                                                                                 'no'        =>  __('No',     'wp-hide-security-enhancer'),
    171                                                                                                 'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
    172                                                                                                 ),
     90                                                                                                             
     91                                                                    'input_type'    =>  'radio',
     92                                                 
    17393                                                                    'default_value' =>  'no',
    17494                                                                   
     
    17999                    $this->module_settings[]                  =   array(
    180100                                                                    'id'            =>  'disable_developer_tools',
    181                                                                     'label'         =>  __('Disable Developer Tools',    'wp-hide-security-enhancer'),
    182                                                                     'description'   =>  __('Disable the browser Developr Tools on your pages.', 'wp-hide-security-enhancer'),
    183                                                                    
    184                                                                     'help'          =>  array(
    185                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Disable Developer Tools',    'wp-hide-security-enhancer'),
    186                                                                                                 'description'               =>  __("Every modern web browser includes a powerful tool called Developer Tools. Through the application, a user can inspect currently-loaded HTML, CSS and JavaScript.",    'wp-hide-security-enhancer') .
    187                                                                                                                                 "<br />" . __("To prevent the user from deeply checking into your site architecture, the browser Inspect can be disabled through this option. ",    'wp-hide-security-enhancer'),
    188                                                                                                 'option_documentation_url'  =>  'https://wp-hide.com/documentation/user-interactions/'
    189                                                                                                 ),
    190                                                                    
    191                                                                     'input_type'    =>  'radio',
    192                                                                     'options'       =>  array(
    193                                                                                                 'no'        =>  __('No',     'wp-hide-security-enhancer'),
    194                                                                                                 'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
    195                                                                                                 ),
     101                                           
     102                                                                    'input_type'    =>  'radio',
     103                                       
    196104                                                                    'default_value' =>  'no',
    197105                                                                   
     
    202110                    $this->module_settings[]                  =   array(
    203111                                                                    'id'            =>  'disable_view_source',
    204                                                                     'label'         =>  __('Disable View Source',    'wp-hide-security-enhancer'),
    205                                                                     'description'   =>  __('Disable the browser view source on your pages.', 'wp-hide-security-enhancer'),
    206                                                                    
    207                                                                     'help'          =>  array(
    208                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Disable View Source',    'wp-hide-security-enhancer'),
    209                                                                                                 'description'               =>  __("The page source is an HTML set of tags code. An HTML tag is an element that, along with CSS and JavaScript, tells the Web browser what to do and how to display the text and images.",    'wp-hide-security-enhancer') ,
    210                                                                                                 'option_documentation_url'  =>  'https://wp-hide.com/documentation/user-interactions/'
    211                                                                                                 ),
    212                                                                    
    213                                                                     'input_type'    =>  'radio',
    214                                                                     'options'       =>  array(
    215                                                                                                 'no'        =>  __('No',     'wp-hide-security-enhancer'),
    216                                                                                                 'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
    217                                                                                                 ),
     112                                       
     113                                                                    'input_type'    =>  'radio',
     114                                     
    218115                                                                    'default_value' =>  'no',
    219116                                                                   
     
    224121                    $this->module_settings[]                  =   array(
    225122                                                                    'id'            =>  'disable_drag_drop',
    226                                                                     'label'         =>  __('Disable Drag / Drop',    'wp-hide-security-enhancer'),
    227                                                                     'description'   =>  __('Disable the browser drag and drop for images on your pages.', 'wp-hide-security-enhancer'),
    228                                                                    
    229                                                                     'help'          =>  array(
    230                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Disable Drag / Drop',    'wp-hide-security-enhancer'),
    231                                                                                                 'description'               =>  __("The Drag and Drop operation describes the action o selecting an object or text on the page and moving it to a different area.",    'wp-hide-security-enhancer'),
    232                                                                                                 'option_documentation_url'  =>  'https://wp-hide.com/documentation/user-interactions/'
    233                                                                                                 ),
    234                                                                    
    235                                                                     'input_type'    =>  'radio',
    236                                                                     'options'       =>  array(
    237                                                                                                 'no'        =>  __('No',     'wp-hide-security-enhancer'),
    238                                                                                                 'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
    239                                                                                                 ),
     123                                                                                                                     
     124                                                                    'input_type'    =>  'radio',
     125                                               
    240126                                                                    'default_value' =>  'no',
    241127                                                                   
     
    248134               
    249135         
    250            
     136        function set_module_components_description( $component_settings )
     137                {
     138
     139                    foreach ( $component_settings   as  $component_key  =>  $component_setting )
     140                        {
     141                            if ( ! isset ( $component_setting['id'] ) )
     142                                continue;
     143                           
     144                            switch ( $component_setting['id'] )
     145                                {
     146                                    case 'disable_mouse_right_click' :
     147                                                                $component_setting =   array_merge ( $component_setting , array(
     148                                                                                                                                    'label'         =>  __('Disable Mouse right click',    'wp-hide-security-enhancer'),
     149                                                                                                                                    'description'   =>  __('Disable mouse right click on your pages.', 'wp-hide-security-enhancer'),
     150                                                                                                                                   
     151                                                                                                                                    'help'          =>  array(
     152                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Disable right Mouse click',    'wp-hide-security-enhancer'),
     153                                                                                                                                                                'description'               =>  __("Disable right mouse click on your pages can protect your site content from being copied.",    'wp-hide-security-enhancer') .
     154                                                                                                                                                                                                "<br />" . __("Some plugins, mainly visual editors, use mouse right-click, if use such code this option should be set to No.",    'wp-hide-security-enhancer'),
     155                                                                                                                                                                'option_documentation_url'  =>  'https://wp-hide.com/documentation/user-interactions/'
     156                                                                                                                                                                ),
     157
     158                                                                                                                                    'options'       =>  array(
     159                                                                                                                                                                'no'        =>  __('No',     'wp-hide-security-enhancer'),
     160                                                                                                                                                                'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
     161                                                                                                                                                                ),
     162                                                                                                                                ) );
     163                                                                break;
     164                                   
     165                                    case 'disable_text_selection' :
     166                                                                $component_setting =   array_merge ( $component_setting , array(
     167                                                                                                                                    'label'         =>  __('Disable Text Selection',    'wp-hide-security-enhancer'),
     168                                                                                                                                    'description'   =>  __('Disable Text Selection on your pages.', 'wp-hide-security-enhancer'),
     169                                                                                                                                   
     170                                                                                                                                    'help'          =>  array(
     171                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Disable Text Selection',    'wp-hide-security-enhancer'),
     172                                                                                                                                                                'description'               =>  __("When the option is active, the text selection on pages is not possible.",    'wp-hide-security-enhancer') .
     173                                                                                                                                                                                                "<br />" . __("This is useful when don't want the site texts to be copied.",    'wp-hide-security-enhancer'),
     174                                                                                                                                                                'option_documentation_url'  =>  'https://wp-hide.com/documentation/user-interactions/'
     175                                                                                                                                                                ),
     176
     177                                                                                                                                    'options'       =>  array(
     178                                                                                                                                                                'no'        =>  __('No',     'wp-hide-security-enhancer'),
     179                                                                                                                                                                'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
     180                                                                                                                                                                ),
     181                                                                                                                                ) );
     182                                                                break;
     183                                                               
     184                                    case 'disable_copy' :
     185                                                                $component_setting =   array_merge ( $component_setting , array(
     186                                                                                                                                    'label'         =>  __('Disable Copy',    'wp-hide-security-enhancer'),
     187                                                                                                                                    'description'   =>  __('Disable text copy on your pages.', 'wp-hide-security-enhancer'),
     188                                                                                                                                   
     189                                                                                                                                    'help'          =>  array(
     190                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Disable Copy',    'wp-hide-security-enhancer'),
     191                                                                                                                                                                'description'               =>  __("Through this option, the browser copy functionality is disabled.",    'wp-hide-security-enhancer') ,
     192                                                                                                                                                                'option_documentation_url'  =>  'https://wp-hide.com/documentation/user-interactions/'
     193                                                                                                                                                                ),
     194
     195                                                                                                                                    'options'       =>  array(
     196                                                                                                                                                                'no'        =>  __('No',     'wp-hide-security-enhancer'),
     197                                                                                                                                                                'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
     198                                                                                                                                                                ),
     199                                                                                                                                ) );
     200                                                                break;
     201                                   
     202                                    case 'disable_cut' :
     203                                                                $component_setting =   array_merge ( $component_setting , array(
     204                                                                                                                                    'label'         =>  __('Disable Cut',    'wp-hide-security-enhancer'),
     205                                                                                                                                    'description'   =>  __('Disable text cut on your pages.', 'wp-hide-security-enhancer'),
     206                                                                                                                                   
     207                                                                                                                                    'help'          =>  array(
     208                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Disable Cut',    'wp-hide-security-enhancer'),
     209                                                                                                                                                                'description'               =>  __("Through this option, the browser cut functionality is disabled.",    'wp-hide-security-enhancer') ,
     210                                                                                                                                                                'option_documentation_url'  =>  'https://wp-hide.com/documentation/user-interactions/'
     211                                                                                                                                                                ),
     212                                                                                                                                   
     213                                                                                                                                    'options'       =>  array(
     214                                                                                                                                                                'no'        =>  __('No',     'wp-hide-security-enhancer'),
     215                                                                                                                                                                'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
     216                                                                                                                                                                ),
     217                                                                                                                                ) );
     218                                                                break;
     219                                                               
     220                                    case 'disable_paste' :
     221                                                                $component_setting =   array_merge ( $component_setting , array(
     222                                                                                                                                    'label'         =>  __('Disable Paste',    'wp-hide-security-enhancer'),
     223                                                                                                                                    'description'   =>  __('Disable text paste on your pages.', 'wp-hide-security-enhancer'),
     224                                                                                                                                   
     225                                                                                                                                    'help'          =>  array(
     226                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Disable Paste',    'wp-hide-security-enhancer'),
     227                                                                                                                                                                'description'               =>  __("Through this option, the browser paste functionality is disabled.",    'wp-hide-security-enhancer') ,
     228                                                                                                                                                                'option_documentation_url'  =>  'https://wp-hide.com/documentation/user-interactions/'
     229                                                                                                                                                                ),
     230
     231                                                                                                                                    'options'       =>  array(
     232                                                                                                                                                                'no'        =>  __('No',     'wp-hide-security-enhancer'),
     233                                                                                                                                                                'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
     234                                                                                                                                                                ),
     235                                                                                                                                ) );
     236                                                                break;
     237                                   
     238                                    case 'disable_print' :
     239                                                                $component_setting =   array_merge ( $component_setting , array(
     240                                                                                                                                    'label'         =>  __('Disable Print',    'wp-hide-security-enhancer'),
     241                                                                                                                                    'description'   =>  __('Disable Print function on your pages.', 'wp-hide-security-enhancer'),
     242                                                                                                                                   
     243                                                                                                                                    'help'          =>  array(
     244                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Disable Print',    'wp-hide-security-enhancer'),
     245                                                                                                                                                                'description'               =>  __("When using the option, the browser Print dialogue is not available so a site print is disabled.",    'wp-hide-security-enhancer'),
     246                                                                                                                                                                'option_documentation_url'  =>  'https://wp-hide.com/documentation/user-interactions/'
     247                                                                                                                                                                ),
     248
     249                                                                                                                                    'options'       =>  array(
     250                                                                                                                                                                'no'        =>  __('No',     'wp-hide-security-enhancer'),
     251                                                                                                                                                                'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
     252                                                                                                                                                                ),
     253                                                                                                                                ) );
     254                                                                break;
     255                                                               
     256                                    case 'disable_print_screen' :
     257                                                                $component_setting =   array_merge ( $component_setting , array(
     258                                                                                                                                    'label'         =>  __('Disable Print Screen',    'wp-hide-security-enhancer'),
     259                                                                                                                                    'description'   =>  __('Disable Print Screen function on your pages.', 'wp-hide-security-enhancer'),
     260                                                                                                                                   
     261                                                                                                                                    'help'          =>  array(
     262                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Disable Print Screen',    'wp-hide-security-enhancer'),
     263                                                                                                                                                                'description'               =>  __("The Print Screen function captures an image of the entire screen and copies it to the Clipboard in the computer's memory.",    'wp-hide-security-enhancer') .
     264                                                                                                                                                                                                "<br />" . __("If the functionality is not required, the option helps to disable it.",    'wp-hide-security-enhancer'),
     265                                                                                                                                                                'option_documentation_url'  =>  'https://wp-hide.com/documentation/user-interactions/'
     266                                                                                                                                                                ),
     267
     268                                                                                                                                    'options'       =>  array(
     269                                                                                                                                                                'no'        =>  __('No',     'wp-hide-security-enhancer'),
     270                                                                                                                                                                'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
     271                                                                                                                                                                ),
     272                                                                                                                                ) );
     273                                                                break;
     274                                   
     275                                    case 'disable_developer_tools' :
     276                                                                $component_setting =   array_merge ( $component_setting , array(
     277                                                                                                                                    'label'         =>  __('Disable Developer Tools',    'wp-hide-security-enhancer'),
     278                                                                                                                                    'description'   =>  __('Disable the browser Developr Tools on your pages.', 'wp-hide-security-enhancer'),
     279                                                                                                                                   
     280                                                                                                                                    'help'          =>  array(
     281                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Disable Developer Tools',    'wp-hide-security-enhancer'),
     282                                                                                                                                                                'description'               =>  __("Every modern web browser includes a powerful tool called Developer Tools. Through the application, a user can inspect currently-loaded HTML, CSS and JavaScript.",    'wp-hide-security-enhancer') .
     283                                                                                                                                                                                                "<br />" . __("To prevent the user from deeply checking into your site architecture, the browser Inspect can be disabled through this option. ",    'wp-hide-security-enhancer'),
     284                                                                                                                                                                'option_documentation_url'  =>  'https://wp-hide.com/documentation/user-interactions/'
     285                                                                                                                                                                ),
     286
     287                                                                                                                                    'options'       =>  array(
     288                                                                                                                                                                'no'        =>  __('No',     'wp-hide-security-enhancer'),
     289                                                                                                                                                                'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
     290                                                                                                                                                                ),
     291                                                                                                                                ) );
     292                                                                break;
     293                                                               
     294                                    case 'disable_view_source' :
     295                                                                $component_setting =   array_merge ( $component_setting , array(
     296                                                                                                                                    'label'         =>  __('Disable View Source',    'wp-hide-security-enhancer'),
     297                                                                                                                                    'description'   =>  __('Disable the browser view source on your pages.', 'wp-hide-security-enhancer'),
     298                                                                                                                                   
     299                                                                                                                                    'help'          =>  array(
     300                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Disable View Source',    'wp-hide-security-enhancer'),
     301                                                                                                                                                                'description'               =>  __("The page source is an HTML set of tags code. An HTML tag is an element that, along with CSS and JavaScript, tells the Web browser what to do and how to display the text and images.",    'wp-hide-security-enhancer') ,
     302                                                                                                                                                                'option_documentation_url'  =>  'https://wp-hide.com/documentation/user-interactions/'
     303                                                                                                                                                                ),
     304
     305                                                                                                                                    'options'       =>  array(
     306                                                                                                                                                                'no'        =>  __('No',     'wp-hide-security-enhancer'),
     307                                                                                                                                                                'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
     308                                                                                                                                                                ),
     309                                                                                                                                    'default_value' =>  'no',
     310                                                                                                                                ) );
     311                                                                break;
     312                                   
     313                                    case 'disable_drag_drop' :
     314                                                                $component_setting =   array_merge ( $component_setting , array(
     315                                                                                                                                    'label'         =>  __('Disable Drag / Drop',    'wp-hide-security-enhancer'),
     316                                                                                                                                    'description'   =>  __('Disable the browser drag and drop for images on your pages.', 'wp-hide-security-enhancer'),
     317                                                                                                                                   
     318                                                                                                                                    'help'          =>  array(
     319                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Disable Drag / Drop',    'wp-hide-security-enhancer'),
     320                                                                                                                                                                'description'               =>  __("The Drag and Drop operation describes the action o selecting an object or text on the page and moving it to a different area.",    'wp-hide-security-enhancer'),
     321                                                                                                                                                                'option_documentation_url'  =>  'https://wp-hide.com/documentation/user-interactions/'
     322                                                                                                                                                                ),
     323                                                                                                                                   
     324                                                                                                                                    'options'       =>  array(
     325                                                                                                                                                                'no'        =>  __('No',     'wp-hide-security-enhancer'),
     326                                                                                                                                                                'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
     327                                                                                                                                                                ),
     328                                                                                                                                ) );
     329                                                                break;
     330                                }
     331                               
     332                            $component_settings[ $component_key ]   =   $component_setting;
     333                        }
     334                   
     335                    return $component_settings;
     336                   
     337                }
     338               
    251339           
    252340            function _init_disable_mouse_right_click( $saved_field_data )
  • wp-hide-security-enhancer/trunk/modules/components/general-wpemoji.php

    r2984937 r3219455  
    1414                    $this->module_settings[]                  =   array(
    1515                                                                    'id'            =>  'disable_wpemojia',
    16                                                                     'label'         =>  __('Disable Emoji',    'wp-hide-security-enhancer'),
    17                                                                     'description'   =>  __('Disable the Emoji icon library from being loaded.',  'wp-hide-security-enhancer'),
    18                                                                    
    19                                                                     'help'          =>  array(
    20                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Disable Emoji',    'wp-hide-security-enhancer'),
    21                                                                                                 'description'               =>  __("Not everyone use Emoji. Since WordPress load the dependencies as default, it decrease the overall site speed. Disabling this will remove any code and related resources from being loaded on front side.",    'wp-hide-security-enhancer'),
    22                                                                                                 'option_documentation_url'  =>  'https://wp-hide.com/documentation/general-html-emoji/'
    23                                                                                                 ),
    24                                                                    
     16                                                                                                         
    2517                                                                    'input_type'    =>  'radio',
    26                                                                     'options'       =>  array(
    27                                                                                                 'no'        =>  __('No',     'wp-hide-security-enhancer'),
    28                                                                                                 'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
    29                                                                                                 ),
     18                                                           
    3019                                                                    'default_value' =>  'no',
    3120                                                                   
     
    3423                                                                    );
    3524         
    36                   $this->module_settings[]                  =   array(
     25                    $this->module_settings[]                  =   array(
    3726                                                                    'id'            =>  'disable_tinymce_wpemojia',
    38                                                                     'label'         =>  __('Disable TinyMCE Emoji',    'wp-hide-security-enhancer'),
    39                                                                     'description'   =>  __('Disable the TinyMCE Emoji icons library from being loaded into TinyMC.',  'wp-hide-security-enhancer'),
    40                                                                    
    41                                                                     'help'          =>  array(
    42                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Disable TinyMCE Emoji',    'wp-hide-security-enhancer'),
    43                                                                                                 'description'               =>  __("Disable TinyMCE Emoji This is also loaded along the WordPress default TinyMCE editor, but it can be disabled through this option.",    'wp-hide-security-enhancer'),
    44                                                                                                 'option_documentation_url'  =>  'https://wp-hide.com/documentation/general-html-emoji/'
    45                                                                                                 ),
    46                                                                    
    47                                                                    
     27                                     
    4828                                                                    'input_type'    =>  'radio',
    49                                                                     'options'       =>  array(
    50                                                                                                 'no'        =>  __('No',     'wp-hide-security-enhancer'),
    51                                                                                                 'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
    52                                                                                                 ),
     29                                           
    5330                                                                    'default_value' =>  'no',
    5431                                                                   
     
    5633                                                                   
    5734                                                                    );
    58                  
    59                  
     35
     36
    6037                                                                   
    6138                    return $this->module_settings;   
    6239                }
    6340               
    64                
     41           
     42        function set_module_components_description( $component_settings )
     43                {
     44
     45                    foreach ( $component_settings   as  $component_key  =>  $component_setting )
     46                        {
     47                            if ( ! isset ( $component_setting['id'] ) )
     48                                continue;
     49                           
     50                            switch ( $component_setting['id'] )
     51                                {
     52                                    case 'disable_wpemojia' :
     53                                                                $component_setting =   array_merge ( $component_setting , array(
     54                                                                                                                                    'label'         =>  __('Disable Emoji',    'wp-hide-security-enhancer'),
     55                                                                                                                                    'description'   =>  __('Disable the Emoji icon library from being loaded.',  'wp-hide-security-enhancer'),
     56                                                                                                                                   
     57                                                                                                                                    'help'          =>  array(
     58                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Disable Emoji',    'wp-hide-security-enhancer'),
     59                                                                                                                                                                'description'               =>  __("Not everyone use Emoji. Since WordPress load the dependencies as default, it decrease the overall site speed. Disabling this will remove any code and related resources from being loaded on front side.",    'wp-hide-security-enhancer'),
     60                                                                                                                                                                'option_documentation_url'  =>  'https://wp-hide.com/documentation/general-html-emoji/'
     61                                                                                                                                                                ),
     62
     63                                                                                                                                    'options'       =>  array(
     64                                                                                                                                                                'no'        =>  __('No',     'wp-hide-security-enhancer'),
     65                                                                                                                                                                'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
     66                                                                                                                                                                ),
     67                                                                                                                                ) );
     68                                                                break;
     69                                   
     70                                    case 'disable_tinymce_wpemojia' :
     71                                                                $component_setting =   array_merge ( $component_setting , array(
     72                                                                                                                                    'label'         =>  __('Disable TinyMCE Emoji',    'wp-hide-security-enhancer'),
     73                                                                                                                                    'description'   =>  __('Disable the TinyMCE Emoji icons library from being loaded into TinyMC.',  'wp-hide-security-enhancer'),
     74                                                                                                                                   
     75                                                                                                                                    'help'          =>  array(
     76                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Disable TinyMCE Emoji',    'wp-hide-security-enhancer'),
     77                                                                                                                                                                'description'               =>  __("Disable TinyMCE Emoji This is also loaded along the WordPress default TinyMCE editor, but it can be disabled through this option.",    'wp-hide-security-enhancer'),
     78                                                                                                                                                                'option_documentation_url'  =>  'https://wp-hide.com/documentation/general-html-emoji/'
     79                                                                                                                                                                ),
     80
     81                                                                                                                                    'options'       =>  array(
     82                                                                                                                                                                'no'        =>  __('No',     'wp-hide-security-enhancer'),
     83                                                                                                                                                                'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
     84                                                                                                                                                                ),
     85                                                                                                                                ) );
     86                                                                break;                 
     87                                }
     88                               
     89                            $component_settings[ $component_key ]   =   $component_setting;
     90                        }
     91                   
     92                    return $component_settings;
     93                   
     94                }   
    6595               
    6696            function _init_disable_wpemojia($saved_field_data)
  • wp-hide-security-enhancer/trunk/modules/components/login_captcha.php

    r3000252 r3219455  
    7070                    $this->module_settings[]                  =   array(
    7171                                                                    'id'            =>  'captcha_type',
    72                                                                     'label'         =>  __('Captcha Type',    'wp-hide-security-enhancer'),
    73                                                                     'description'   =>  array(
    74                                                                                                 __('Select the required CAPTCHA type to protect the Login, Registration page, Password Forget etc.',  'wp-hide-security-enhancer')
    75                                                                                                 ),
    76                                                                    
    77                                                                     'help'          =>  array(
    78                                                                                                         'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Captcha Type',    'wp-hide-security-enhancer'),
    79                                                                                                         'description'               =>  __('CAPTCHA, short for "Completely Automated Public Turing test to tell Computers and Humans Apart," is a critical cybersecurity tool. It distinguishes human users from automated bots by presenting challenges like distorted characters or image recognition tasks. CAPTCHA safeguards websites, login pages, and online services from unwanted intrusion, spam, and fraud. Its evolution includes advanced variants and innovations like reCAPTCHA, continually enhancing digital security.',  'wp-hide-security-enhancer') . "<br />" .
    80                                                                                                                                         __('While it\'s a robust defense, adversaries are adapting, making CAPTCHA\'s ongoing development crucial in the fight against online threats.',  'wp-hide-security-enhancer') ,
    81                                                                                                         'option_documentation_url'  =>  'https://wp-hide.com/documentation/general-emulate-cms/'
    82                                                                                                         ),
    83                                                                    
     72                                                                                                                                       
    8473                                                                    'interface_help_split'  =>  FALSE,
    8574                                                                   
     
    9382                    return $this->module_settings;   
    9483                }
    95                
    96                
     84           
     85               
     86            function set_module_components_description( $component_settings )
     87                {
     88
     89                    foreach ( $component_settings   as  $component_key  =>  $component_setting )
     90                        {
     91                            if ( ! isset ( $component_setting['id'] ) )
     92                                continue;
     93                           
     94                            switch ( $component_setting['id'] )
     95                                {
     96                                    case 'captcha_type' :
     97                                                                $component_setting =   array_merge ( $component_setting , array(
     98                                                                                                                                    'label'         =>  __('Captcha Type',    'wp-hide-security-enhancer'),
     99                                                                                                                                    'description'   =>  array(
     100                                                                                                                                                                __('Select the required CAPTCHA type to protect the Login, Registration page, Password Forget etc.',  'wp-hide-security-enhancer')
     101                                                                                                                                                                ),
     102                                                                                                                                   
     103                                                                                                                                    'help'          =>  array(
     104                                                                                                                                                                        'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Captcha Type',    'wp-hide-security-enhancer'),
     105                                                                                                                                                                        'description'               =>  __('CAPTCHA, short for "Completely Automated Public Turing test to tell Computers and Humans Apart," is a critical cybersecurity tool. It distinguishes human users from automated bots by presenting challenges like distorted characters or image recognition tasks. CAPTCHA safeguards websites, login pages, and online services from unwanted intrusion, spam, and fraud. Its evolution includes advanced variants and innovations like reCAPTCHA, continually enhancing digital security.',  'wp-hide-security-enhancer') . "<br />" .
     106                                                                                                                                                                                                        __('While it\'s a robust defense, adversaries are adapting, making CAPTCHA\'s ongoing development crucial in the fight against online threats.',  'wp-hide-security-enhancer') ,
     107                                                                                                                                                                        'option_documentation_url'  =>  'https://wp-hide.com/documentation/general-emulate-cms/'
     108                                                                                                                                                                        ),
     109                                                                                                                                ) );
     110                                                                break;
     111                                                     
     112                                }
     113                               
     114                            $component_settings[ $component_key ]   =   $component_setting;
     115                        }
     116                   
     117                    return $component_settings;
     118                   
     119                }
     120                   
    97121               
    98122            function _init_captcha_type ( $saved_field_data )
  • wp-hide-security-enhancer/trunk/modules/components/rewrite-author.php

    r2632106 r3219455  
    1515                    $this->module_settings[]                  =   array(
    1616                                                                        'id'            =>  'author',
    17                                                                         'label'         =>  __('New Author Path',    'wp-hide-security-enhancer'),
    18                                                                         'description'   =>  __('The default path is set to /author/',    'wp-hide-security-enhancer'),
    19                                                                        
    20                                                                         'help'          =>  array(
    21                                                                                                         'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('New Author Path',    'wp-hide-security-enhancer'),
    22                                                                                                         'description'               =>  __("An author URL display all posts associated to a particular author. The default URL format is:",    'wp-hide-security-enhancer') ."<br />  <br />
    23                                                                                                                                             <code>https://-domain-name-/author/author-name/</code>
    24                                                                                                                                             <br /><br /> " . __("By using a value of 'contributor' this become:",    'wp-hide-security-enhancer') ."<br />
    25                                                                                                                                             <code>https://-domain-name-/contributor/author-name/</code>",
    26                                                                                                         'option_documentation_url'  =>  'https://wp-hide.com/documentation/rewrite-author/',
    27                                                                                                         ),
    28                                                                        
     17                                                                                                                                 
    2918                                                                        'value_description' =>  'e.g. contributor',
    3019                                                                        'input_type'    =>  'text',
     
    3625                    $this->module_settings[]                  =   array(
    3726                                                                        'id'            =>  'author_block_default',
    38                                                                         'label'         =>  __('Block default',    'wp-hide-security-enhancer'),
    39                                                                         'description'   =>  __('Block default /author/ when using custom one.',    'wp-hide-security-enhancer') . '<br />'.__('Apply only if ',    'wp-hide-security-enhancer') . '<b>New Author Path</b> ' . __('is not empty.',    'wp-hide-security-enhancer'),
    40                                                                        
    41                                                                         'help'          =>  array(
    42                                                                                                         'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Block default',    'wp-hide-security-enhancer'),
    43                                                                                                         'description'               =>  __("After changing the default author, the old url is still accessible, this provide a way to block it.<br />The functionality apply only if <b>New Author Path</b> option is filled in.",    'wp-hide-security-enhancer'),
    44                                                                                                         'option_documentation_url'  =>  'https://wp-hide.com/documentation/rewrite-author/'
    45                                                                                                         ),
    46                                                                        
     27                                                 
    4728                                                                        'input_type'    =>  'radio',
    48                                                                         'options'       =>  array(
    49                                                                                                     'no'        =>  __('No',     'wp-hide-security-enhancer'),
    50                                                                                                     'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
    51                                                                                                     ),
     29                                                             
    5230                                                                        'default_value' =>  'no',
    5331                                                                       
     
    6139               
    6240           
    63            
     41        function set_module_components_description( $component_settings )
     42                {
     43
     44                    foreach ( $component_settings   as  $component_key  =>  $component_setting )
     45                        {
     46                            if ( ! isset ( $component_setting['id'] ) )
     47                                continue;
     48                           
     49                            switch ( $component_setting['id'] )
     50                                {
     51                                    case 'author' :
     52                                                                $component_setting =   array_merge ( $component_setting , array(
     53                                                                                                                                    'label'         =>  __('New Author Path',    'wp-hide-security-enhancer'),
     54                                                                                                                                    'description'   =>  __('The default path is set to /author/',    'wp-hide-security-enhancer'),
     55                                                                                                                                   
     56                                                                                                                                    'help'          =>  array(
     57                                                                                                                                                                    'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('New Author Path',    'wp-hide-security-enhancer'),
     58                                                                                                                                                                    'description'               =>  __("An author URL display all posts associated to a particular author. The default URL format is:",    'wp-hide-security-enhancer') ."<br />  <br />
     59                                                                                                                                                                                                        <code>https://-domain-name-/author/author-name/</code>
     60                                                                                                                                                                                                        <br /><br /> " . __("By using a value of 'contributor' this become:",    'wp-hide-security-enhancer') ."<br />
     61                                                                                                                                                                                                        <code>https://-domain-name-/contributor/author-name/</code>",
     62                                                                                                                                                                    'option_documentation_url'  =>  'https://wp-hide.com/documentation/rewrite-author/',
     63                                                                                                                                                                    ),
     64                                                                                                                                ) );
     65                                                                break;
     66                                                               
     67                                                               
     68                                    case 'author_block_default' :
     69                                                                $component_setting =   array_merge ( $component_setting , array(
     70                                                                                                                                    'label'         =>  __('Block default',    'wp-hide-security-enhancer'),
     71                                                                                                                                    'description'   =>  __('Block default /author/ when using custom one.',    'wp-hide-security-enhancer') . '<br />'.__('Apply only if ',    'wp-hide-security-enhancer') . '<b>New Author Path</b> ' . __('is not empty.',    'wp-hide-security-enhancer'),
     72                                                                                                                                   
     73                                                                                                                                    'help'          =>  array(
     74                                                                                                                                                                    'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Block default',    'wp-hide-security-enhancer'),
     75                                                                                                                                                                    'description'               =>  __("After changing the default author, the old url is still accessible, this provide a way to block it.<br />The functionality apply only if <b>New Author Path</b> option is filled in.",    'wp-hide-security-enhancer'),
     76                                                                                                                                                                    'option_documentation_url'  =>  'https://wp-hide.com/documentation/rewrite-author/'
     77                                                                                                                                                                    ),
     78
     79                                                                                                                                    'options'       =>  array(
     80                                                                                                                                                                'no'        =>  __('No',     'wp-hide-security-enhancer'),
     81                                                                                                                                                                'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
     82                                                                                                                                                                ),
     83                                                                                                                                ) );
     84                                                                break;
     85                                                     
     86                                }
     87                               
     88                            $component_settings[ $component_key ]   =   $component_setting;
     89                        }
     90                   
     91                    return $component_settings;
     92                   
     93                }
     94               
     95               
    6496            function _init_author( $saved_field_data )
    6597                {
  • wp-hide-security-enhancer/trunk/modules/components/rewrite-comments.php

    r2632106 r3219455  
    1515                    $this->module_settings[]                  =   array(
    1616                                                                        'id'            =>  'new_wp_comments_post',
    17                                                                         'label'         =>  __('New wp-comments-post.php',    'wp-hide-security-enhancer'),
    18                                                                         'description'   =>  __('The default path is set to wp-comments-post.php',    'wp-hide-security-enhancer'),
    19                                                                        
    20                                                                         'help'          =>  array(
    21                                                                                                         'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('New wp-comments-post.php',    'wp-hide-security-enhancer'),
    22                                                                                                         'description'               =>  __("As default the form data is being sent and processed at:",    'wp-hide-security-enhancer') ." <br />  <br />
    23                                                                                                                                             <code>https://-domain-name-/wp-comments-post.php</code>
    24                                                                                                                                             <br /><br /> " . __("This makes it easy to recognise as WordPress form. Boots always search for such file ( wp-comments-post.php ) and automatically submit spam messages.",    'wp-hide-security-enhancer') .
    25                                                                                                                                             __("Though this option a new file slug can replace the default.",    'wp-hide-security-enhancer'),
    26                                                                                                         'option_documentation_url'  =>  'https://wp-hide.com/documentation/rewrite-comments/',
    27                                                                                                         'input_value_extension'     =>  'php'
    28                                                                                                         ),
    29                                                                        
     17                                                                                                                                               
    3018                                                                        'value_description' =>  'e.g. user-input.php',
    3119                                                                        'input_type'    =>  'text',
     
    3725                    $this->module_settings[]                  =   array(
    3826                                                                        'id'            =>  'block_wp_comments_post_url',
    39                                                                         'label'         =>  __('Block wp-comments-post.php',    'wp-hide-security-enhancer'),
    40                                                                         'description'   =>  __('Block default wp-comments-post.php.',    'wp-hide-security-enhancer'),
    41                                                                        
    42                                                                         'help'          =>  array(
    43                                                                                                         'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Block wp-comments-post.php',    'wp-hide-security-enhancer'),
    44                                                                                                         'description'               =>  __("After changing the default wp-comments-post.php, the old url is still accessible, this provide a way to block the old.<br />The functionality apply only if <b>New wp-comments-post.php</b> option is filled in.",    'wp-hide-security-enhancer'),
    45                                                                                                         'option_documentation_url'  =>  'https://wp-hide.com/documentation/rewrite-comments/'
    46                                                                                                         ),
    47                                                                                                                            
     27                                                                 
    4828                                                                        'input_type'    =>  'radio',
    49                                                                         'options'       =>  array(
    50                                                                                                     'no'        =>  __('No',     'wp-hide-security-enhancer'),
    51                                                                                                     'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
    52                                                                                                     ),
     29                                                   
    5330                                                                        'default_value' =>  'no',
    5431                                                                       
     
    6340               
    6441           
     42        function set_module_components_description( $component_settings )
     43                {
     44
     45                    foreach ( $component_settings   as  $component_key  =>  $component_setting )
     46                        {
     47                            if ( ! isset ( $component_setting['id'] ) )
     48                                continue;
     49                           
     50                            switch ( $component_setting['id'] )
     51                                {
     52                                    case 'new_wp_comments_post' :
     53                                                                $component_setting =   array_merge ( $component_setting , array(
     54                                                                                                                                    'label'         =>  __('New wp-comments-post.php',    'wp-hide-security-enhancer'),
     55                                                                                                                                    'description'   =>  __('The default path is set to wp-comments-post.php',    'wp-hide-security-enhancer'),
     56                                                                                                                                   
     57                                                                                                                                    'help'          =>  array(
     58                                                                                                                                                                    'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('New wp-comments-post.php',    'wp-hide-security-enhancer'),
     59                                                                                                                                                                    'description'               =>  __("As default the form data is being sent and processed at:",    'wp-hide-security-enhancer') ." <br />  <br />
     60                                                                                                                                                                                                        <code>https://-domain-name-/wp-comments-post.php</code>
     61                                                                                                                                                                                                        <br /><br /> " . __("This makes it easy to recognise as WordPress form. Boots always search for such file ( wp-comments-post.php ) and automatically submit spam messages.",    'wp-hide-security-enhancer') .
     62                                                                                                                                                                                                        __("Though this option a new file slug can replace the default.",    'wp-hide-security-enhancer'),
     63                                                                                                                                                                    'option_documentation_url'  =>  'https://wp-hide.com/documentation/rewrite-comments/',
     64                                                                                                                                                                    'input_value_extension'     =>  'php'
     65                                                                                                                                                                    ),
     66                                                                                                                                ) );
     67                                                                break;
     68                                                               
     69                                    case 'block_wp_comments_post_url' :
     70                                                                $component_setting =   array_merge ( $component_setting , array(
     71                                                                                                                                    'label'         =>  __('Block wp-comments-post.php',    'wp-hide-security-enhancer'),
     72                                                                                                                                    'description'   =>  __('Block default wp-comments-post.php.',    'wp-hide-security-enhancer'),
     73                                                                                                                                   
     74                                                                                                                                    'help'          =>  array(
     75                                                                                                                                                                    'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Block wp-comments-post.php',    'wp-hide-security-enhancer'),
     76                                                                                                                                                                    'description'               =>  __("After changing the default wp-comments-post.php, the old url is still accessible, this provide a way to block the old.<br />The functionality apply only if <b>New wp-comments-post.php</b> option is filled in.",    'wp-hide-security-enhancer'),
     77                                                                                                                                                                    'option_documentation_url'  =>  'https://wp-hide.com/documentation/rewrite-comments/'
     78                                                                                                                                                                    ),
     79
     80                                                                                                                                    'options'       =>  array(
     81                                                                                                                                                                'no'        =>  __('No',     'wp-hide-security-enhancer'),
     82                                                                                                                                                                'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
     83                                                                                                                                                                ),
     84                                                                                                                                ) );
     85                                                                break;
     86                                                     
     87                                }
     88                               
     89                            $component_settings[ $component_key ]   =   $component_setting;
     90                        }
     91                   
     92                    return $component_settings;
     93                   
     94                }
    6595           
    6696            function _init_new_wp_comments_post($saved_field_data)
  • wp-hide-security-enhancer/trunk/modules/components/rewrite-new_plugin_path.php

    r3209226 r3219455  
    125125                                                                break;
    126126                                                               
     127                                                               
    127128                                    case preg_match('/^new_plugin_path_[\w-]+$/', $component_setting['id'] ) === 1 :
    128129                                   
    129                                                                 $all_plugins = $this->wph->functions->get_plugins();
    130                    
    131                                                                 //get active plugins
     130                                   
     131                                                                 //get active plugins
    132132                                                                $active_plugins = (array) get_option( 'active_plugins', array() );
    133133                                                                foreach( $active_plugins as  $active_plugin )
     
    163163                                                                                                                   
    164164                                                                    }
    165                                                                
    166165                                   
    167166                                                                break;
     167                                                               
    168168                                }
    169169
  • wp-hide-security-enhancer/trunk/modules/components/security-add_headers.php

    r2709073 r3219455  
    1515                    $this->module_settings[]                  =   array(
    1616                                                                    'id'            =>  'remove_header_link',
    17                                                                     'label'         =>  __('Remove Link Header',    'wp-hide-security-enhancer'),
    18                                                                     'description'   =>  __('Remove Link Header being set as default by WordPress which outputs the site JSON url.', 'wp-hide-security-enhancer'),
    19                                                                    
    20                                                                     'help'          =>  array(
    21                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove Version',    'wp-hide-security-enhancer'),
    22                                                                                                 'description'               =>  __("HTTP header fields are components of the header section of a request and response messages in the Hypertext Transfer Protocol (HTTP). They define the operating parameters of an HTTP transaction.",    'wp-hide-security-enhancer') .
    23                                                                                                                                     "<br /><br />" . __("Sample header:",    'wp-hide-security-enhancer') .
    24                                                                                                                                     "<br /><code>Link: &lt;http://-domain-name-/wp-json/&gt;; rel=&quot;https://api.w.org/&quot;</code>",
    25                                                                                                 'option_documentation_url'  =>  'https://wp-hide.com/documentation/request-headers/'
    26                                                                                                 ),
    27                                                                    
     17                                                                                                                   
    2818                                                                    'input_type'    =>  'radio',
    29                                                                     'options'       =>  array(
    30                                                                                                 'no'        =>  __('No',     'wp-hide-security-enhancer'),
    31                                                                                                 'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
    32                                                                                                 ),
     19                                                 
    3320                                                                    'default_value' =>  'no',
    3421                                                                   
     
    4027                    $this->module_settings[]                  =   array(
    4128                                                                    'id'            =>  'remove_x_powered_by',
    42                                                                     'label'         =>  __('Remove X-Powered-By Header',    'wp-hide-security-enhancer'),
    43                                                                     'description'   =>  __('Remove X-Powered-By Header if being set.', 'wp-hide-security-enhancer'),
    44                                                                    
    45                                                                     'help'          =>  array(
    46                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove X-Powered-By Header',    'wp-hide-security-enhancer'),
    47                                                                                                 'description'               =>  __("Sample header:",    'wp-hide-security-enhancer') .
    48                                                                                                                                     "<br /><code>x-powered-by: 'W3 Total Cache/0.9.5'</code>",
    49                                                                                                 'option_documentation_url'  =>  'https://wp-hide.com/documentation/request-headers/'
    50                                                                                                 ),
    51                                                                    
     29                                                                                                             
    5230                                                                    'input_type'    =>  'radio',
    53                                                                     'options'       =>  array(
    54                                                                                                 'no'        =>  __('No',     'wp-hide-security-enhancer'),
    55                                                                                                 'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
    56                                                                                                 ),
     31                                                 
    5732                                                                    'default_value' =>  'no',
    5833                                                                   
     
    6338                    $this->module_settings[]                  =   array(
    6439                                                                    'id'            =>  'remove_x_pingback',
    65                                                                     'label'         =>  __('Remove X-Pingback Header',    'wp-hide-security-enhancer'),
    66                                                                     'description'   =>  __('Remove X-Pingback Header if being set.', 'wp-hide-security-enhancer'),
    67                                                                    
    68                                                                     'help'          =>  array(
    69                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove X-Pingback Header',    'wp-hide-security-enhancer'),
    70                                                                                                 'description'               =>  __("Pingback is one of four types of linkback methods for Web authors to request notification when somebody links to one of their documents. This enables authors to keep track of who is linking to, or referring to their articles. Pingback-enabled resources must either use an X-Pingback header or contain a element to the XML-RPC script.",    'wp-hide-security-enhancer'),
    71                                                                                                 'option_documentation_url'  =>  'https://wp-hide.com/documentation/request-headers/'
    72                                                                                                 ),
    7340                                                                   
    7441                                                                    'input_type'    =>  'radio',
    75                                                                     'options'       =>  array(
    76                                                                                                 'no'        =>  __('No',     'wp-hide-security-enhancer'),
    77                                                                                                 'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
    78                                                                                                 ),
     42                                                         
    7943                                                                    'default_value' =>  'no',
    8044                                                                   
     
    8751                }
    8852               
    89            
     53
     54            function set_module_components_description( $component_settings )
     55                {
     56
     57                    foreach ( $component_settings   as  $component_key  =>  $component_setting )
     58                        {
     59                            if ( ! isset ( $component_setting['id'] ) )
     60                                continue;
     61                           
     62                            switch ( $component_setting['id'] )
     63                                {
     64                                    case 'remove_header_link' :
     65                                                                $component_setting =   array_merge ( $component_setting , array(
     66                                                                                                                                    'label'         =>  __('Remove Link Header',    'wp-hide-security-enhancer'),
     67                                                                                                                                    'description'   =>  __('Remove Link Header being set as default by WordPress which outputs the site JSON url.', 'wp-hide-security-enhancer'),
     68                                                                                                                                   
     69                                                                                                                                    'help'          =>  array(
     70                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove Version',    'wp-hide-security-enhancer'),
     71                                                                                                                                                                'description'               =>  __("HTTP header fields are components of the header section of a request and response messages in the Hypertext Transfer Protocol (HTTP). They define the operating parameters of an HTTP transaction.",    'wp-hide-security-enhancer') .
     72                                                                                                                                                                                                    "<br /><br />" . __("Sample header:",    'wp-hide-security-enhancer') .
     73                                                                                                                                                                                                    "<br /><code>Link: &lt;http://-domain-name-/wp-json/&gt;; rel=&quot;https://api.w.org/&quot;</code>",
     74                                                                                                                                                                'option_documentation_url'  =>  'https://wp-hide.com/documentation/request-headers/'
     75                                                                                                                                                                ),
     76                                                                                                                                   
     77                                                                                                                                    'options'       =>  array(
     78                                                                                                                                                                'no'        =>  __('No',     'wp-hide-security-enhancer'),
     79                                                                                                                                                                'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
     80                                                                                                                                                                ),
     81                                                                                                                                ) );
     82                                                                break;
     83                                                               
     84                                    case 'remove_x_powered_by' :
     85                                                                $component_setting =   array_merge ( $component_setting , array(
     86                                                                                                                                    'label'         =>  __('Remove X-Powered-By Header',    'wp-hide-security-enhancer'),
     87                                                                                                                                    'description'   =>  __('Remove X-Powered-By Header if being set.', 'wp-hide-security-enhancer'),
     88                                                                                                                                   
     89                                                                                                                                    'help'          =>  array(
     90                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove X-Powered-By Header',    'wp-hide-security-enhancer'),
     91                                                                                                                                                                'description'               =>  __("Sample header:",    'wp-hide-security-enhancer') .
     92                                                                                                                                                                                                    "<br /><code>x-powered-by: 'W3 Total Cache/0.9.5'</code>",
     93                                                                                                                                                                'option_documentation_url'  =>  'https://wp-hide.com/documentation/request-headers/'
     94                                                                                                                                                                ),
     95
     96                                                                                                                                    'options'       =>  array(
     97                                                                                                                                                                'no'        =>  __('No',     'wp-hide-security-enhancer'),
     98                                                                                                                                                                'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
     99                                                                                                                                                                ),
     100                                                                                                                                ) );
     101                                                                break;
     102                                                               
     103                                    case 'remove_x_pingback' :
     104                                                                $component_setting =   array_merge ( $component_setting , array(
     105                                                                                                                                    'label'         =>  __('Remove X-Pingback Header',    'wp-hide-security-enhancer'),
     106                                                                                                                                    'description'   =>  __('Remove X-Pingback Header if being set.', 'wp-hide-security-enhancer'),
     107                                                                                                                                   
     108                                                                                                                                    'help'          =>  array(
     109                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Remove X-Pingback Header',    'wp-hide-security-enhancer'),
     110                                                                                                                                                                'description'               =>  __("Pingback is one of four types of linkback methods for Web authors to request notification when somebody links to one of their documents. This enables authors to keep track of who is linking to, or referring to their articles. Pingback-enabled resources must either use an X-Pingback header or contain a element to the XML-RPC script.",    'wp-hide-security-enhancer'),
     111                                                                                                                                                                'option_documentation_url'  =>  'https://wp-hide.com/documentation/request-headers/'
     112                                                                                                                                                                ),
     113
     114                                                                                                                                    'options'       =>  array(
     115                                                                                                                                                                'no'        =>  __('No',     'wp-hide-security-enhancer'),
     116                                                                                                                                                                'yes'       =>  __('Yes',    'wp-hide-security-enhancer'),
     117                                                                                                                                                                ),
     118                                                                                                                                ) );
     119                                                                break;
     120                                                     
     121                                }
     122                               
     123                            $component_settings[ $component_key ]   =   $component_setting;
     124                        }
     125                   
     126                    return $component_settings;
     127                   
     128                }
     129               
     130               
    90131            function _init_remove_header_link( $saved_field_data )
    91132                {
  • wp-hide-security-enhancer/trunk/modules/components/security-check_headers.php

    r2950174 r3219455  
    88            public $headers = array ();
    99           
     10            function init()
     11                {
     12                    add_action('init', array ( $this, 'set_headers' ) );
     13                }
     14           
    1015            function get_component_title()
    1116                {
     
    1520            function get_module_settings()
    1621                {
    17                    
    18                     $this->_set_headers();
    19                    
     22                                       
    2023                    $this->module_settings[]                  =   array(
    2124                                                                    'id'            =>  'check_headers',
    22                                                                     'label'         =>  __('Check Headers',    'wp-hide-security-enhancer'),
    23                                                                    
    24                                                                     'help'          =>  array(
    25                                                                                                 'description'               =>  '<h4 class="important">'. __("HTTP Response Headers are a powerful tool to Harden Your Website.<br />Misusing the headers, can easily break the site layout and functionality. Ensure you understand the proper usage for each option before configuring. Once the Headers setup completed, a thorough check for the front side is recommended.",    'wp-hide-security-enhancer') . '</h4>' .
    26                                                                                                                                
    27                                                                                                                                 "<div class='help-section'><h4>" . __( "Recovery", 'wp-hide-security-enhancer' ) . '</h4>' .
    28                                                                                                                                 '<p class="important"><span class="dashicons dashicons-warning important" alt="f534"></span> ' . __('Copy the following link to a safe place. You can use it to reset the header options if something goes wrong:',    'wp-hide-security-enhancer') . '</p><p> <b><span id="wph-recovery-link" onClick="WPH.selectText( \'wph-recovery-link\' )">' . trailingslashit ( home_url() ) . '?wph-recovery=' . $this->wph->functions->get_recovery_code() .'&reset_headers=1&rand=' . rand( 10000,9999999) .'</span></b></p></div>' .   
    29                                                                                                                                
    30                                                                                                                                 "<div class='help-section'><h4>" . __( "Sample Setup", 'wp-hide-security-enhancer' ) . '</h4>' .
    31                                                                                                                                 '<p>' . __('Create a sample setup for Headers. That will overwrite any Headers settings previously created through the plugin options. The sample setup creates a basic Headers implementation that is commonly safe on any site. For better performances, further manual adjustments are necesarelly.',    'wp-hide-security-enhancer') .'</p><p><input type="hidden" name="wph-headers-sample-setup" value="true" /><input type="button" class="button-secondary" value="' . __('Create Sample Setup',    'wp-hide-security-enhancer') .'" onclick="WPH.runSampleHeaders();"></p></div>' .
    32                                                                                                                                
    33                                                                                                                                 "<br /><br />" .__("The Hypertext Transfer Protocol (HTTP) is based on a client-server architecture, in which the client ( typically a web browser application ) establishes a connection with the server through a destination URL and waits for a response.",    'wp-hide-security-enhancer') .
    34                                                                                                                                 "<br /><br />" .__("The HTTP Headers allow the client and the server send additional pieces of information with the HTTP request or response.",    'wp-hide-security-enhancer') .
    35                                                                                                                                 "<br /><br />" .__("The HTTP Headers are categorised by their purpose: Authentication, Caching, Client hints, Conditionals, Connection management, Content negotiation, Controls, Cookies, CORS, Downloads, Message body information, Proxies, Redirects, Request context, Response context, Range requests, <b>Security</b>, Server-sent events, Transfer coding, WebSockets, Other",    'wp-hide-security-enhancer') .
    36                                                                                                                                 "<br /><br />" . __("This area provides support for the <b>",    'wp-hide-security-enhancer').  '<a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers#security" target="_blank">Security Headers</b></a>' . __(" type. Those are the ones responsible for the security implementation for any page.",    'wp-hide-security-enhancer') ,
    37                                                                                                 'option_documentation_url'  =>  'https://wp-hide.com/harden-your-website-using-security-headers/'
    38                                                                                                 ),
    39                                                                    
     25                                                                                                                                       
    4026                                                                    'interface_help_split'  =>  FALSE,
    4127                                                                   
     
    5642               
    5743           
    58             private function _set_headers()
     44            function set_headers()
    5945                {
    6046                    $this->headers['cross-origin-embedder-policy']    =   array (
     
    136122                                                                                'availability'  =>  'all'
    137123                                                                                );
     124                }
     125               
     126               
     127            function set_module_components_description( $component_settings )
     128                {
     129
     130                    foreach ( $component_settings   as  $component_key  =>  $component_setting )
     131                        {
     132                            if ( ! isset ( $component_setting['id'] ) )
     133                                continue;
     134                           
     135                            switch ( $component_setting['id'] )
     136                                {
     137                                    case 'check_headers' :
     138                                                                $component_setting =   array_merge ( $component_setting , array(
     139                                                                                                                                    'label'         =>  __('Check Headers',    'wp-hide-security-enhancer'),
     140                                                                   
     141                                                                                                                                    'help'          =>  array(
     142                                                                                                                                                                'description'               =>  '<h4 class="important">'. __("HTTP Response Headers are a powerful tool to Harden Your Website.<br />Misusing the headers, can easily break the site layout and functionality. Ensure you understand the proper usage for each option before configuring. Once the Headers setup completed, a thorough check for the front side is recommended.",    'wp-hide-security-enhancer') . '</h4>' .
     143                                                                                                                                                                                               
     144                                                                                                                                                                                                "<div class='help-section'><h4>" . __( "Recovery", 'wp-hide-security-enhancer' ) . '</h4>' .
     145                                                                                                                                                                                                '<p class="important"><span class="dashicons dashicons-warning important" alt="f534"></span> ' . __('Copy the following link to a safe place. You can use it to reset the header options if something goes wrong:',    'wp-hide-security-enhancer') . '</p><p> <b><span id="wph-recovery-link" onClick="WPH.selectText( \'wph-recovery-link\' )">' . trailingslashit ( home_url() ) . '?wph-recovery=' . $this->wph->functions->get_recovery_code() .'&reset_headers=1&rand=' . rand( 10000,9999999) .'</span></b></p></div>' .   
     146                                                                                                                                                                                               
     147                                                                                                                                                                                                "<div class='help-section'><h4>" . __( "Sample Setup", 'wp-hide-security-enhancer' ) . '</h4>' .
     148                                                                                                                                                                                                '<p>' . __('Create a sample setup for Headers. That will overwrite any Headers settings previously created through the plugin options. The sample setup creates a basic Headers implementation that is commonly safe on any site. For better performances, further manual adjustments are necesarelly.',    'wp-hide-security-enhancer') .'</p><p><input type="hidden" name="wph-headers-sample-setup" value="true" /><input type="button" class="button-secondary" value="' . __('Create Sample Setup',    'wp-hide-security-enhancer') .'" onclick="WPH.runSampleHeaders();"></p></div>' .
     149                                                                                                                                                                                               
     150                                                                                                                                                                                                "<br /><br />" .__("The Hypertext Transfer Protocol (HTTP) is based on a client-server architecture, in which the client ( typically a web browser application ) establishes a connection with the server through a destination URL and waits for a response.",    'wp-hide-security-enhancer') .
     151                                                                                                                                                                                                "<br /><br />" .__("The HTTP Headers allow the client and the server send additional pieces of information with the HTTP request or response.",    'wp-hide-security-enhancer') .
     152                                                                                                                                                                                                "<br /><br />" .__("The HTTP Headers are categorised by their purpose: Authentication, Caching, Client hints, Conditionals, Connection management, Content negotiation, Controls, Cookies, CORS, Downloads, Message body information, Proxies, Redirects, Request context, Response context, Range requests, <b>Security</b>, Server-sent events, Transfer coding, WebSockets, Other",    'wp-hide-security-enhancer') .
     153                                                                                                                                                                                                "<br /><br />" . __("This area provides support for the <b>",    'wp-hide-security-enhancer').  '<a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers#security" target="_blank">Security Headers</b></a>' . __(" type. Those are the ones responsible for the security implementation for any page.",    'wp-hide-security-enhancer') ,
     154                                                                                                                                                                'option_documentation_url'  =>  'https://wp-hide.com/harden-your-website-using-security-headers/'
     155                                                                                                                                                                ),
     156                                                                                                                                ) );
     157                                                                break;
     158                                   
     159                                                     
     160                                }
     161                               
     162                            $component_settings[ $component_key ]   =   $component_setting;
     163                        }
     164                   
     165                    return $component_settings;
     166                   
    138167                }
    139168           
  • wp-hide-security-enhancer/trunk/modules/components/security-header-cross-origin-embedder-policy.php

    r2761844 r3219455  
    1818                    $this->module_settings[]                  =   array(
    1919                                                                    'id'            =>  'cross_origin_embedder_policy',
    20                                                                     'label'         =>  __('Cross-Origin-Embedder-Policy (COEP)',    'wp-hide-security-enhancer'),
    21                                                                    
    22                                                                     'help'          =>  array(
    23                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Cross-Origin-Embedder-Policy',    'wp-hide-security-enhancer'),
    24                                                                                                 'description'               =>  __("The HTTP Cross-Origin-Embedder-Policy (COEP) response header prevents a document from loading any cross-origin resources that don't explicitly grant the document permission (using CORP or CORS).",    'wp-hide-security-enhancer') .
    25                                                                                                                                 "<br /><br />"  . __("Options:",    'wp-hide-security-enhancer') .
    26                                                                                                                                 "<br /><b>unsafe-none</b> - "  . __("This is the default value. Allows the document to fetch cross-origin resources without giving explicit permission through the CORS protocol or the Cross-Origin-Resource-Policy header.",    'wp-hide-security-enhancer') .
    27                                                                                                                                 "<br /><b>require-corp</b> - "  . __("A document can only load resources from the same origin, or resources explicitly marked as loadable from another origin. If a cross origin resource supports CORS, the crossorigin attribute or the Cross-Origin-Resource-Policy header must be used to load it without being blocked by COEP.",    'wp-hide-security-enhancer') ,
    28                                                                                                 'option_documentation_url'  =>  'https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Embedder-Policy'
    29                                                                                                 ),
    30                                        
     20                                                                                                           
    3121                                                                    'input_type'    =>  'custom',
    3222                                                                                                 
     
    3929                    return $this->module_settings;
    4030   
     31                }
     32           
     33        function set_module_components_description( $component_settings )
     34                {
     35
     36                    foreach ( $component_settings   as  $component_key  =>  $component_setting )
     37                        {
     38                            if ( ! isset ( $component_setting['id'] ) )
     39                                continue;
     40                           
     41                            switch ( $component_setting['id'] )
     42                                {
     43                                    case 'cross_origin_embedder_policy' :
     44                                                                $component_setting =   array_merge ( $component_setting , array(
     45                                                                                                                                    'label'         =>  __('Cross-Origin-Embedder-Policy (COEP)',    'wp-hide-security-enhancer'),
     46                                                                   
     47                                                                                                                                    'help'          =>  array(
     48                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Cross-Origin-Embedder-Policy',    'wp-hide-security-enhancer'),
     49                                                                                                                                                                'description'               =>  __("The HTTP Cross-Origin-Embedder-Policy (COEP) response header prevents a document from loading any cross-origin resources that don't explicitly grant the document permission (using CORP or CORS).",    'wp-hide-security-enhancer') .
     50                                                                                                                                                                                                "<br /><br />"  . __("Options:",    'wp-hide-security-enhancer') .
     51                                                                                                                                                                                                "<br /><b>unsafe-none</b> - "  . __("This is the default value. Allows the document to fetch cross-origin resources without giving explicit permission through the CORS protocol or the Cross-Origin-Resource-Policy header.",    'wp-hide-security-enhancer') .
     52                                                                                                                                                                                                "<br /><b>require-corp</b> - "  . __("A document can only load resources from the same origin, or resources explicitly marked as loadable from another origin. If a cross origin resource supports CORS, the crossorigin attribute or the Cross-Origin-Resource-Policy header must be used to load it without being blocked by COEP.",    'wp-hide-security-enhancer') ,
     53                                                                                                                                                                'option_documentation_url'  =>  'https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Embedder-Policy'
     54                                                                                                                                                                ),
     55                                                                                                                                ) );
     56                                                                break;
     57                                                     
     58                                }
     59                               
     60                            $component_settings[ $component_key ]   =   $component_setting;
     61                        }
     62                   
     63                    return $component_settings;
     64                   
    4165                }
    4266               
  • wp-hide-security-enhancer/trunk/modules/components/security-header-cross-origin-opener-policy.php

    r2984937 r3219455  
    1818                    $this->module_settings[]                  =   array(
    1919                                                                    'id'            =>  'cross_origin_opener_policy',
    20                                                                     'label'         =>  __('Cross-Origin-Opener-Policy (COOP)',    'wp-hide-security-enhancer'),
    21                                                                    
    22                                                                     'help'          =>  array(
    23                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Cross-Origin-Opener-Policy',    'wp-hide-security-enhancer'),
    24                                                                                                 'description'               =>  __("The HTTP Cross-Origin-Opener-Policy (COOP) response header allows you to ensure a top-level document does not share a browsing context group with cross-origin documents.",    'wp-hide-security-enhancer') .
    25                                                                                                                                 "<br />" . __("COOP will process-isolate your document and potential attackers can't access your global object if they were to open it in a popup, preventing a set of cross-origin attacks dubbed XS-Leaks.",    'wp-hide-security-enhancer') .
    26                                                                                                                                 "<br />" . __("If a cross-origin document with COOP is opened in a new window, the opening document will not have a reference to it, and the window.opener property of the new window will be null. This allows you to have more control over references to a window than rel=noopener, which only affects outgoing navigations.",    'wp-hide-security-enhancer') .
    27                                                                                                                                 "<br /><br />"  . __("Options:",    'wp-hide-security-enhancer') .
    28                                                                                                                                 "<br /><b>unsafe-none</b> - "  . __("This is the default value. Allows the document to be added to its opener's browsing context group unless the opener itself has a COOP of same-origin or same-origin-allow-popups.",    'wp-hide-security-enhancer') .
    29                                                                                                                                 "<br /><b>same-origin-allow-popups</b> - "  . __("Retains references to newly opened windows or tabs that either don't set COOP or that opt out of isolation by setting a COOP of unsafe-none.",    'wp-hide-security-enhancer') .
    30                                                                                                                                 "<br /><b>same-origin</b> - "  . __("Isolates the browsing context exclusively to same-origin documents. Cross-origin documents are not loaded in the same browsing context.",    'wp-hide-security-enhancer'),
    31                                                                                                 ),
    32                                                                                                        
    33                                                                                                        
     20                 
    3421                                                                    'input_type'    =>  'custom',
    3522                                                                                                 
     
    4027                 
    4128                                                                   
    42                     return $this->module_settings;
    43                  
     29                    return $this->module_settings;
     30                     
     31                }
     32               
     33               
     34        function set_module_components_description( $component_settings )
     35                {
     36
     37                    foreach ( $component_settings   as  $component_key  =>  $component_setting )
     38                        {
     39                            if ( ! isset ( $component_setting['id'] ) )
     40                                continue;
     41                           
     42                            switch ( $component_setting['id'] )
     43                                {
     44                                    case 'cross_origin_opener_policy' :
     45                                                                $component_setting =   array_merge ( $component_setting , array(
     46                                                                                                                                    'label'         =>  __('Cross-Origin-Opener-Policy (COOP)',    'wp-hide-security-enhancer'),
     47                                                                   
     48                                                                                                                                    'help'          =>  array(
     49                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Cross-Origin-Opener-Policy',    'wp-hide-security-enhancer'),
     50                                                                                                                                                                'description'               =>  __("The HTTP Cross-Origin-Opener-Policy (COOP) response header allows you to ensure a top-level document does not share a browsing context group with cross-origin documents.",    'wp-hide-security-enhancer') .
     51                                                                                                                                                                                                "<br />" . __("COOP will process-isolate your document and potential attackers can't access your global object if they were to open it in a popup, preventing a set of cross-origin attacks dubbed XS-Leaks.",    'wp-hide-security-enhancer') .
     52                                                                                                                                                                                                "<br />" . __("If a cross-origin document with COOP is opened in a new window, the opening document will not have a reference to it, and the window.opener property of the new window will be null. This allows you to have more control over references to a window than rel=noopener, which only affects outgoing navigations.",    'wp-hide-security-enhancer') .
     53                                                                                                                                                                                                "<br /><br />"  . __("Options:",    'wp-hide-security-enhancer') .
     54                                                                                                                                                                                                "<br /><b>unsafe-none</b> - "  . __("This is the default value. Allows the document to be added to its opener's browsing context group unless the opener itself has a COOP of same-origin or same-origin-allow-popups.",    'wp-hide-security-enhancer') .
     55                                                                                                                                                                                                "<br /><b>same-origin-allow-popups</b> - "  . __("Retains references to newly opened windows or tabs that either don't set COOP or that opt out of isolation by setting a COOP of unsafe-none.",    'wp-hide-security-enhancer') .
     56                                                                                                                                                                                                "<br /><b>same-origin</b> - "  . __("Isolates the browsing context exclusively to same-origin documents. Cross-origin documents are not loaded in the same browsing context.",    'wp-hide-security-enhancer'),
     57                                                                                                                                                                ),
     58                                                                                                                                ) );
     59                                                                break;
     60                                                     
     61                                }
     62                               
     63                            $component_settings[ $component_key ]   =   $component_setting;
     64                        }
    4465                   
    45                                                                    
    46                     return $this->module_settings;   
     66                    return $component_settings;
     67                   
    4768                }
    4869               
  • wp-hide-security-enhancer/trunk/modules/components/security-header-cross-origin-resource-policy.php

    r2761844 r3219455  
    1818                    $this->module_settings[]                  =   array(
    1919                                                                    'id'            =>  'cross_origin_resource_policy',
    20                                                                     'label'         =>  __('Cross-Origin-Resource-Policy (CORP)',    'wp-hide-security-enhancer'),
    21                                                                    
    22                                                                     'help'          =>  array(
    23                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Cross-Origin-Resource-Policy',    'wp-hide-security-enhancer'),
    24                                                                                                 'description'               =>  __("The HTTP Content-Security-Policy response header allows web site administrators to control resources the user agent is allowed to load for a given page. With a few exceptions, policies mostly involve specifying server origins and script endpoints. This helps guard against cross-site scripting attacks (Cross-site_scripting). ",    'wp-hide-security-enhancer')
    25                                                                                                 ),
    26                                                                                                                  
     20                                                                                                                                                           
    2721                                                                    'input_type'    =>  'custom',
    2822                                                                                                 
     
    3933                    return $this->module_settings;   
    4034                }
     35               
     36               
     37        function set_module_components_description( $component_settings )
     38                {
     39
     40                    foreach ( $component_settings   as  $component_key  =>  $component_setting )
     41                        {
     42                            if ( ! isset ( $component_setting['id'] ) )
     43                                continue;
     44                           
     45                            switch ( $component_setting['id'] )
     46                                {
     47                                    case 'cross_origin_resource_policy' :
     48                                                                $component_setting =   array_merge ( $component_setting , array(
     49                                                                                                                                    'label'         =>  __('Cross-Origin-Resource-Policy (CORP)',    'wp-hide-security-enhancer'),
     50                                                                   
     51                                                                                                                                    'help'          =>  array(
     52                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Cross-Origin-Resource-Policy',    'wp-hide-security-enhancer'),
     53                                                                                                                                                                'description'               =>  __("The HTTP Content-Security-Policy response header allows web site administrators to control resources the user agent is allowed to load for a given page. With a few exceptions, policies mostly involve specifying server origins and script endpoints. This helps guard against cross-site scripting attacks (Cross-site_scripting). ",    'wp-hide-security-enhancer')
     54                                                                                                                                                                ),
     55                                                                                                                                ) );
     56                                                                break;
     57                                                     
     58                                }
     59                               
     60                            $component_settings[ $component_key ]   =   $component_setting;
     61                        }
     62                   
     63                    return $component_settings;
     64                   
     65                }
    4166               
    4267            function _get_default_options()
  • wp-hide-security-enhancer/trunk/modules/components/security-header-referrer-policy.php

    r2862089 r3219455  
    1818                    $this->module_settings[]                  =   array(
    1919                                                                    'id'            =>  'referrer_policy',
    20                                                                     'label'         =>  __('Referrer-Policy',    'wp-hide-security-enhancer'),
    21                                                                    
    22                                                                     'help'          =>  array(
    23                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Referrer-Policy',    'wp-hide-security-enhancer'),
    24                                                                                                 'description'               =>  __("The Referrer-Policy HTTP header determines the amount of referral information (sent through the Referer header) that should accompany requests. In addition to the HTTP header, this policy can also be set in HTML",    'wp-hide-security-enhancer') .
    25                                                                                                                                 "<br /><br />"  . __("Options:",    'wp-hide-security-enhancer') .
    26                                                                                                                                 "<br /><b>no-referrer</b> - "  . __("The Referer header will be omitted: sent requests do not include any referrer information.",    'wp-hide-security-enhancer') .
    27                                                                                                                                 "<br /><b>no-referrer-when-downgrade</b> - "  . __("Send the origin, path, and querystring in Referer when the protocol security level stays the same or improves (HTTP→HTTP, HTTP→HTTPS, HTTPS→HTTPS). Don't send the Referer header for requests to less secure destinations (HTTPS→HTTP, HTTPS→file).",    'wp-hide-security-enhancer') .
    28                                                                                                                                 "<br /><b>origin</b> - "  . __("Send only the origin in the Referer header. For example, a document at https://example.com/page.html will send the referrer https://example.com/.",    'wp-hide-security-enhancer') .
    29                                                                                                                                 "<br /><b>origin-when-cross-origin</b> - "  . __("When performing a same-origin request to the same protocol level (HTTP→HTTP, HTTPS→HTTPS), send the origin, path, and query string. Send only the origin for cross origin requests and requests to less secure destinations (HTTPS→HTTP).",    'wp-hide-security-enhancer') .
    30                                                                                                                                 "<br /><b>same-origin</b> - "  . __("Send the origin, path, and query string for same-origin requests. Don't send the Referer header for cross-origin requests.",    'wp-hide-security-enhancer') .
    31                                                                                                                                 "<br /><b>strict-origin</b> - "  . __("Send only the origin when the protocol security level stays the same (HTTPS→HTTPS). Don't send the Referer header to less secure destinations (HTTPS→HTTP).",    'wp-hide-security-enhancer') .
    32                                                                                                                                 "<br /><b>strict-origin-when-cross-origin (default)</b> - "  . __("Send the origin, path, and querystring when performing a same-origin request. For cross-origin requests send the origin (only) when the protocol security level stays same (HTTPS→HTTPS). Don't send the Referer header to less secure destinations (HTTPS→HTTP).",    'wp-hide-security-enhancer') .
    33                                                                                                                                 "<br /><b>unsafe-url</b> - "  . __("Send the origin, path, and query string when performing any request, regardless of security.",    'wp-hide-security-enhancer') ,
    34                                                                                                 'option_documentation_url'  =>  'https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy'
    35                                                                                                 ),
    36                                        
     20                                                                                                           
    3721                                                                    'input_type'    =>  'custom',
    3822                                                                                                 
     
    4529                    return $this->module_settings;
    4630   
     31                }
     32               
     33               
     34        function set_module_components_description( $component_settings )
     35                {
     36
     37                    foreach ( $component_settings   as  $component_key  =>  $component_setting )
     38                        {
     39                            if ( ! isset ( $component_setting['id'] ) )
     40                                continue;
     41                           
     42                            switch ( $component_setting['id'] )
     43                                {
     44                                    case 'referrer_policy' :
     45                                                                $component_setting =   array_merge ( $component_setting , array(
     46                                                                                                                                    'label'         =>  __('Referrer-Policy',    'wp-hide-security-enhancer'),
     47                                                                   
     48                                                                                                                                    'help'          =>  array(
     49                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('Referrer-Policy',    'wp-hide-security-enhancer'),
     50                                                                                                                                                                'description'               =>  __("The Referrer-Policy HTTP header determines the amount of referral information (sent through the Referer header) that should accompany requests. In addition to the HTTP header, this policy can also be set in HTML",    'wp-hide-security-enhancer') .
     51                                                                                                                                                                                                "<br /><br />"  . __("Options:",    'wp-hide-security-enhancer') .
     52                                                                                                                                                                                                "<br /><b>no-referrer</b> - "  . __("The Referer header will be omitted: sent requests do not include any referrer information.",    'wp-hide-security-enhancer') .
     53                                                                                                                                                                                                "<br /><b>no-referrer-when-downgrade</b> - "  . __("Send the origin, path, and querystring in Referer when the protocol security level stays the same or improves (HTTP→HTTP, HTTP→HTTPS, HTTPS→HTTPS). Don't send the Referer header for requests to less secure destinations (HTTPS→HTTP, HTTPS→file).",    'wp-hide-security-enhancer') .
     54                                                                                                                                                                                                "<br /><b>origin</b> - "  . __("Send only the origin in the Referer header. For example, a document at https://example.com/page.html will send the referrer https://example.com/.",    'wp-hide-security-enhancer') .
     55                                                                                                                                                                                                "<br /><b>origin-when-cross-origin</b> - "  . __("When performing a same-origin request to the same protocol level (HTTP→HTTP, HTTPS→HTTPS), send the origin, path, and query string. Send only the origin for cross origin requests and requests to less secure destinations (HTTPS→HTTP).",    'wp-hide-security-enhancer') .
     56                                                                                                                                                                                                "<br /><b>same-origin</b> - "  . __("Send the origin, path, and query string for same-origin requests. Don't send the Referer header for cross-origin requests.",    'wp-hide-security-enhancer') .
     57                                                                                                                                                                                                "<br /><b>strict-origin</b> - "  . __("Send only the origin when the protocol security level stays the same (HTTPS→HTTPS). Don't send the Referer header to less secure destinations (HTTPS→HTTP).",    'wp-hide-security-enhancer') .
     58                                                                                                                                                                                                "<br /><b>strict-origin-when-cross-origin (default)</b> - "  . __("Send the origin, path, and querystring when performing a same-origin request. For cross-origin requests send the origin (only) when the protocol security level stays same (HTTPS→HTTPS). Don't send the Referer header to less secure destinations (HTTPS→HTTP).",    'wp-hide-security-enhancer') .
     59                                                                                                                                                                                                "<br /><b>unsafe-url</b> - "  . __("Send the origin, path, and query string when performing any request, regardless of security.",    'wp-hide-security-enhancer') ,
     60                                                                                                                                                                'option_documentation_url'  =>  'https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy'
     61                                                                                                                                                                ),
     62                                                                                                                                ) );
     63                                                                break;
     64                                                     
     65                                }
     66                               
     67                            $component_settings[ $component_key ]   =   $component_setting;
     68                        }
     69                   
     70                    return $component_settings;
     71                   
    4772                }
    4873               
  • wp-hide-security-enhancer/trunk/modules/components/security-header-x-content-type-options.php

    r2761844 r3219455  
    1818                    $this->module_settings[]                  =   array(
    1919                                                                    'id'            =>  'x_content_type_options',
    20                                                                     'label'         =>  __('X-Content-Type-Options',    'wp-hide-security-enhancer'),
    21                                                                    
    22                                                                     'help'          =>  array(
    23                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('X-Content-Type-Options',    'wp-hide-security-enhancer'),
    24                                                                                                 'description'               =>  __("The X-Content-Type-Options response HTTP header is a marker used by the server to indicate that the MIME types advertised in the Content-Type headers should be followed and not be changed. The header allows you to avoid MIME type sniffing by saying that the MIME types are deliberately configured.",    'wp-hide-security-enhancer') .
    25                                                                                                                                 "<br />" . __("This header was introduced by Microsoft in IE 8 as a way for webmasters to block content sniffing that was happening and could transform non-executable MIME types into executable MIME types. Since then, other browsers have introduced it, even if their MIME sniffing algorithms were less aggressive.",    'wp-hide-security-enhancer') .
    26                                                                                                                                 "<br />" . __("Starting with Firefox 72, top-level documents also avoid MIME sniffing (if Content-type is provided). This can cause HTML web pages to be downloaded instead of being rendered when they are served with a MIME type other than text/html. Make sure to set both headers correctly.",    'wp-hide-security-enhancer') .
    27                                                                                                                                 "<br /><br />"  . __("Options:",    'wp-hide-security-enhancer') .
    28                                                                                                                                 "<br /><b>nosniff</b> - "  . __("Blocks a request if the request destination is of type style and the MIME type is not text/css, or of type script and the MIME type is not a JavaScript MIME type.",    'wp-hide-security-enhancer')
    29                                                                                                 ),
    30                                                                                                              
     20                                                                                                                                                                 
    3121                                                                    'input_type'    =>  'custom',
    3222                                                                                                 
     
    3828                                                                   
    3929                    return $this->module_settings;
    40                  
     30 
     31                }
     32               
     33               
     34        function set_module_components_description( $component_settings )
     35                {
     36
     37                    foreach ( $component_settings   as  $component_key  =>  $component_setting )
     38                        {
     39                            if ( ! isset ( $component_setting['id'] ) )
     40                                continue;
     41                           
     42                            switch ( $component_setting['id'] )
     43                                {
     44                                    case 'x_content_type_options' :
     45                                                                $component_setting =   array_merge ( $component_setting , array(
     46                                                                                                                                    'label'         =>  __('X-Content-Type-Options',    'wp-hide-security-enhancer'),
     47                                                                   
     48                                                                                                                                    'help'          =>  array(
     49                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('X-Content-Type-Options',    'wp-hide-security-enhancer'),
     50                                                                                                                                                                'description'               =>  __("The X-Content-Type-Options response HTTP header is a marker used by the server to indicate that the MIME types advertised in the Content-Type headers should be followed and not be changed. The header allows you to avoid MIME type sniffing by saying that the MIME types are deliberately configured.",    'wp-hide-security-enhancer') .
     51                                                                                                                                                                                                "<br />" . __("This header was introduced by Microsoft in IE 8 as a way for webmasters to block content sniffing that was happening and could transform non-executable MIME types into executable MIME types. Since then, other browsers have introduced it, even if their MIME sniffing algorithms were less aggressive.",    'wp-hide-security-enhancer') .
     52                                                                                                                                                                                                "<br />" . __("Starting with Firefox 72, top-level documents also avoid MIME sniffing (if Content-type is provided). This can cause HTML web pages to be downloaded instead of being rendered when they are served with a MIME type other than text/html. Make sure to set both headers correctly.",    'wp-hide-security-enhancer') .
     53                                                                                                                                                                                                "<br /><br />"  . __("Options:",    'wp-hide-security-enhancer') .
     54                                                                                                                                                                                                "<br /><b>nosniff</b> - "  . __("Blocks a request if the request destination is of type style and the MIME type is not text/css, or of type script and the MIME type is not a JavaScript MIME type.",    'wp-hide-security-enhancer')
     55                                                                                                                                                                ),
     56                                                                                                                                ) );
     57                                                                break;
     58                                                     
     59                                }
     60                               
     61                            $component_settings[ $component_key ]   =   $component_setting;
     62                        }
    4163                   
    42                                                                    
    43                     return $this->module_settings;   
     64                    return $component_settings;
     65                   
    4466                }
    4567           
  • wp-hide-security-enhancer/trunk/modules/components/security-header-x-download-options.php

    r2761844 r3219455  
    1818                    $this->module_settings[]                  =   array(
    1919                                                                    'id'            =>  'x_download_options',
    20                                                                     'label'         =>  __('X-Download-Options',    'wp-hide-security-enhancer'),
    21                                                                    
    22                                                                     'help'          =>  array(
    23                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('X-Download-Options',    'wp-hide-security-enhancer'),
    24                                                                                                 'description'               =>  __("The X-Download-Options is specific to IE 8, and is related to how IE 8 handles downloaded HTML files. Turns out if you download an HTML file from a web page and chooses to \"Open\" it in IE, it will execute in the context of the web site. That means that any scripts in that file will also execute with the origin of the web site.",    'wp-hide-security-enhancer')
    25                                                                                                 ),
    26                                                                    
     20                                                                                                               
    2721                                                                    'input_type'    =>  'custom',
    2822                                                                                                 
     
    3428                                                                   
    3529                    return $this->module_settings;
    36                  
     30   
     31                }
     32               
     33               
     34        function set_module_components_description( $component_settings )
     35                {
     36
     37                    foreach ( $component_settings   as  $component_key  =>  $component_setting )
     38                        {
     39                            if ( ! isset ( $component_setting['id'] ) )
     40                                continue;
     41                           
     42                            switch ( $component_setting['id'] )
     43                                {
     44                                    case 'x_download_options' :
     45                                                                $component_setting =   array_merge ( $component_setting , array(
     46                                                                                                                                    'label'         =>  __('X-Download-Options',    'wp-hide-security-enhancer'),
     47                                                                   
     48                                                                                                                                    'help'          =>  array(
     49                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('X-Download-Options',    'wp-hide-security-enhancer'),
     50                                                                                                                                                                'description'               =>  __("The X-Download-Options is specific to IE 8, and is related to how IE 8 handles downloaded HTML files. Turns out if you download an HTML file from a web page and chooses to \"Open\" it in IE, it will execute in the context of the web site. That means that any scripts in that file will also execute with the origin of the web site.",    'wp-hide-security-enhancer')
     51                                                                                                                                                                ),
     52                                                                                                                                ) );
     53                                                                break;
     54                                                     
     55                                }
     56                               
     57                            $component_settings[ $component_key ]   =   $component_setting;
     58                        }
    3759                   
    38                                                                    
    39                     return $this->module_settings;   
     60                    return $component_settings;
     61                   
    4062                }
     63               
    4164           
    4265            function _get_default_options()
  • wp-hide-security-enhancer/trunk/modules/components/security-header-x-frame-options.php

    r2761844 r3219455  
    1818                    $this->module_settings[]                  =   array(
    1919                                                                    'id'            =>  'x_frame_options',
    20                                                                     'label'         =>  __('X-Frame-Options (XFO)',    'wp-hide-security-enhancer'),
    21                                                                    
    22                                                                     'help'          =>  array(
    23                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('X-Frame-Options',    'wp-hide-security-enhancer'),
    24                                                                                                 'description'               =>  __("The X-Frame-Options HTTP response header can be used to indicate whether or not a browser should be allowed to render a page in a &#60;frame&#62;, &#60;iframe&#62;, &#60;embed&#62; or &#60;object&#62;. Sites can use this to avoid click-jacking attacks, by ensuring that their content is not embedded into other sites.",    'wp-hide-security-enhancer') .
    25                                                                                                                                 "<br />" . __("The added security is provided only if the user accessing the document is using a browser that supports X-Frame-Options.",    'wp-hide-security-enhancer') .
    26                                                                                                                                 "<br /><br />"  . __("Options:",    'wp-hide-security-enhancer') .
    27                                                                                                                                 "<br /><b>DENY</b> - "  . __("The page cannot be displayed in a frame, regardless of the site attempting to do so.",    'wp-hide-security-enhancer') .
    28                                                                                                                                 "<br /><b>SAMEORIGIN</b> - "  . __("The page can only be displayed in a frame on the same origin as the page itself. The spec leaves it up to browser vendors to decide whether this option applies to the top level, the parent, or the whole chain, although it is argued that the option is not very useful unless all ancestors are also in the same origin.",    'wp-hide-security-enhancer') .
    29                                                                                                                                 "<br />&nbsp;<br /><br />" . __("If you specify DENY, not only will the browser attempt to load the page in a frame fail when loaded from other sites, attempts to do so will fail when loaded from the same site. On the other hand, if you specify SAMEORIGIN, you can still use the page in a frame as long as the site including it in a frame is the same as the one serving the page.",    'wp-hide-security-enhancer')
    30                                                                                                 ),
    31                                                                                                                    
     20                                                                                                                                                                                       
    3221                                                                    'input_type'    =>  'custom',
    3322                                                                                                 
     
    4433                    return $this->module_settings;   
    4534                }
     35           
     36           
     37        function set_module_components_description( $component_settings )
     38                {
     39
     40                    foreach ( $component_settings   as  $component_key  =>  $component_setting )
     41                        {
     42                            if ( ! isset ( $component_setting['id'] ) )
     43                                continue;
     44                           
     45                            switch ( $component_setting['id'] )
     46                                {
     47                                    case 'x_frame_options' :
     48                                                                $component_setting =   array_merge ( $component_setting , array(
     49                                                                                                                                    'label'         =>  __('X-Frame-Options (XFO)',    'wp-hide-security-enhancer'),
     50                                                                   
     51                                                                                                                                    'help'          =>  array(
     52                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('X-Frame-Options',    'wp-hide-security-enhancer'),
     53                                                                                                                                                                'description'               =>  __("The X-Frame-Options HTTP response header can be used to indicate whether or not a browser should be allowed to render a page in a &#60;frame&#62;, &#60;iframe&#62;, &#60;embed&#62; or &#60;object&#62;. Sites can use this to avoid click-jacking attacks, by ensuring that their content is not embedded into other sites.",    'wp-hide-security-enhancer') .
     54                                                                                                                                                                                                "<br />" . __("The added security is provided only if the user accessing the document is using a browser that supports X-Frame-Options.",    'wp-hide-security-enhancer') .
     55                                                                                                                                                                                                "<br /><br />"  . __("Options:",    'wp-hide-security-enhancer') .
     56                                                                                                                                                                                                "<br /><b>DENY</b> - "  . __("The page cannot be displayed in a frame, regardless of the site attempting to do so.",    'wp-hide-security-enhancer') .
     57                                                                                                                                                                                                "<br /><b>SAMEORIGIN</b> - "  . __("The page can only be displayed in a frame on the same origin as the page itself. The spec leaves it up to browser vendors to decide whether this option applies to the top level, the parent, or the whole chain, although it is argued that the option is not very useful unless all ancestors are also in the same origin.",    'wp-hide-security-enhancer') .
     58                                                                                                                                                                                                "<br />&nbsp;<br /><br />" . __("If you specify DENY, not only will the browser attempt to load the page in a frame fail when loaded from other sites, attempts to do so will fail when loaded from the same site. On the other hand, if you specify SAMEORIGIN, you can still use the page in a frame as long as the site including it in a frame is the same as the one serving the page.",    'wp-hide-security-enhancer')
     59                                                                                                                                                                ),
     60                                                                                                                                ) );
     61                                                                break;
     62                                                     
     63                                }
     64                               
     65                            $component_settings[ $component_key ]   =   $component_setting;
     66                        }
     67                   
     68                    return $component_settings;
     69                   
     70                }
     71           
    4672           
    4773            function _get_default_options()
  • wp-hide-security-enhancer/trunk/modules/components/security-header-x-permitted-cross-domain-policies.php

    r2761844 r3219455  
    1818                    $this->module_settings[]                  =   array(
    1919                                                                    'id'            =>  'x_permitted_cross_domain_policies',
    20                                                                     'label'         =>  __('X-Permitted-Cross-Domain-Policies',    'wp-hide-security-enhancer'),
    21                                                                    
    22                                                                     'help'          =>  array(
    23                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('X-Permitted-Cross-Domain-Policies',    'wp-hide-security-enhancer'),
    24                                                                                                 'description'               =>  __("A cross-domain policy file is an XML document that grants a web client, such as Adobe Flash Player or Adobe Acrobat (though not necessarily limited to these), permission to handle data across domains.",    'wp-hide-security-enhancer') .
    25                                                                                                                                 "<br />" . __("When clients request content hosted on a particular source domain and that content makes requests directed towards a domain other than its own, the remote domain needs to host a cross-domain policy file that grants access to the source domain, allowing the client to continue the transaction.",    'wp-hide-security-enhancer') .
    26                                                                                                                                 "<br />" . __("Normally a meta-policy is declared in the master policy file, but for those who can’t write to the root directory, they can also declare a meta-policy using the X-Permitted-Cross-Domain-Policies HTTP response header.",    'wp-hide-security-enhancer') .
    27                                                                                                                                 "<br /><br />"  . __("Options:",    'wp-hide-security-enhancer') .
    28                                                                                                                                 "<br /><b>none</b> - "  . __("No policy files are allowed anywhere on the target server, including this master policy file.",    'wp-hide-security-enhancer') .
    29                                                                                                                                 "<br /><b>master-only</b> - "  . __("Only this master policy file is allowed.",    'wp-hide-security-enhancer') .
    30                                                                                                                                 "<br /><b>by-content-type</b> - "  . __("[HTTP/HTTPS only] Only policy files served with Content-Type: text/x-cross-domain-policy are allowed.",    'wp-hide-security-enhancer') .
    31                                                                                                                                 "<br /><b>by-ftp-filename</b> - "  . __("[FTP only] Only policy files whose file names are crossdomain.xml (i.e. URLs ending in /crossdomain.xml) are allowed.",    'wp-hide-security-enhancer') .
    32                                                                                                                                 "<br /><b>all</b> - "  . __("All policy files on this target domain are allowed.",    'wp-hide-security-enhancer')
    33                                                                                                 ),
    3420                                                                                                   
    3521                                                                    'input_type'    =>  'custom',
     
    4228                                                                   
    4329                    return $this->module_settings;
    44                  
     30 
     31                }
     32               
     33               
     34        function set_module_components_description( $component_settings )
     35                {
     36
     37                    foreach ( $component_settings   as  $component_key  =>  $component_setting )
     38                        {
     39                            if ( ! isset ( $component_setting['id'] ) )
     40                                continue;
     41                           
     42                            switch ( $component_setting['id'] )
     43                                {
     44                                    case 'x_permitted_cross_domain_policies' :
     45                                                                $component_setting =   array_merge ( $component_setting , array(
     46                                                                                                                                    'label'         =>  __('X-Permitted-Cross-Domain-Policies',    'wp-hide-security-enhancer'),
     47                                                                   
     48                                                                                                                                    'help'          =>  array(
     49                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('X-Permitted-Cross-Domain-Policies',    'wp-hide-security-enhancer'),
     50                                                                                                                                                                'description'               =>  __("A cross-domain policy file is an XML document that grants a web client, such as Adobe Flash Player or Adobe Acrobat (though not necessarily limited to these), permission to handle data across domains.",    'wp-hide-security-enhancer') .
     51                                                                                                                                                                                                "<br />" . __("When clients request content hosted on a particular source domain and that content makes requests directed towards a domain other than its own, the remote domain needs to host a cross-domain policy file that grants access to the source domain, allowing the client to continue the transaction.",    'wp-hide-security-enhancer') .
     52                                                                                                                                                                                                "<br />" . __("Normally a meta-policy is declared in the master policy file, but for those who can’t write to the root directory, they can also declare a meta-policy using the X-Permitted-Cross-Domain-Policies HTTP response header.",    'wp-hide-security-enhancer') .
     53                                                                                                                                                                                                "<br /><br />"  . __("Options:",    'wp-hide-security-enhancer') .
     54                                                                                                                                                                                                "<br /><b>none</b> - "  . __("No policy files are allowed anywhere on the target server, including this master policy file.",    'wp-hide-security-enhancer') .
     55                                                                                                                                                                                                "<br /><b>master-only</b> - "  . __("Only this master policy file is allowed.",    'wp-hide-security-enhancer') .
     56                                                                                                                                                                                                "<br /><b>by-content-type</b> - "  . __("[HTTP/HTTPS only] Only policy files served with Content-Type: text/x-cross-domain-policy are allowed.",    'wp-hide-security-enhancer') .
     57                                                                                                                                                                                                "<br /><b>by-ftp-filename</b> - "  . __("[FTP only] Only policy files whose file names are crossdomain.xml (i.e. URLs ending in /crossdomain.xml) are allowed.",    'wp-hide-security-enhancer') .
     58                                                                                                                                                                                                "<br /><b>all</b> - "  . __("All policy files on this target domain are allowed.",    'wp-hide-security-enhancer')
     59                                                                                                                                                                ),
     60                                                                                                                                ) );
     61                                                                break;
     62                                                     
     63                                }
     64                               
     65                            $component_settings[ $component_key ]   =   $component_setting;
     66                        }
    4567                   
    46                                                                    
    47                     return $this->module_settings;   
     68                    return $component_settings;
     69                   
    4870                }
    4971           
  • wp-hide-security-enhancer/trunk/modules/components/security-header-x-xss-protection.php

    r2761844 r3219455  
    1818                    $this->module_settings[]                  =   array(
    1919                                                                    'id'            =>  'x_xss_protection',
    20                                                                     'label'         =>  __('X-XSS-Protection',    'wp-hide-security-enhancer'),
    21                                                                    
    22                                                                     'help'          =>  array(
    23                                                                                                 'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('X-XSS-Protection',    'wp-hide-security-enhancer'),
    24                                                                                                 'description'               =>  __("The HTTP X-XSS-Protection response header is a feature of Internet Explorer, Chrome and Safari that stops pages from loading when they detect reflected cross-site scripting (XSS) attacks. These protections are largely unnecessary in modern browsers when sites implement a strong Content-Security-Policy that disables the use of inline JavaScript ('unsafe-inline').",    'wp-hide-security-enhancer') .
    25                                                                                                                                 "<br /><br />"  . __("Options:",    'wp-hide-security-enhancer') .
    26                                                                                                                                 "<br /><b>0</b> - "  . __("Disables XSS filtering.",    'wp-hide-security-enhancer') .
    27                                                                                                                                 "<br /><b>1</b> - "  . __("Enables XSS filtering (usually default in browsers). If a cross-site scripting attack is detected, the browser will sanitize the page (remove the unsafe parts).",    'wp-hide-security-enhancer') .
    28                                                                                                                                 "<br /><b>1; mode=block</b> - "  . __("Enables XSS filtering. Rather than sanitizing the page, the browser will prevent rendering of the page if an attack is detected.",    'wp-hide-security-enhancer') .
    29                                                                                                                                 "<br /><b>1; report=</b> - "  . __("Chromium only. Enables XSS filtering. If a cross-site scripting attack is detected, the browser will sanitize the page and report the violation. This uses the functionality of the CSP report-uri directive to send a report.",    'wp-hide-security-enhancer')
    30                                                                                                 ),
    3120                                                                                                   
    3221                                                                    'input_type'    =>  'custom',
     
    4130
    4231                }
     32               
     33               
     34        function set_module_components_description( $component_settings )
     35                {
     36
     37                    foreach ( $component_settings   as  $component_key  =>  $component_setting )
     38                        {
     39                            if ( ! isset ( $component_setting['id'] ) )
     40                                continue;
     41                           
     42                            switch ( $component_setting['id'] )
     43                                {
     44                                    case 'x_xss_protection' :
     45                                                                $component_setting =   array_merge ( $component_setting , array(
     46                                                                                                                                    'label'         =>  __('X-XSS-Protection',    'wp-hide-security-enhancer'),
     47                                                                   
     48                                                                                                                                    'help'          =>  array(
     49                                                                                                                                                                'title'                     =>  __('Help',    'wp-hide-security-enhancer') . ' - ' . __('X-XSS-Protection',    'wp-hide-security-enhancer'),
     50                                                                                                                                                                'description'               =>  __("The HTTP X-XSS-Protection response header is a feature of Internet Explorer, Chrome and Safari that stops pages from loading when they detect reflected cross-site scripting (XSS) attacks. These protections are largely unnecessary in modern browsers when sites implement a strong Content-Security-Policy that disables the use of inline JavaScript ('unsafe-inline').",    'wp-hide-security-enhancer') .
     51                                                                                                                                                                                                "<br /><br />"  . __("Options:",    'wp-hide-security-enhancer') .
     52                                                                                                                                                                                                "<br /><b>0</b> - "  . __("Disables XSS filtering.",    'wp-hide-security-enhancer') .
     53                                                                                                                                                                                                "<br /><b>1</b> - "  . __("Enables XSS filtering (usually default in browsers). If a cross-site scripting attack is detected, the browser will sanitize the page (remove the unsafe parts).",    'wp-hide-security-enhancer') .
     54                                                                                                                                                                                                "<br /><b>1; mode=block</b> - "  . __("Enables XSS filtering. Rather than sanitizing the page, the browser will prevent rendering of the page if an attack is detected.",    'wp-hide-security-enhancer') .
     55                                                                                                                                                                                                "<br /><b>1; report=</b> - "  . __("Chromium only. Enables XSS filtering. If a cross-site scripting attack is detected, the browser will sanitize the page and report the violation. This uses the functionality of the CSP report-uri directive to send a report.",    'wp-hide-security-enhancer')
     56                                                                                                                                                                ),
     57                                                                                                                                ) );
     58                                                                break;
     59                                                     
     60                                }
     61                               
     62                            $component_settings[ $component_key ]   =   $component_setting;
     63                        }
     64                   
     65                    return $component_settings;
     66                   
     67                }
     68               
    4369           
    4470            function _get_default_options()
  • wp-hide-security-enhancer/trunk/modules/module-admin.php

    r2977600 r3219455  
    4444                    $interface_data['menu_title']       =   __('<span class="wph-info">Hide&rarr;</span> Login / Admin',    'wp-hide-security-enhancer');
    4545                    $interface_data['menu_slug']        =   self::get_module_slug();
    46                     $interface_data['menu_position']    =   30;
    4746                   
    4847                    return $interface_data;
     48                }
     49               
     50            function get_interface_menu_position()
     51                {
     52                    return 30;
    4953                }
    5054   
  • wp-hide-security-enhancer/trunk/modules/module-captcha.php

    r2977600 r3219455  
    4343                    $interface_data['menu_title']       =   __('<span class="wph-info">Security&rarr;</span> Captcha',    'wp-hide-security-enhancer');
    4444                    $interface_data['menu_slug']        =   self::get_module_slug();
    45                     $interface_data['menu_position']    =   40;
    4645                   
    4746                    return $interface_data;
     47                }
     48               
     49            function get_interface_menu_position()
     50                {
     51                    return 40;
    4852                }
    4953   
  • wp-hide-security-enhancer/trunk/modules/module-cdn.php

    r2709073 r3219455  
    4343                    $interface_data['menu_title']       =   __('<span class="wph-info">Settings&rarr;</span> CDN',    'wp-hide-security-enhancer');
    4444                    $interface_data['menu_slug']        =   self::get_module_slug();
    45                     $interface_data['menu_position']    =   50;
    4645                   
    4746                    return $interface_data;
     47                }
     48               
     49            function get_interface_menu_position()
     50                {
     51                    return 50;
    4852                }
    4953   
  • wp-hide-security-enhancer/trunk/modules/module-general.php

    r3104976 r3219455  
    7878                    $interface_data['menu_title']       =   __('<span class="wph-info">Hide&rarr;</span> General / Html',    'wp-hide-security-enhancer');
    7979                    $interface_data['menu_slug']        =   self::get_module_slug();
    80                     $interface_data['menu_position']    =   20;
    8180                   
    8281                    return $interface_data;
     82                }
     83               
     84            function get_interface_menu_position()
     85                {
     86                    return 20;
    8387                }
    8488   
  • wp-hide-security-enhancer/trunk/modules/module-rewrite.php

    r3051125 r3219455  
    8282                    return $interface_data;
    8383                }
     84               
     85            function get_interface_menu_position()
     86                {
     87                    return 10;
     88                }
    8489   
    8590            function get_interface_data()
  • wp-hide-security-enhancer/trunk/modules/module-security_headers.php

    r3051125 r3219455  
    7373                    return $interface_data;
    7474                }
     75               
     76            function get_interface_menu_position()
     77                {
     78                    return 70;
     79                }
    7580   
    7681            function get_interface_data()
  • wp-hide-security-enhancer/trunk/readme.txt

    r3209226 r3219455  
    55Requires at least: 2.8
    66Tested up to: 6.7.1
    7 Stable tag: 2.5.6
     7Stable tag: 2.5.8
    88License: GPLv2 or later
    99
     
    418418== Changelog ==
    419419
     420= 2.5.8 =
     421* Separate all module components settings from the components settings description, to ensure the __() and _e() translation functions trigger after the init action.
     422* Relocate the filter wp-hide/ignore_ob_start_callback higher in the ob_start_callback method, to allow by-passing the buffer processing.
     423* Ignore the comments removal when the content type is application/json
     424* Use module separate method get_interface_menu_position for setting up the position hierarchy in the menus.
     425* Fix: Ensure the security widget is loading the correct data for any users that has access to the dashboard.
     426* Fix: avoid calling the get_plugins() as it triggers a rare issue on ceertain servers, when loading over HTTP protocol.
     427
     428
    420429= 2.5.6 =
    421430* Add separate components description texts, for the translations to be available, after init action ( changed in the WordPress 6.5 )
  • wp-hide-security-enhancer/trunk/wp-hide.php

    r3209226 r3219455  
    66* Author: Nsp Code
    77* Author URI: http://www.nsp-code.com
    8 * Version: 2.5.6
     8* Version: 2.5.8
    99* Text Domain: wp-hide-security-enhancer
    1010* Domain Path: /languages/
Note: See TracChangeset for help on using the changeset viewer.