[resolved] My First WordPress Plugin (3 posts)

  1. tmhenson
    Posted 3 years ago #

    This is my first attempt at a wordPress plugin and I am having trouble getting the test options to appear in the dashboard

    Plugin Name: Dev Profile
    Plugin URI:
    Description: Description goes here
    Version: 0.1
    Author: Thomas Henson
    add_action( 'admin_menu', 'The Profile Picture' );
    function my_plugin_menu() {
    	add_options_page( 'Dev Profile', 'My Plugin', 'manage_options', 'my-unique-identifier', 'my_plugin_options' );
    function my_plugin_options() {
    	if ( !current_user_can( 'manage_options' ) )  {
    		wp_die( __( 'You do not have sufficient permissions to access this page.' ) );
    	echo '<div class="wrap">';
    	echo '<p>Here is where the form would go if I actually had options.</p>';
    	echo '</div>';
  2. What happens if you change the add_action line to

    add_action( 'admin_menu', 'my_plugin_menu' );

    It's looking for a function name there.

  3. tmhenson
    Posted 3 years ago #

    That worked thank you for your help.

Topic Closed

This topic has been closed to new replies.

About this Topic