Last active
April 3, 2018 06:16
-
-
Save dcangulo/291e653958877053e7f5631a3762432c to your computer and use it in GitHub Desktop.
A WordPress plugin template that has an admin menu. Visit https://www.davidangulo.xyz/ for more information.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: My WordPress Plugin | |
Plugin URI: https://wordpress.org/plugins/ | |
Description: Just another WordPress plugin. | |
Version: 1.0.0 | |
Author: David Angulo | |
Author URI: https://www.davidangulo.xyz/ | |
*/ | |
add_action('admin_menu','addAdminPageContent'); | |
function addAdminPageContent() { | |
add_menu_page('My Plugin','My Plugin','manage_options',__FILE__,'adminPageContent','dashicons-wordpress'); | |
} | |
function adminPageContent() { | |
echo "<h2>My WordPress Plugin</h2>Hello world!"; | |
} | |
//Visit the tutorial for more information | |
//https://www.davidangulo.xyz/website-development/how-to-create-an-admin-page-for-your-wordpress-plugin/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment