diff --git a/public/app/themes/clarity/functions.php b/public/app/themes/clarity/functions.php index a970cb05b..6bf51e58b 100644 --- a/public/app/themes/clarity/functions.php +++ b/public/app/themes/clarity/functions.php @@ -131,9 +131,9 @@ */ // Log on document_serve -/*add_action('document_serve', function ($file, $post_id, $attach_id) { - error_log('CDPT_Debug: document_serve: ' . $file . ' ' . $post_id . ' ' . $attach_id); -}, 10, 3); +add_action('serve_document', function ( $post_id, $file ) { + error_log('CDPT_Debug: document_serve: ' . $post_id . ' ' . $file); +}, 10, 2); // Log on document_serve_done add_action('document_serve_done', function ($file, $attach_id ) { @@ -143,39 +143,39 @@ // Log on document edit add_action('document_edit', function () { error_log('CDPT_Debug: document_edit'); -}, 10); +}); // Log on document saved add_action('document_saved', function ($doc_id, $attach_id) { error_log('CDPT_Debug: document_saved: ' . $doc_id . ' ' . $attach_id); -}, 10, 2);*/ +}, 10, 2); // Log on attachment upload add_action('add_attachment', function ($attach_id) { error_log('CDPT_Debug: add_attachment: ' . $attach_id); -}, 10, 1); +}); // Log on edit post add_action('edit_post', function ($post_id) { error_log('CDPT_Debug: edit_post: ' . $post_id); -}, 10, 1); +}); // Log on post save add_action('save_post', function ($post_id) { error_log('CDPT_Debug: save_post: ' . $post_id); -}, 10, 1); +}); // Log on S3 upload - as3cf_post_upload_attachment add_action('as3cf_post_upload_attachment', function ($source_id, $item) { error_log('CDPT_Debug: as3cf_post_upload_attachment: ' . $source_id); -}, 10, 3); +}, 10, 2); // Log on as3cf_pre_upload_object -add_action('as3cf_pre_upload_object', function ($args) { +add_action('as3cf_pre_upload_object', function ($args, $file) { error_log('CDPT_Debug: as3cf_pre_upload_object'); -}, 10, 1); +}, 10, 2); // Log on as3cf_post_upload_item add_action('as3cf_post_upload_item', function ($item) { error_log('CDPT_Debug: as3cf_post_upload_item'); -}, 10, 1); +}); diff --git a/public/app/themes/clarity/inc/amazon-s3-and-cloudfront-assets.php b/public/app/themes/clarity/inc/amazon-s3-and-cloudfront-assets.php index 142609cd2..22673b994 100644 --- a/public/app/themes/clarity/inc/amazon-s3-and-cloudfront-assets.php +++ b/public/app/themes/clarity/inc/amazon-s3-and-cloudfront-assets.php @@ -202,8 +202,8 @@ public function rewriteSrc(string $src, string $handle): string } // Fonts cannot be served via the CDN, because browsers do not send cookies for `@font-face` requests. - // Exclude the core-css and style handles from being rewritten, because they use `@font-face`. - if (in_array($handle, ['core-css', 'style'])) { + // Exclude the core-css handle from being rewritten, because it uses `@font-face`. + if (in_array($handle, ['core-css'])) { return $src; } diff --git a/public/app/themes/clarity/inc/post-types/event.php b/public/app/themes/clarity/inc/post-types/event.php index 646a8e75c..d8c96541b 100644 --- a/public/app/themes/clarity/inc/post-types/event.php +++ b/public/app/themes/clarity/inc/post-types/event.php @@ -128,8 +128,8 @@ function mojintranet_sort_events($vars) // Delete `event_get_events_...` transients from the database, these are created in EventsHelper. function mojintranet_clear_events_cache() { - error_log('Clearing event cache.'); - + error_log('CDPT_Debug: Clearing event cache.'); + global $wpdb; $wpdb->query( "DELETE FROM `$wpdb->options` WHERE `option_name` LIKE ('_transient_event_get_events_%')" ); @@ -138,4 +138,6 @@ function mojintranet_clear_events_cache() { // As there is no function to clear cache by 'keys that start with', we have to flush the whole cache. wp_cache_flush(); } + + error_log('CDPT_Debug: Cleared event cache.'); } diff --git a/public/app/themes/clarity/src/globals/css/fonts.styl b/public/app/themes/clarity/src/globals/css/fonts.styl index 9e0b207bf..5def07492 100644 --- a/public/app/themes/clarity/src/globals/css/fonts.styl +++ b/public/app/themes/clarity/src/globals/css/fonts.styl @@ -10,3 +10,14 @@ src: url("../fonts/nta_bold.woff") format("woff"); font-weight: bold; } + +@font-face { + font-family: 'moji-clarity'; + src: url('../fonts/moji-clarity.eot?vklv4a'); + src: url('../fonts/moji-clarity.eot?vklv4a#iefix') format('embedded-opentype'), + url('../fonts/moji-clarity.ttf?vklv4a') format('truetype'), + url('../fonts/moji-clarity.woff?vklv4a') format('woff'), + url('../fonts/moji-clarity.svg?vklv4a#moji-clarity') format('svg'); + font-weight: normal; + font-style: normal; +} diff --git a/public/app/themes/clarity/src/globals/css/icons.styl b/public/app/themes/clarity/src/globals/css/icons.styl index def7ca8cd..5c5e4a1d4 100644 --- a/public/app/themes/clarity/src/globals/css/icons.styl +++ b/public/app/themes/clarity/src/globals/css/icons.styl @@ -1,14 +1,3 @@ -@font-face { - font-family: 'moji-clarity'; - src: url('../fonts/moji-clarity.eot?vklv4a'); - src: url('../fonts/moji-clarity.eot?vklv4a#iefix') format('embedded-opentype'), - url('../fonts/moji-clarity.ttf?vklv4a') format('truetype'), - url('../fonts/moji-clarity.woff?vklv4a') format('woff'), - url('../fonts/moji-clarity.svg?vklv4a#moji-clarity') format('svg'); - font-weight: normal; - font-style: normal; -} - .u-icon { /* use !important to prevent issues with browser extensions that change fonts */ font-family: 'moji-clarity' !important;