Plugin Directory

Changeset 3314656


Ignore:
Timestamp:
06/19/2025 01:02:34 PM (6 months ago)
Author:
FolioVision
Message:

1.4.1: Site Health Status: It only shows to allowed admins, if restrictions are on, so make a note of it

Location:
businesspress/trunk
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • businesspress/trunk/businesspress-settings.class.php

    r3284756 r3314656  
    549549                    'Enable domain name',
    550550                    sprintf( __('Include domain name of searched website in the search results', 'businesspress' ), plugin_dir_path(__FILE__).'fv-search.php' ) );
     551
     552              $this->admin_show_setting(
     553                    'businesspress-limit-search-requests-by-ip',
     554                    'limit-search-requests-by-ip',
     555                    __('Limit Search requests by IP', 'businesspress' ),
     556                    __('Allows up to 10 search requests per minute per IP', 'businesspress' )
     557              );
    551558        ?>
    552559      </table>
  • businesspress/trunk/businesspress.php

    r3298557 r3314656  
    44Plugin URI: http://www.foliovision.com
    55Description: This plugin secures your site
    6 Version: 1.4
     6Version: 1.4.1
    77Author: Foliovision
    88Author URI: http://foliovision.com
     
    1515 
    1616 
    17   const VERSION = '1.4';
     17  const VERSION = '1.4.1';
    1818 
    1919 
     
    213213     */
    214214    add_action( 'pre_get_posts', array( $this, 'hide_password_protected_posts' ) );
     215
     216    /**
     217     * Change "Site Health Status" label to indicate that only BusinessPress admins see this
     218     */
     219    add_filter( 'gettext', array( $this, 'admin_site_health_title_change' ), 100, 3 );
    215220
    216221    /**
     
    289294  }
    290295 
    291  
    292  
     296  function admin_site_health_title_change( $translation, $text, $domain ) {
     297    if ( $this->get_setting('restrictions_enabled') ) {
     298      if ( 'Site Health Status' === $text ) {
     299        return $translation . '<small>(BusinessPress admins only)</small>';
     300      }
     301    }
     302
     303    return $translation;
     304  }
    293305 
    294306  function admin_style() {
     
    11251137      $this->aOptions['disable-user-login-scanning'] = isset($_POST['businesspress-disable-user-login-scanning']) && $_POST['businesspress-disable-user-login-scanning'] == 1 ? true : false;
    11261138
     1139      $this->aOptions['limit-search-requests-by-ip'] = isset($_POST['businesspress-limit-search-requests-by-ip']) && $_POST['businesspress-limit-search-requests-by-ip'] == 1 ? true : false;
     1140
    11271141      $this->aOptions['login-lockout'] = isset($_POST['businesspress-login-lockout']) && $_POST['businesspress-login-lockout'] == 1 ? true : false;
    11281142
     
    13521366
    13531367    include( dirname(__FILE__).'/plugins/fv-user-login-sessions.php' );
     1368
     1369    if ( $this->get_setting('limit-search-requests-by-ip') ) {
     1370      include( dirname(__FILE__).'/plugins/fv-limit-search.php' );
     1371    }
    13541372
    13551373    include( dirname(__FILE__) . '/plugins/simple-history-clean-up.php' );
  • businesspress/trunk/css/fv-search.css

    r3076918 r3314656  
    9898    margin-bottom: 0;
    9999}
     100
     101/* Hide common entry footer content elements */
     102.entry-meta {
     103    display: none;
     104}
  • businesspress/trunk/fv-search.php

    r3284756 r3314656  
    1212
    1313  var $iSearch_max_num_pages = 0;
     14
     15  // Used if "Limit Search requests by IP" settings is enabled and IP address makes too many search requests.
     16  var $rate_limited = false;
    1417
    1518  function __construct() {
     
    5356      $objPost->comment_status = 'closed';
    5457      $objPost->ping_status = 'closed';
     58      $objPost->post_author = 0;
    5559     
    5660      $wp_query->posts = 1;
     
    228232      }
    229233     
     234    } else if ( $this->rate_limited ) {
     235      $html .= '<div class="businesspress-search-no-result"><p>'.__('Too many search requests. Please wait a minute before trying again.', 'businesspress').'</p></div>';
     236
    230237    } else {
    231238      $html .= '<div class="businesspress-search-no-result"><p>'.__('Your search did not match any documents.','businesspress').'</p>';
     
    287294}
    288295
     296global $FV_Search;
    289297$FV_Search = new FV_Search;
    290298
  • businesspress/trunk/readme.txt

    r3298557 r3314656  
    101101
    102102== Changelog ==
     103
     104= 1.4.1 - 2025-06-19 =
     105
     106* Site Health Status: It only shows to allowed admins, if restrictions are on, so make a note of it
    103107
    104108= 1.4 - 2025-05-22 =
Note: See TracChangeset for help on using the changeset viewer.