Hook into 'admin_footer-post-new.php'
and 'admin_footer-post.php'
, check the global variable $post_type
:
add_action( 'admin_footer-post-new.php', 'wpse_73692_script' );
add_action( 'admin_footer-post.php', 'wpse_73692_script' );
function wpse_73692_script()
{
if ( 'post' !== $GLOBALS['post_type'] )
return;
?>
<script>alert( '<?php echo $GLOBALS['post_type'];?>' );</script>
<?php
}
Related Posts:
- How to load css in the footer [duplicate]
- wp_enqueue script my_javascript_file in the footer
- Hook for writing text string after footer scripts
- Wp_head and wp_footer vs wp_enqueue_script javascript files?
- How do I enqueue a JavaScript in my footer via the functions.php file?
- Getting wp_footer() to work without wp_head()
- JavaScript enque stopped working
- How Do I Enqueue a Script into 2 different Footers on the Same Site?
- wp enqueue inline script due to dependancies
- How do I dequeue a parent theme’s CSS file?
- Check if a script/style was enqueued/registered
- Is it possible to use wp_localize_script to create global JS variables without a specific script handle?
- How can I enqueue protocol relative external (//ajax.googleapis.com/…) scripts?
- Can’t enqueue scripts in the footer?
- How can I remove the site URL from enqueued scripts and styles?
- wp enqueue script using scripts from cdn with a safety callback
- Can I add styles to footer with $wp_styles->add_data?
- Protocol neutral URLS with wp_enqueue_script (SSL issues)?
- Enqueue script in specific page
- How to en-queue bootstrap 4 to theme?
- Notice that the wp_enqueue_style is not being called correctly!
- Is it safe/recommended to use wp_enqueue_script function outside the functions.php file?
- Hyphens vs. periods in the script slug in wp_register_script?
- Is This The Most Efficient Way To Add Javascript Files?
- Why does this line of code make photo albums appear?
- Trying to load different syles for 404.php page
- Enqueue Script with URL parameters
- What determines the order of enqueued styles?
- How to use wp_enqueue_style() and wp_enqueue_script() only when needed?
- Preload key requests using wp_enqueue
- Remove specific CSS and JS from the head
- Which are the MediaElement.js scripts to enqueue
- Child Theme – what is the scope of overwriting files?
- Best spot for wp_register_script() and wp_register_style()
- Register script/style: Is it possible to customize the version query string via plugin?
- Help with enqueing scripts in footer after init action
- Enqueue AWS Script
- Adding custom fonts (local) to WordPress?
- wp_enqueue_script order – external vs inline js
- Dequeuing scripts for all pages but the home page
- Which jQueryUI handles are predefined in wordpress?
- Modernizr check first, then move on to wp_register_script()/wp_enqueue_script
- Deregister scripts on unnecessary pages using remove_action
- Prioritizing wp enqueue scripts error
- wp_enqueue and Dependencies
- How do you enqueue a Visual Basic script using wp_enqueue_script?
- Why are files enqueued with wp_enqueue_style and wp_enqueue_script 404 Not Found?
- enqueue admin styling and scripts only on plugin page
- How to place script in footer?
- Can’t see why my scripts aren’t loading when I register and enqueue them
- jquery-ui-autocomplete is not loaded with wp_enqueue_script
- wp_enqueue_script Doesn’t Work?
- wp localizing script not works
- WordPress script file version numbers changing in live environment
- Is It Possible to add JS AFTER the Enqueue within the same Function?
- How can I manually enqueue plugin scripts
- How to enqueue JavaScript file that depends on CSS stylesheet
- How can I properly enqueue wp-hooks without issues?
- Enqueue customizer scripts that are bundled by webpack?
- Adding multiple wp_register_scripts for templates in WordPres?
- wp enqueue, how to prevent duplication when same script is registered with different handles
- Localizing script to pass a value to a javascript function
- Dequeue script conditonnally
- How do I get jQuery to Load before Bootstrap?
- Help to enqueue a js functions ( jquery) [closed]
- Conditionally load script depending on current admin page
- How can I integrate Fancybox 3 in WordPress properly
- How to enqueue default scripts with dependency?
- Enqueuing a script before anything else
- Should I use get_bloginfo(‘stylesheet_directory’) or get_stylesheet_directory_uri() when enqueueing my js files?
- call my script only after loading UI library?
- All of my Scripts and Enques are getting file not found
- If a Script has been enqueued but not registered can I still removed it?
- how to load css and js based on post template
- How to use wp_register_script / wp_enqueue_script for multiple queries
- link to JS library using wp_enqueue_scripts not working
- Using wp_enqueue_script on scripts that contain PHP
- Enqueue specific script on account creation (and never again)
- scripts not loading
- Proper enqueue for child theme functions.php
- Issues with wp_enqueue_script and jquery-ui
- loading javascript CDN with local fallback (not jQuery)
- wp_localize_script & wp_enqueue_script not working in front end
- Dynamic wp_enqueue_scripts?
- Why do I have to specify all parameters for wp_enqueue_script to load my jquery in the footer? [closed]
- Load scripts only for selected template
- Moving Javascript from footer to header
- wp_enqueue_script error with `ID`, `post_title`, `post_name` of none object
- WordPress – enqueue js issue – page broken, no error
- Enqueue script with version number not working
- How to enqueue a script on a specific URL that contains multiple parts
- wp_enqueue_script silently fails [closed]
- correct path for enqueue script in WordPress
- map enqueue in backend
- How to get, in WP page’s script, a wp enqueued script (in Functions.php)?
- Most optimal way of starting fresh, without using other theme or dropping old files?
- Bootstrap sticky menu in WordPress
- Should I use wp_register_style(), wp_enqueue_style, or both?
- comment-reply.js is not loading
- How can I specifically enqueue scripts for edit orders pages only