/**
* Sets up the custom widget name etc
*/
public function __construct() {
// widget actual processes
}
/**
- Outputs the content of the custom widget
- @param array $args
- @param array $instance */ public function widget( $args, $instance ) { // outputs the content of the custom widget }
/**
- Outputs the options form on admin
- @param array $instance The custom widget options */ public function form( $instance ) { // outputs the options form on admin }
/**
- Processing custom widget options on save
- @param array $new_instance The new options
- @param array $old_instance The previous options
/
public function update( $new_instance, $old_instance ) {
// processes widget options to be saved
}
}
/ // Start by adding the following to your page where you want the widget to appear: //
// Create a new php file entitled custom-widget.php in your CHILD theme wp-content directory
Some background on this custom widget plugin and an example:
- Handling Wordpress API
- Todd and Clare {Search page custom widget plugin I submitted on Dating Registration Page}
- /*