diff options
Diffstat (limited to 'plugins/jetpack/modules/theme-tools/content-options/post-details.php')
-rw-r--r-- | plugins/jetpack/modules/theme-tools/content-options/post-details.php | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/plugins/jetpack/modules/theme-tools/content-options/post-details.php b/plugins/jetpack/modules/theme-tools/content-options/post-details.php index 7851a5be..b5f5c64a 100644 --- a/plugins/jetpack/modules/theme-tools/content-options/post-details.php +++ b/plugins/jetpack/modules/theme-tools/content-options/post-details.php @@ -40,6 +40,11 @@ function jetpack_post_details_enqueue_scripts() { $elements[] = $comment; } + // If the Elements array is empty, return without setting custom CSS. + if ( empty( $elements ) ) { + return; + } + // Get the list of classes. $elements = implode( ', ', $elements ); @@ -132,11 +137,11 @@ function jetpack_post_details_should_run() { return $void; } - $date_option = get_option( 'jetpack_content_post_details_date', 1 ); - $categories_option = get_option( 'jetpack_content_post_details_categories', 1 ); - $tags_option = get_option( 'jetpack_content_post_details_tags', 1 ); - $author_option = get_option( 'jetpack_content_post_details_author', 1 ); - $comment_option = get_option( 'jetpack_content_post_details_comment', 1 ); + $date_option = Jetpack_Options::get_option_and_ensure_autoload( 'jetpack_content_post_details_date', 1 ); + $categories_option = Jetpack_Options::get_option_and_ensure_autoload( 'jetpack_content_post_details_categories', 1 ); + $tags_option = Jetpack_Options::get_option_and_ensure_autoload( 'jetpack_content_post_details_tags', 1 ); + $author_option = Jetpack_Options::get_option_and_ensure_autoload( 'jetpack_content_post_details_author', 1 ); + $comment_option = Jetpack_Options::get_option_and_ensure_autoload( 'jetpack_content_post_details_comment', 1 ); $options = array( $date_option, $categories_option, $tags_option, $author_option, $comment_option ); $definied = array( $date, $categories, $tags, $author, $comment ); |