• WP_PLUGIN_URL is used in events-manager.php and admin/em-admin.php (EM 4.14) for loading some scripts, but WP_PLUGIN_URL isn’t https aware (Determining_Plugin_and_Content_Directories), plugins_url() should be used instead.

    Here are the diffs:
    events-manager.php

    179c179
    < 	wp_enqueue_script('events-manager', WP_PLUGIN_URL.'/events-manager/includes/js/events-manager.js', array('jquery', 'jquery-ui-core','jquery-ui-widget','jquery-ui-position')); //jQuery will load as dependency
    ---
    > 	wp_enqueue_script('events-manager', plugins_url('/events-manager/includes/js/events-manager.js', __FILE__), array('jquery', 'jquery-ui-core','jquery-ui-widget','jquery-ui-position')); //jQuery will load as dependency

    admin/em-admin.php

    145,146c145,146
    < 	//wp_enqueue_script('em-ui-js', WP_PLUGIN_URL.'/events-manager/includes/js/jquery-ui-1.8.5.custom.min.js', array('jquery', 'jquery-ui-core'));
    < 	wp_enqueue_script('events-manager', WP_PLUGIN_URL.'/events-manager/includes/js/events-manager.js', array('jquery', 'jquery-ui-core','jquery-ui-widget','jquery-ui-position'));
    ---
    > 	//wp_enqueue_script('em-ui-js', plugins_url('/events-manager/includes/js/jquery-ui-1.8.5.custom.min.js', __FILE__), array('jquery', 'jquery-ui-core'));
    > 	wp_enqueue_script('events-manager', plugins_url('/events-manager/includes/js/events-manager.js', __FILE__), array('jquery', 'jquery-ui-core','jquery-ui-widget','jquery-ui-position'));
    149c149
    < 	wp_enqueue_script('em-timeentry', WP_PLUGIN_URL.'/events-manager/includes/js/timeentry/jquery.timeentry.js', array('jquery'));
    ---
    > 	wp_enqueue_script('em-timeentry', plugins_url('/events-manager/includes/js/timeentry/jquery.timeentry.js', __FILE__), array('jquery'));

    http://wordpress.org/extend/plugins/events-manager/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter mitakas

    (@mitakas)

    My bad, should be:

    events-manager.php

    179c179
    < 	wp_enqueue_script('events-manager', WP_PLUGIN_URL.'/events-manager/includes/js/events-manager.js', array('jquery', 'jquery-ui-core','jquery-ui-widget','jquery-ui-position')); //jQuery will load as dependency
    ---
    > 	wp_enqueue_script('events-manager', plugins_url('/includes/js/events-manager.js', __FILE__), array('jquery', 'jquery-ui-core','jquery-ui-widget','jquery-ui-position')); //jQuery will load as dependency

    admin/em-admin.php

    145,146c145,146
    < 	//wp_enqueue_script('em-ui-js', WP_PLUGIN_URL.'/events-manager/includes/js/jquery-ui-1.8.5.custom.min.js', array('jquery', 'jquery-ui-core'));
    < 	wp_enqueue_script('events-manager', WP_PLUGIN_URL.'/events-manager/includes/js/events-manager.js', array('jquery', 'jquery-ui-core','jquery-ui-widget','jquery-ui-position'));
    ---
    > 	//wp_enqueue_script('em-ui-js', plugins_url('/includes/js/jquery-ui-1.8.5.custom.min.js', dirname(__FILE__)), array('jquery', 'jquery-ui-core'));
    > 	wp_enqueue_script('events-manager', plugins_url('/includes/js/events-manager.js', dirname(__FILE__)), array('jquery', 'jquery-ui-core','jquery-ui-widget','jquery-ui-position'));
    149c149
    < 	wp_enqueue_script('em-timeentry', WP_PLUGIN_URL.'/events-manager/includes/js/timeentry/jquery.timeentry.js', array('jquery'));
    ---
    > 	wp_enqueue_script('em-timeentry', plugins_url('/includes/js/timeentry/jquery.timeentry.js', dirname(__FILE__)), array('jquery'));

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    thanks, will make it into the next update, just released 4.15 now so just missed this update

    Thread Starter mitakas

    (@mitakas)

    In that case, here are some more diffs, this time I overlooked the css.

    events-manager.php

    181,182c181,182
    < 	wp_enqueue_style('em-ui-css', WP_PLUGIN_URL.'/events-manager/includes/css/jquery-ui-1.8.13.custom.css');
    < 	wp_enqueue_style('events-manager', WP_PLUGIN_URL.'/events-manager/includes/css/events_manager.css'); //main css
    ---
    > 	wp_enqueue_style('em-ui-css', plugins_url('/includes/css/jquery-ui-1.8.13.custom.css', __FILE__));
    > 	wp_enqueue_style('events-manager', plugins_url('/includes/css/events_manager.css', __FILE__)); //main css

    admin/em-admin.php

    173,174c173,174
    < 	wp_enqueue_style('em-ui-css', WP_PLUGIN_URL.'/events-manager/includes/css/jquery-ui-1.8.13.custom.css');
    < 	wp_enqueue_style('events-manager-admin', WP_PLUGIN_URL.'/events-manager/includes/css/events_manager_admin.css');
    ---
    > 	wp_enqueue_style('em-ui-css', plugins_url('/includes/css/jquery-ui-1.8.13.custom.css', dirname(__FILE__));
    > 	wp_enqueue_style('events-manager-admin', plugins_url('/includes/css/events_manager_admin.css', dirname(__FILE__));

    Thread Starter mitakas

    (@mitakas)

    As usual, each time I post, I forget things… (the closing brackets)
    admin/em-admin.php

    173,174c173,174
        < 	wp_enqueue_style('em-ui-css', WP_PLUGIN_URL.'/events-manager/includes/css/jquery-ui-1.8.13.custom.css');
        < 	wp_enqueue_style('events-manager-admin', WP_PLUGIN_URL.'/events-manager/includes/css/events_manager_admin.css');
        ---
        > 	wp_enqueue_style('em-ui-css', plugins_url('/includes/css/jquery-ui-1.8.13.custom.css', dirname(__FILE__)));
        > 	wp_enqueue_style('events-manager-admin', plugins_url('/includes/css/events_manager_admin.css', dirname(__FILE__)));

    Thread Starter mitakas

    (@mitakas)

    Hi,

    could you add my changes in the next update? WP_PLUGIN_URL just needs to be changed to plugins_url(). Thanks

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    done (update in the repo), although there’s a few more to change still

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: Events Manager] WP_PLUGIN_URL and https’ is closed to new replies.