fix: add separate prod/dev cache-busters
This commit is contained in:
parent
35d8b82008
commit
e76a4e0bb1
2 changed files with 11 additions and 32 deletions
|
@ -211,34 +211,17 @@ abstract class MCI_Footnotes_Layout_Engine {
|
||||||
* automated update of version number for cache busting.
|
* automated update of version number for cache busting.
|
||||||
* No need to use '-styles' in the handle, as '-css' is appended automatically.
|
* No need to use '-styles' in the handle, as '-css' is appended automatically.
|
||||||
*/
|
*/
|
||||||
if ( C_BOOL_CSS_PRODUCTION_MODE ) {
|
|
||||||
|
|
||||||
wp_register_style(
|
wp_register_style(
|
||||||
'mci-footnotes-admin',
|
'mci-footnotes-admin',
|
||||||
plugins_url( 'footnotes/css/settings.min.css' ),
|
plugins_url( 'footnotes/css/settings' . ( ( C_BOOL_CSS_PRODUCTION_MODE ) ? '.min' : '' ) . '.css' ),
|
||||||
array(),
|
array(),
|
||||||
filemtime(
|
( C_BOOL_CSS_PRODUCTION_MODE ) ? C_STR_PACKAGE_VERSION : filemtime(
|
||||||
plugin_dir_path(
|
plugin_dir_path(
|
||||||
dirname( __FILE__ )
|
dirname( __FILE__ )
|
||||||
) . 'css/settings.min.css'
|
) . 'css/settings' . ( ( C_BOOL_CSS_PRODUCTION_MODE ) ? '.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_enqueue_style( 'mci-footnotes-admin' );
|
wp_enqueue_style( 'mci-footnotes-admin' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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'
|
MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/footnotes-' . $l_str_tooltip_mode_short . 'brpl' . $l_str_layout_mode . '.min.css'
|
||||||
),
|
),
|
||||||
array(),
|
array(),
|
||||||
filemtime(
|
C_STR_PACKAGE_VERSION,
|
||||||
plugin_dir_path(
|
|
||||||
dirname( __FILE__ )
|
|
||||||
) . 'css/footnotes-' . $l_str_tooltip_mode_short . 'ttbrpl' . $l_str_layout_mode . '.min.css'
|
|
||||||
),
|
|
||||||
'all'
|
'all'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Reference in a new issue