Skip to content
Permalink
Browse files

Security pass, removed unused single.php file

  • Loading branch information...
MJGrant committed Jun 24, 2019
1 parent 4eac34b commit 6f95ae89ba61c8546fc8a63b6682786d24bbe61b
@@ -8,6 +8,8 @@
* Author URI: http://majoh.dev
*/
defined( 'ABSPATH' ) OR exit;
add_action( 'init', function() {
include dirname( __FILE__ ) . '/includes/class-amazin-product-box-admin-menu.php';
include dirname( __FILE__ ) . '/includes/class-amazin-product-box-list-table.php';
@@ -1,7 +1,8 @@
<?php
defined( 'ABSPATH' ) OR exit;
/**
* Get all product box
* Get all product boxes
*
* @param $args array
*
@@ -1,4 +1,5 @@
<?php
defined( 'ABSPATH' ) OR exit;
/**
* Admin Menu
@@ -1,4 +1,5 @@
<?php
defined( 'ABSPATH' ) OR exit;
if ( ! class_exists ( 'WP_List_Table' ) ) {
require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php';
@@ -1,4 +1,5 @@
<?php
defined( 'ABSPATH' ) OR exit;
/**
* Handle the form submissions
@@ -26,11 +27,11 @@ public function handle_form() {
}
if ( ! wp_verify_nonce( $_POST['_wpnonce'], '' ) ) {
die( __( 'Are you cheating?', 'apb' ) );
die( __( 'Security check failed.', 'apb' ) );
}
if ( ! current_user_can( 'read' ) ) {
wp_die( __( 'Permission Denied!', 'apb' ) );
wp_die( __( 'Permission denied!', 'apb' ) );
}
$errors = array();
@@ -1,3 +1,7 @@
<?php
defined( 'ABSPATH' ) OR exit;
?>

<div class="wrap">
<h1><?php _e( 'Edit Product Box', 'apb' ); ?></h1>

@@ -1,3 +1,7 @@
<?php
defined( 'ABSPATH' ) OR exit;
?>

<div class="wrap">
<h2><?php _e( 'Amazin\' Product Boxes', 'apb' ); ?> <a href="<?php echo admin_url( 'admin.php?page=amazinProductBox&action=new' ); ?>" class="add-new-h2"><?php _e( 'Add New', 'apb' ); ?></a></h2>
<div class="notice notice-info not-dismissible">
@@ -52,6 +56,6 @@
</tr>
</tbody>
</table>
<?php submit_button(); ?>
<?php submit_button(); ?>
</form>
</div>
@@ -1,3 +1,7 @@
<?php
defined( 'ABSPATH' ) OR exit;
?>

<div class="wrap">
<h1><?php _e( 'Add new Product Box', 'apb' ); ?></h1>

This file was deleted.

@@ -4,6 +4,11 @@
die;
}
defined( 'ABSPATH' ) OR exit;
if ( ! current_user_can( 'activate_plugins' ) )
return;
$option_names = array('amazin_product_box_option_headline', 'amazin_product_box_option_new_tab');
foreach ($option_names as $option_name) {
delete_option($option_name);

0 comments on commit 6f95ae8

Please sign in to comment.
You can’t perform that action at this time.