| @@ -92,12 +92,10 @@ | ||
| 92 | 92 | ); |
| 93 | 93 | $button_text = esc_html__( 'Activate Elementor', 'shopbuilder' ); |
| 94 | 94 | |
| 95 | 95 | } else { |
| 96 | - $activation_url = wp_nonce_url( | |
| 97 | - self_admin_url( 'update.php?action=install-plugin&plugin=elementor' ), | |
| 98 | - 'install-plugin_elementor' | |
| 99 | - ); | |
| 96 | + $activation_url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=elementor' ), | |
| 97 | + 'install-plugin_elementor' ); | |
| 100 | 98 | $message = sprintf( |
| 101 | 99 | '<strong>%s</strong> %s <strong>%s</strong> %s', |
| 102 | 100 | esc_html( self::PLUGIN_NAME ), |
| 103 | 101 | esc_html__( 'requires', 'shopbuilder' ), |
| @@ -128,10 +126,9 @@ | ||
| 128 | 126 | /** |
| 129 | 127 | * Admin Notice For Required PHP Version |
| 130 | 128 | */ |
| 131 | 129 | public function minimum_php_version() { |
| 132 | - // Protect plugin Activation with error. | |
| 133 | - if ( isset( $_GET['activate'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended | |
| 130 | + if ( isset( $_GET['activate'] ) ) { | |
| 134 | 131 | unset( $_GET['activate'] ); |
| 135 | 132 | } |
| 136 | 133 | $message = sprintf( |
| 137 | 134 | /* translators: 1: Plugin name 2: PHP 3: Required PHP version */ |
| @@ -139,9 +136,9 @@ | ||
| 139 | 136 | '<strong>' . esc_html__( 'ShopBuilder', 'shopbuilder' ) . '</strong>', |
| 140 | 137 | '<strong>' . esc_html__( 'PHP', 'shopbuilder' ) . '</strong>', |
| 141 | 138 | self::MINIMUM_PHP_VERSION |
| 142 | 139 | ); |
| 143 | - printf( '<div class="notice notice-warning is-dismissible"><p>%1$s</p></div>', wp_kses_post( $message ) ); | |
| 140 | + printf( '<div class="notice notice-warning is-dismissible"><p>%1$s</p></div>', $message ); | |
| 144 | 141 | } |
| 145 | 142 | |
| 146 | 143 | /** |
| 147 | 144 | * Adds admin notice. |
| @@ -149,12 +146,12 @@ | ||
| 149 | 146 | public function _missing_plugins_warning() { |
| 150 | 147 | $missingPlugins = ''; |
| 151 | 148 | $counter = 0; |
| 152 | 149 | foreach ( $this->missing as $plugin ) { |
| 153 | - $counter++; | |
| 154 | - if ( $counter == count( $this->missing ) ) { | |
| 150 | + $counter ++; | |
| 151 | + if ( $counter == sizeof( $this->missing ) ) { | |
| 155 | 152 | $sep = ''; |
| 156 | - } elseif ( $counter == count( $this->missing ) - 1 ) { | |
| 153 | + } elseif ( $counter == sizeof( $this->missing ) - 1 ) { | |
| 157 | 154 | $sep = ' ' . esc_html__( 'and', 'shopbuilder' ) . ' '; |
| 158 | 155 | } else { |
| 159 | 156 | $sep = ', '; |
| 160 | 157 | } |
| @@ -177,5 +174,7 @@ | ||
| 177 | 174 | $installed_plugins_list = get_plugins(); |
| 178 | 175 | |
| 179 | 176 | return isset( $installed_plugins_list[ $plugin_file_path ] ); |
| 180 | 177 | } |
| 178 | + | |
| 179 | + | |
| 181 | 180 | } |