Plugin Directory

Changeset 3250301


Ignore:
Timestamp:
03/04/2025 10:33:09 AM (13 months ago)
Author:
artemari
Message:

Fix Undefined array key 2 in file

Location:
cookie-notice-and-consent-banner/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cookie-notice-and-consent-banner/trunk/class-cncb-main.php

    r3237944 r3250301  
    33 * Plugin Name: Cookie Notice and Consent Banner
    44 * Description: Cookie Notice or Consent Banner as Required by Privacy Laws (GDPR & CCPA). Easily Customizable to Fit Your Design.
    5  * Version: 1.7.7
     5 * Version: 1.7.8
    66 * Author: GDPR
    77 * Author URI: https://gdprinfo.eu
     
    1616}
    1717
    18 define( 'CNCB_VERSION', '1.7.7' );
     18define( 'CNCB_VERSION', '1.7.8' );
    1919define( 'CNCB_PREFIX', 'cncb' );
    2020define( 'CNCB_PATH', trailingslashit( plugin_dir_path( __FILE__ ) ) );
  • cookie-notice-and-consent-banner/trunk/includes/admin/class-cncb-admin.php

    r2700054 r3250301  
    171171                esc_html__( 'Cookie Consent', 'cookie-notice-and-consent-banner' ),
    172172                esc_html__( 'Cookie Consent', 'cookie-notice-and-consent-banner' ),
    173                 'read',
     173                'manage_options',
    174174                $this->menu_slug,
    175175                array( $this, 'options_page' ),
     
    177177                $this->menu_pos
    178178            );
    179 
    180             add_submenu_page( 'cncb_options', '', '', 'manage_options', 'cncb_manage_options' );
    181             // phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited
    182             $submenu[ $this->menu_slug ][0][0] = esc_html__( 'Settings', 'cookie-notice-and-consent-banner' );
    183             // phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited
    184             $submenu[ $this->menu_slug ][1] = array( esc_html__( 'Customize Design', 'cookie-notice-and-consent-banner' ), 'manage_options', $this->get_customizer_panel_url() );
    185         }
     179     
     180      if (current_user_can('manage_options')) {
     181        add_submenu_page( 'cncb_options', '', '', 'manage_options', 'cncb_manage_options' );
     182           
     183        if (isset($submenu[$this->menu_slug])) {
     184          // phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited
     185          $submenu[ $this->menu_slug ][0][0] = esc_html__( 'Settings', 'cookie-notice-and-consent-banner' );
     186              // phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited
     187          $submenu[ $this->menu_slug ][1] = array( esc_html__( 'Customize Design', 'cookie-notice-and-consent-banner' ), 'manage_options', $this->get_customizer_panel_url() );
     188        }
     189      }
     190    }
    186191
    187192        /**
  • cookie-notice-and-consent-banner/trunk/readme.txt

    r3237944 r3250301  
    66Tags: Cookie, GDPR, CCPA, Compliance, Cookie Consent, Cookie Notice, Cookie banner, Privacy, Cookie Compliance, Law, Compliant
    77Requires at least: 5.0
    8 Tested up to: 6.7.1
     8Tested up to: 6.7.2
    99Stable tag: trunk
    1010License: GPLv2 or later
     
    3535
    3636== Changelog ==
     37= 1.7.8 - 4. MAR 2025 =
     38* Fix: Undefined array key 2 in file when user role is author or editor
     39
    3740= 1.7.7 - 10. FEB 2025 =
    3841* Fix: Issues with Dimensions & Space and Wizard sections
Note: See TracChangeset for help on using the changeset viewer.