Wordpress Plugin Development
$wpdb global object interfaces with the database
register_activation_hook('file', 'function') -- hook to run on plugin activation
dbDelta($sql) -- utility function in wp-admin/includes/upgrade.php -- examines table structure and modifies it as necessary
Adding administrative menu:
- add_action('admin_menu', 'AddOptionsPage')
- AddOptionsPage function will call add_menu_page or any other administrative menu functions
- add_submenu_page to add submenu
- In the callback functions for the menus, check for the user permissions to access the page.
Settings API - processes the form semi automatically.
- add_settings_section
- add_settings_field
- register_settings_field
To trigger custom action when button is pressed: Create a form with action - admin_url('admin-post.php'), and hidden field called action set to value 'something-you-want', and add_action('something-you-want', 'function-you-want-to-call') - Detailed Explanation