| @@ -1,19 +1,24 @@ | ||
| 1 | 1 | <?php |
| 2 | -defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' ); | |
| 2 | +use Imagify\Notices\Notices; | |
| 3 | 3 | |
| 4 | -$this->print_template( 'notice-header', array( | |
| 5 | - 'classes' => array( 'error' ), | |
| 6 | -) ); | |
| 4 | +defined( 'ABSPATH' ) || exit; | |
| 5 | + | |
| 6 | +$this->print_template( | |
| 7 | + 'notice-header', | |
| 8 | + [ | |
| 9 | + 'classes' => [ 'error' ], | |
| 10 | + ] | |
| 11 | +); | |
| 7 | 12 | ?> |
| 8 | -<p><?php echo _n( 'The following plugin is not compatible with this plugin and may cause unexpected results:', 'The following plugins are not compatible with this plugin and may cause unexpected results:', count( $data ), 'imagify' ); ?></p> | |
| 13 | +<p><?php echo esc_html( _n( 'The following plugin is not compatible with this plugin and may cause unexpected results:', 'The following plugins are not compatible with this plugin and may cause unexpected results:', count( $data ), 'imagify' ) ); ?></p> | |
| 9 | 14 | |
| 10 | 15 | <ul class="imagify-plugins-error"> |
| 11 | 16 | <?php |
| 12 | -foreach ( $data as $plugin ) { | |
| 13 | - $plugin_data = get_plugin_data( WP_PLUGIN_DIR . DIRECTORY_SEPARATOR . $plugin ); | |
| 14 | - $deactivate_url = esc_url( wp_nonce_url( admin_url( 'admin-post.php?action=imagify_deactivate_plugin&plugin=' . rawurlencode( $plugin ) ), Imagify_Notices::DEACTIVATE_PLUGIN_NONCE_ACTION ) ); | |
| 15 | - echo '<li>' . $plugin_data['Name'] . '</span> <a href="' . $deactivate_url . '" class="button button-mini alignright">' . __( 'Deactivate', 'imagify' ) . '</a></li>'; | |
| 17 | +foreach ( $data as $plugin_name ) { | |
| 18 | + $plugin_data = get_plugin_data( WP_PLUGIN_DIR . DIRECTORY_SEPARATOR . $plugin_name ); | |
| 19 | + $deactivate_url = wp_nonce_url( admin_url( 'admin-post.php?action=imagify_deactivate_plugin&plugin=' . rawurlencode( $plugin_name ) ), Notices::DEACTIVATE_PLUGIN_NONCE_ACTION ); | |
| 20 | + echo '<li>' . esc_html( $plugin_data['Name'] ) . '</span> <a href="' . esc_url( $deactivate_url ) . '" class="button button-mini alignright">' . esc_html__( 'Deactivate', 'imagify' ) . '</a></li>'; | |
| 16 | 21 | } |
| 17 | 22 | ?> |
| 18 | 23 | </ul> |
| 19 | 24 | <?php |