March 12, 2017 at 6:51 am
Hi,
We’ve just purchased your software and I’m setting up a project for a client using version 4.9.33.p., with WP 4.7.2 & PHP5.6.
I’m having problems with the datepicker being completely unstyled, and I think I know why…
When the datepicker is added to a form, your EE_Datepicker_Input.php is used, which on line 36 has the following…
wp_register_style( 'espresso-ui-theme', EE_GLOBAL_ASSETS_URL . 'css/espresso-ui-theme/jquery-ui-1.10.3.custom.min.css', array(), EVENT_ESPRESSO_VERSION, TRUE );
As can be seen here (https://codex.wordpress.org/Function_Reference/wp_register_style), the final parameter to wp_register_style should be the media type string or nothing. Using TRUE causes the css output to be :
<link rel="stylesheet" id="espresso-ui-theme-css" href="/wp-content/plugins/event-espresso-core-reg/core/templates/global_assets/css/espresso-ui-theme/jquery-ui-1.10.3.custom.min.css?ver=4.9.33.p" type="text/css" media="1">
Of course media="1" is invalid, and so the css is not applied and the datepicker is completely unstyled.
Changing the wp_register_style calls last parameter to all (or simply removing it) fixes this and the styles are applied properly.
|