You can just put the necessary javascript in a file and enqueue it on the necessary page:
add_action( 'admin_enqueue_scripts', 'add_admin_scripts', 10, 1 );
function add_admin_scripts( $hook ) {
//You can globalise $post here and enqueue the script for only certain post-types.
if ( $hook == 'post-new.php' || $hook == 'post.php') {
wp_register_script( 'my_js_handle','/path/to/js/my-js-file.js',array('jquery'),1,true);
wp_enqueue_script('my_js_handle');
}
}
With the javascript file containing:
jQuery(document).ready(function() {
jQuery('.postbox h3, .postbox .handlediv').unbind('click.postboxes');
});
(In, fact you could probably just ‘print’ it in the admin-footer).
Related Posts:
- WordPress: Sortable Metabox Fields Not Saving Position
- How to reload a select box of posts dynamically?
- Add X meta box inputs based on form at top of meta box, how to do it right?
- Disable collapse of admin meta boxes
- Script dependencies for post.js
- validate a metabox based on the category that is selected
- Edit single attachment on click (WP-admin)
- Hide metabox dependant on page template chosen
- Using WP_Query to grab custom meta values, foreach to json object
- Good Solution for Adding jQuery Tabs Anywhere Within WordPress?
- delete post meta by AJAX
- Adding URL of PDF from Thickbox in a Meta Box
- Why does my media selection script write to ONLY the first input field?
- Disable drag metaboxes, create many functions using js not to work!
- JQuery multiple toggle values
- Override default options in plugin metaboxes
- jQuery $(this) keyword
- JavaScript error (Uncaught SyntaxError: Unexpected end of input)
- Disable button in jQuery
- JavaScript error (Uncaught SyntaxError: Unexpected end of input)
- How can I get the ID of an element using jQuery?
- How do you select a particular option in a SELECT element in jQuery?
- Installing jQuery?
- Email validation using jQuery
- Wildcards in jQuery selectors
- jQuery: How can I create a simple overlay?
- Invalid or unexpected token on a very simple function
- XML Parsing Error: not well-formed in FireFox but good in Chrome
- jQuery get value of selected radio button
- How to make Bootstrap carousel slider use mobile left/right swipe
- How to use radio on change event?
- Adding a page loader using jQuery
- How to get mouse position in jQuery without mouse-events?
- Show div #id on click with jQuery
- How can I change CSS display none or block property using jQuery?
- Can you detect “dragging” in jQuery?
- Twitter Bootstrap Modal Form Submit
- AJAX call returns 0
- Automatically decrease font size for long words
- Custom function to rearrange attachments when creating posts – Almost there
- Extend 3.5 media uploader plugin to change button name
- Adding fields to the media uploader with jquery listeners
- wp_enqueue_script won’t load in header?
- Hide pages from google and visitors
- jQuery Hoverintent plugin in TwentyEleven Menu [closed]
- Cannot access elements of json object
- Script won’t execute in the media manager
- Basic ajax call in WordPress
- jQuery Validate wp_editor
- How do I setup nested repeatable option fields?
- What are best practices for including jquery plugins
- wp_enqueue_scripts hook is not being called
- How to enable the content editor as a droppable target with jQuery-ui?
- Enqueue Google CDN jQuery in Footer
- ‘jQuery is not defined Error’ appearing in load-scripts.php
- How to select the contents in the text view textrea in wp_editor?
- Override theme style with other CSS on a specific page
- Ajaxify calendar
- Problem with tables (huge data) on Word-press site
- start.js:45TypeError: Not enough arguments on Safari [closed]
- Vanderlee jQuery color picker and WordPress Errors
- Dropdown filtering extremely slow
- Fall Back Google CDN in JavaScript
- filterable portfolio with wordpress and jquery
- Trouble enqueueing jquery with custom theme
- WP-admin redirects to login after adding SSL certificate
- Dynamicaly update field created with wp_editor()
- I have an old version of jQuery showing up. How do I figure out where it is coming from?
- add custom HTML css with js doesn’t work
- How to change background image from WordPress Gallery
- Search input area autogrow – how?
- Populating shortcode values dynamically in theme template
- WordPress Rotating Background Images
- Trying to Load jQuery
- Jquery contact form to send mail to admin [closed]
- jQuery – Toggle megamenu submenu items by click
- General Settings: display custom plugin field after Site Address field
- Can user meta be shown or hidden depending on user logged in status?
- Screen Options JavaScript Code
- Is there some jQuery conflict here?
- Theme has superfish – how to add supersubs?
- How to modify iFrame content in an admin thickbox
- jquery bookmark links
- Storing current page WP list table HTML data into a PHP variable
- jQuery .html rendering [closed]
- bundled jquery in theme js not working with wp_localize_script
- jQuery not working for media uploader
- Adding text to links when not on the homepage
- how to remove/exclude html coding from json file while export?
- WordPress and Raty.js
- search in jquery mobile returns blank page
- owl carousel not working after ajax load [duplicate]
- Uncaught TypeError: undefined is not a function (shortcode-box)
- jquery not working correctly in plugin options page?
- Group posts by weekly or monthly
- How to read the contents of single post through RSS feed
- WordPress video end function [duplicate]
- jQuery cycle thumbnails?
- Generate dynamic ID’s for each accordion button
- Impossible to update jQuery version from 3.1.0