Plugin Directory

Changeset 3261550


Ignore:
Timestamp:
03/25/2025 01:01:04 PM (12 months ago)
Author:
wpiron
Message:

Fixed styling + fatal errors on editing pages

Location:
iron-security
Files:
4 edited
17 copied

Legend:

Unmodified
Added
Removed
  • iron-security/tags/2.2.4/README.txt

    r3261059 r3261550  
    55Requires at least: 4.7
    66Tested up to: 6.7
    7 Stable tag: 2.2.3
     7Stable tag: 2.2.4
    88Requires PHP: 7.0
    99License: GPLv2 or later
     
    112112== Changelog ==
    113113
     114= 2.2.4 =
     115* Fixed Fatal Error when editing pages
     116* Fixed styling issues with whole admin panel
     117
    114118= 2.2.3 =
    115119* Fixed Readme
  • iron-security/tags/2.2.4/admin/class-iron-security-admin.php

    r3261056 r3261550  
    4242
    4343    public function enqueue_styles() {
    44         wp_enqueue_style( $this->plugin_name,
    45             plugin_dir_url( __FILE__ ) . 'css/admin.css?v=1233',
    46             array(),
    47             time(),
    48             'all' );
    49         wp_enqueue_style( $this->plugin_name . '-dashboard',
    50             plugin_dir_url( __FILE__ ) . 'css/dashboard.css',
    51             array(),
    52             $this->version,
    53             'all' );
     44
     45        $screen = get_current_screen();
     46        if (strpos($screen->id, 'wpironis-plugin') !== false) {
     47            wp_enqueue_style( $this->plugin_name,
     48                plugin_dir_url( __FILE__ ) . 'css/admin.css?v=1233',
     49                array(),
     50                time(),
     51                'all' );
     52            wp_enqueue_style( $this->plugin_name . '-dashboard',
     53                plugin_dir_url( __FILE__ ) . 'css/dashboard.css',
     54                array(),
     55                $this->version,
     56                'all' );
     57        }
    5458    }
    5559
     
    7074        $admin_js_file     = plugin_dir_path( __FILE__ ) . 'js/iron-security-admin.js';
    7175        $dashboard_js_file = plugin_dir_path( __FILE__ ) . 'js/dist/dashboard.bundle.js';
     76        $screen = get_current_screen();
     77
    7278
    7379        wp_enqueue_script(
     
    102108        }
    103109
    104         wp_enqueue_script(
    105             $this->plugin_name . '-dashboard',
    106             plugin_dir_url( __FILE__ ) . 'js/dist/dashboard.bundle.js?v=' . $this->version,
    107             array( 'wp-element', 'wp-components', 'wp-i18n' ),
    108             $this->version,
    109             true
    110         );
     110        if (strpos($screen->id, 'wpironis-plugin') !== false) {
     111            wp_enqueue_script(
     112                $this->plugin_name . '-dashboard',
     113                plugin_dir_url( __FILE__ ) . 'js/dist/dashboard.bundle.js?v=' . $this->version,
     114                array( 'wp-element', 'wp-components', 'wp-i18n' ),
     115                $this->version,
     116                true
     117            );
     118        }
    111119
    112120        $settings_data = array(
     
    24132421     */
    24142422    public function wpironis_filter_rest_user_responses( $response, $handler, $request ) {
    2415         // Only process successful responses for user endpoints that could modify roles
    2416         if ( is_wp_error( $response ) || $response->get_status() >= 400 ) {
     2423       
     2424        if (is_wp_error( $response ) ||
     2425            (is_array( $response ) && !is_object( $response )) ||
     2426            (is_object( $response ) && method_exists( $response, 'get_status' ) && $response->get_status() >= 400)) {
    24172427            return $response;
    24182428        }
  • iron-security/tags/2.2.4/iron-security.php

    r3261059 r3261550  
    1717 * Plugin URI:        https://wpiron.com
    1818 * Description:       Iron Security is a powerful WordPress security plugin to protect your site from common threats. Lock down your site with login protection, file security, and HTTP headers — all in one lightweight plugin.
    19  * Version:           2.2.3
     19 * Version:           2.2.4
    2020 * Author:            wpiron
    2121 * Author URI:        https://wpiron.com/
     
    3131}
    3232
    33 define( 'IRON_SECURITY_VERSION', '2.2.3' );
     33define( 'IRON_SECURITY_VERSION', '2.2.4' );
    3434
    3535function wpiisec_activate_iron_security() {
  • iron-security/trunk/README.txt

    r3261059 r3261550  
    55Requires at least: 4.7
    66Tested up to: 6.7
    7 Stable tag: 2.2.3
     7Stable tag: 2.2.4
    88Requires PHP: 7.0
    99License: GPLv2 or later
     
    112112== Changelog ==
    113113
     114= 2.2.4 =
     115* Fixed Fatal Error when editing pages
     116* Fixed styling issues with whole admin panel
     117
    114118= 2.2.3 =
    115119* Fixed Readme
  • iron-security/trunk/admin/class-iron-security-admin.php

    r3261056 r3261550  
    4242
    4343    public function enqueue_styles() {
    44         wp_enqueue_style( $this->plugin_name,
    45             plugin_dir_url( __FILE__ ) . 'css/admin.css?v=1233',
    46             array(),
    47             time(),
    48             'all' );
    49         wp_enqueue_style( $this->plugin_name . '-dashboard',
    50             plugin_dir_url( __FILE__ ) . 'css/dashboard.css',
    51             array(),
    52             $this->version,
    53             'all' );
     44
     45        $screen = get_current_screen();
     46        if (strpos($screen->id, 'wpironis-plugin') !== false) {
     47            wp_enqueue_style( $this->plugin_name,
     48                plugin_dir_url( __FILE__ ) . 'css/admin.css?v=1233',
     49                array(),
     50                time(),
     51                'all' );
     52            wp_enqueue_style( $this->plugin_name . '-dashboard',
     53                plugin_dir_url( __FILE__ ) . 'css/dashboard.css',
     54                array(),
     55                $this->version,
     56                'all' );
     57        }
    5458    }
    5559
     
    7074        $admin_js_file     = plugin_dir_path( __FILE__ ) . 'js/iron-security-admin.js';
    7175        $dashboard_js_file = plugin_dir_path( __FILE__ ) . 'js/dist/dashboard.bundle.js';
     76        $screen = get_current_screen();
     77
    7278
    7379        wp_enqueue_script(
     
    102108        }
    103109
    104         wp_enqueue_script(
    105             $this->plugin_name . '-dashboard',
    106             plugin_dir_url( __FILE__ ) . 'js/dist/dashboard.bundle.js?v=' . $this->version,
    107             array( 'wp-element', 'wp-components', 'wp-i18n' ),
    108             $this->version,
    109             true
    110         );
     110        if (strpos($screen->id, 'wpironis-plugin') !== false) {
     111            wp_enqueue_script(
     112                $this->plugin_name . '-dashboard',
     113                plugin_dir_url( __FILE__ ) . 'js/dist/dashboard.bundle.js?v=' . $this->version,
     114                array( 'wp-element', 'wp-components', 'wp-i18n' ),
     115                $this->version,
     116                true
     117            );
     118        }
    111119
    112120        $settings_data = array(
     
    24132421     */
    24142422    public function wpironis_filter_rest_user_responses( $response, $handler, $request ) {
    2415         // Only process successful responses for user endpoints that could modify roles
    2416         if ( is_wp_error( $response ) || $response->get_status() >= 400 ) {
     2423       
     2424        if (is_wp_error( $response ) ||
     2425            (is_array( $response ) && !is_object( $response )) ||
     2426            (is_object( $response ) && method_exists( $response, 'get_status' ) && $response->get_status() >= 400)) {
    24172427            return $response;
    24182428        }
  • iron-security/trunk/iron-security.php

    r3261059 r3261550  
    1717 * Plugin URI:        https://wpiron.com
    1818 * Description:       Iron Security is a powerful WordPress security plugin to protect your site from common threats. Lock down your site with login protection, file security, and HTTP headers — all in one lightweight plugin.
    19  * Version:           2.2.3
     19 * Version:           2.2.4
    2020 * Author:            wpiron
    2121 * Author URI:        https://wpiron.com/
     
    3131}
    3232
    33 define( 'IRON_SECURITY_VERSION', '2.2.3' );
     33define( 'IRON_SECURITY_VERSION', '2.2.4' );
    3434
    3535function wpiisec_activate_iron_security() {
Note: See TracChangeset for help on using the changeset viewer.