Advertisement
Guest User

Create Settings Page For Plugin Options

a guest
Dec 18th, 2012
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.90 KB | None | 0 0
  1. <?php
  2. //Add Plugin Settings Page
  3. add_action( 'admin_menu', 'wpsites_plugin_menu' );
  4.  
  5. function wpsites_plugin_menu() {
  6.     add_options_page( 'wpsites Plugin Options', 'Fonts', 'manage_options', 'wpsites-unique-identifier', 'wpsites_plugin_options' );
  7. }
  8.  
  9. function wpsites_plugin_options() {
  10.     if ( !current_user_can( 'manage_options' ) )  {
  11.         wp_die( __( 'You do not have sufficient permissions to access this page.' ) );
  12.     }
  13.     echo '<div class="wrap">';
  14.     echo '<p><h1>Wanna learn the basics of WordPress Plugin Development?</h1><p><a href="http://feeds.feedburner.com/wpsitesdotnet" rel="alternate" type="application/rss+xml"><img src="http://www.feedburner.com/fb/images/pub/feed-icon16x16.png" alt="" style="vertical-align:middle;border:0"/></a>&nbsp;<a href="http://feeds.feedburner.com/wpsitesdotnet" rel="alternate" type="application/rss+xml">Learn The Basics Of Plugin Development</a></p>';
  15.     echo '</div>';
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement