Skip to content
Permalink
Browse files

Plugin now has a button in the admin menu and some placeholder text f…

…or its page
  • Loading branch information...
MJGrant committed Jun 8, 2019
1 parent e6d3ef6 commit 22f6aa5d2dad3dee35de477efdcdf97b40de8c35
Showing with 23 additions and 0 deletions.
  1. +23 −0 amazin-product-box/amazin-product-box.php
@@ -7,3 +7,26 @@
* Author: Mandi Grant
* Author URI: http://majoh.dev
*/
if ( is_admin() ){ // admin actions
add_action( 'admin_menu', 'amazin_plugin_menu' );
} else {
// non-admin enqueues, actions, and filters
}
function amazin_plugin_menu() {
add_menu_page( 'Amazin\' Product Box Management', 'Amazin\' Product Box', 'manage_options', 'amazin-product-box', 'amazin_display_management_page' );
}
/** Step 3. */
function amazin_display_management_page() {
if ( !current_user_can( 'manage_options' ) ) {
wp_die( __( 'You do not have sufficient permissions to access this page.' ) );
}
echo '<div class="wrap">';
echo '<h2>Amazin\' Product Box</h2>';
echo '<p>Create, edit, delete and manage your product boxes here.</p>';
echo '</div>';
}
?>

0 comments on commit 22f6aa5

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