How to get a custom page through plugin?

You can use wp_insert_post for creating the page. <?php $content=”<Sign up form content>”; wp_insert_post(array( ‘post_title’ => ‘My page’, ‘post_content’ => $content, ‘post_type’ => ‘page’, //VERY IMPORTANT ‘post_status’ => ‘publish/draft’ )); Check it.

Extend a plugin to include a widget option

A widget is a PHP object that echoes string data to STDOUT when its widget() method is called. — WordPress Widgets API To create the widget you have to extend the WP_Widget class with your widget class. You use the class name in the register_widget function. class Foo_Widget extends WP_Widget { //Class methods here } … Read more

Developing plugin, where to place action hooks etc?

You do it like in your first example // Shortcodes.php file function myplugin_shortcode( $atts ) { if ( !empty ($atts) ) { foreach ( $atts as $key => &$val ) { $val = html_entity_decode($val); } } myplugin_display_items( $atts ); } // Register shortcodes add_shortcode( ‘output-items’, ‘myplugin_shortcode’);

How to restrict a plugin from certain pages without editing its core

I would approach as follows: Identify all the action/filter hooks in the plugin Identify all scripts/styles being enqueued. Create a function that removes the actions/filters based on the page using remove_action, remove_filter, wp_deregister_style, wp_deregister_script You could use something like the following: function foo_disable_plugin(){ if(is_page(‘PAGE_TITLE OR ID’)){ remove_filter(‘the_content’, ‘PLUGIN_FILTER_NAME’); remove_action(‘wp_head’, ‘PLUGIN_ACTION_NAME’); wp_deregister_script(‘PLUGIN_SCRIPT_NAME’); } } add_action(‘template_redirect’, ‘foo_disable_plugin’, … Read more