[wp-trac] [WordPress Trac] #31636: 4.2-beta1 - PHP warning when enqueuing script on specific pages only
WordPress Trac
noreply at wordpress.org
Fri Mar 13 19:38:05 UTC 2015
#31636: 4.2-beta1 - PHP warning when enqueuing script on specific pages only
---------------------------+--------------------
Reporter: harmr | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.2
Component: Script Loader | Version: trunk
Severity: normal | Resolution:
Keywords: | Focuses:
---------------------------+--------------------
Comment (by harmr):
Thx! I changed my function to
{{{
function lmm_admin_enqueue_scripts_jquerydatepicker() {
$plugin_version = get_option('leafletmapsmarker_version');
wp_enqueue_script( array ( 'jquery', 'jquery-ui-tabs','jquery-ui-
datepicker' ) );
wp_enqueue_script( 'jquery-ui-timepicker-addon',
LEAFLET_PLUGIN_URL . 'inc/js/jquery-ui-timepicker-addon.js', array(
'jquery', 'jquery-ui-tabs', 'jquery-ui-datepicker', 'jquery-ui-slider' ),
$plugin_version );
}
}}}
but that did not eliminate the warning. Then I tried to apply the patch,
but I guess there is a bug in it - shouldnt it be
{{{
if ( ! is_array( $handle ) ) {
$_handle = explode( '?', $handle );
}
}}}
instead of
{{{
if ( ! is_array( $_handle ) ) {
$_handle = explode( '?', $handle );
}
}}}
(as this threw an error?)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31636#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list