Support » Plugins » Hacks » Creating A Plugin

  • Resolved corbins

    (@corbins)


    Hey all,

    I am an intermidant PHP programer and this is the first widget/plugin I have created for WordPress. I realize the plugin doesn’t do anything yet, I am just trying to get the wrapper working so I can write the core code.

    The problem I am having is pretty generic. I am able to install and activate the plugin, however, when I drag the widget into a side bar, the form appears for me to enter the settings. I enter the settings and hit save, and the settings remain in the fields.

    When I refresh the page though, the plugin disapears from the side bar list and has lost its configuration. Based on the code below, does anyone see the mistake I am making?

    Code: http://pastebin.com/93UfxvJN

    Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Is this a general error that happens when anything goes wrong, or is it specific to a method that must be overridden?

    After turning on error reporting, I got this error message after I saved the plugin’s config.

    Notice: Undefined index: sms_platform_keyword_checker_widget-2 in .../X.com/web/content/wp-admin/admin-ajax.php on line 1446

    Any ideas?

    open wp-config.php
    set to false

    define('WP_DEBUG', false );

    I figured out the error, it had to do with my form validation in the settings pannel. It was failing the initial validation because I never provided default data. Once I did, the problem resolved.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Creating A Plugin’ is closed to new replies.