-
-
Save andreiglingeanu/0bc7701c705fb5abfef9c9f6208080be to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action('blocksy:pro:content-blocks:pre-output', function ($id) { | |
if (is_admin() || ! $id) { | |
return; | |
} | |
$maybe_file_path = wp_upload_dir()[ | |
'basedir' | |
] . '/cwicly/css/cc-post-' . $id . '.css'; | |
if (file_exists($maybe_file_path)) { | |
wp_enqueue_style( | |
'cc-post-' . $id . '', | |
wp_upload_dir()['baseurl'] . '/cwicly/css/cc-post-' . $id . '.css', | |
[], | |
filemtime($maybe_file_path) | |
); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment