jQuery in WordPress Plugin

You should place the .js file into your plugin directory (it can be root or any other folder like assets or js). To enqueue JS and CSS files in the front-end: function wp_357866_enqueue_frontend() { wp_enqueue_script(‘your-script’, get_template_directory_uri() . ‘/path/to/js/your-script.js’, array(), null, true); // You should set the last parameter to ‘true’ to load JS in the … Read more

Problems wp_insert_post and save_posts filter

you can check what post type is calling the ‘save_post’ action try: public function save() { global $post; if (!$post->post_type=”video”){ $my_child = array( ‘post_title’ => $this->_child_type, ‘post_content’ => “test content”, ‘post_status’ => ‘publish’, ‘post_type’ => “video”, ‘post_parent’=> 55 ); $nindex = wp_insert_post($my_child); } } add_action(‘save_post’, array(&$this, ‘save’));

Change the display of Settings API (do_settings_sections)

There are no hooks to modify the output of do_settings_sections(). Hence the only option you have is to write custom versions of the functions do_settings_sections() and do_settings_fields(). They are located in /wp-admin/includes/template.php, lines 1159-1174 and 1190-1207 (wordpress version 3.2.1), respectively (do not modify them there). You could (not saying it is necessarily advisable, consider compatibility … Read more