Removing plugin settings from database

WordPress has a function called register_deactivation_hook which registers a plugin function to be run when the plugin is deactivated, so: register_deactivation_hook( __FILE__, ‘myplugin_deactivate’ ); function myplugin_deactivate(){ //delete plugins option here ex: delete_option(‘pa_options’); } Update: Like One Trick Pony mentioned, sometimes users deactivate plugins and when they reactivate it they will loose all settings if you … Read more

How to create a custom category of wordpress admin

You might consider the idea of creating a custom post type called ticker. On the custom post type, add a custom field (input field) and store it as the value. Then one option would be to use code of this nature in your homepage template: <?php $args = array(     ‘numberposts’     => 5, // how many posts will be in the … Read more

Support for simultaneous editing

Short answer – no. Long answer – WordPress retrieves and stores info in the database. To pull and push that data live to multiple locations simultaneously would tax the vast majority of users’ servers beyond their capabilities (especially shared hosting). It does let you know when someone else is editing a page or post, but … Read more

PHP Fatal error: Call to undefined function plugin_basename

plugin_basename is a WordPress function that gets your plugins file name by simply passing it the directory. When you call $this->plugin_basename PHP is looking for a function plugin_basename defined within YOUR class. No function plugin_basename() in your class == PHP Fatal Error. If you simply want to define a variable that contains the plugins file … Read more