Plugin Directory

Changeset 1765396


Ignore:
Timestamp:
11/13/2017 07:51:40 PM (8 years ago)
Author:
Moisture
Message:

Fix script loading on post-new.php

File:
1 edited

Legend:

Unmodified
Added
Removed
  • am-events/trunk/am-events.php

    r1765386 r1765396  
    290290function am_custom_script_post($hook) {
    291291    global $post;
    292     if ('post.php' != $hook || !is_admin() || $post->post_type !== 'am_event') {
     292   
     293    if (!('post-new.php' == $hook || 'post.php' == $hook)) {
     294        return;
     295    }
     296   
     297    if ( !is_admin() || $post->post_type !== 'am_event') {
    293298        return;
    294299    }
Note: See TracChangeset for help on using the changeset viewer.