fix: add separate prod/dev cache-busters

This commit is contained in:
Ben Goldsworthy 2021-04-14 22:39:16 +01:00
parent 35d8b82008
commit e76a4e0bb1
2 changed files with 11 additions and 32 deletions

View file

@ -211,33 +211,16 @@ abstract class MCI_Footnotes_Layout_Engine {
* automated update of version number for cache busting.
* No need to use '-styles' in the handle, as '-css' is appended automatically.
*/
if ( C_BOOL_CSS_PRODUCTION_MODE ) {
wp_register_style(
'mci-footnotes-admin',
plugins_url( 'footnotes/css/settings.min.css' ),
array(),
filemtime(
plugin_dir_path(
dirname( __FILE__ )
) . 'css/settings.min.css'
)
);
} else {
wp_register_style(
'mci-footnotes-admin',
plugins_url( 'footnotes/css/settings.css' ),
array(),
filemtime(
plugin_dir_path(
dirname( __FILE__, 2 )
) . 'css/settings.css'
)
);
}
wp_register_style(
'mci-footnotes-admin',
plugins_url( 'footnotes/css/settings' . ( ( C_BOOL_CSS_PRODUCTION_MODE ) ? '.min' : '' ) . '.css' ),
array(),
( C_BOOL_CSS_PRODUCTION_MODE ) ? C_STR_PACKAGE_VERSION : filemtime(
plugin_dir_path(
dirname( __FILE__ )
) . 'css/settings' . ( ( C_BOOL_CSS_PRODUCTION_MODE ) ? '.min' : '' ) . '.css'
)
);
wp_enqueue_style( 'mci-footnotes-admin' );
}

View file

@ -416,11 +416,7 @@ class MCI_Footnotes {
MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/footnotes-' . $l_str_tooltip_mode_short . 'brpl' . $l_str_layout_mode . '.min.css'
),
array(),
filemtime(
plugin_dir_path(
dirname( __FILE__ )
) . 'css/footnotes-' . $l_str_tooltip_mode_short . 'ttbrpl' . $l_str_layout_mode . '.min.css'
),
C_STR_PACKAGE_VERSION,
'all'
);