PluginProbe
Vigilant – 100% Free Security Suite: Firewall, 2FA, Login, Headers, Scanner… / 2.11.12
Vigilant – 100% Free Security Suite: Firewall, 2FA, Login, Headers, Scanner… v2.11.12
3.0.0 2.11.12 2.11.11 2.11.10 2.11.9 2.11.7 2.11.8 2.11.6 2.11.5 2.11.4 2.11.3 2.11.1 2.11.2 2.11.0 2.10.5 2.10.4 2.10.3 2.10.2 2.10.1 2.10.0 2.9.9 2.9.8 2.9.6 2.9.7 2.9.5 All 88 releases
← All changes | includes/class-security-headers.php +7 -2 2.10.02.11.12 View file →
@@ -53,9 +53,14 @@
53 53 * Apply security headers to .htaccess
54 54 *
55 55 * @return bool|WP_Error
56 56 */
57 - public function apply_rules() {
57 + /**
58 + * @param bool $automatic True when Vigilant is refreshing the block by
59 + * itself rather than because someone pressed Save.
60 + * See Vigilante_Htaccess_Manager::add_block().
61 + */
62 + public function apply_rules( $automatic = false ) {
58 63 require_once VIGILANTE_INCLUDES_DIR . 'class-htaccess-manager.php';
59 64
60 65 $manager = Vigilante_Htaccess_Manager::get_instance();
61 66
@@ -68,9 +73,9 @@
68 73 }
69 74
70 75 $rules = $this->generate_rules_content();
71 76
72 - $result = $manager->add_block( self::MARKER_START, self::MARKER_END, $rules, 'top' );
77 + $result = $manager->add_block( self::MARKER_START, self::MARKER_END, $rules, 'top', $automatic );
73 78
74 79 if ( true === $result ) {
75 80 /** This action is documented in class-wpconfig-security.php */
76 81 do_action( 'vigilante_critical_file_written', '.htaccess' );