From a028fbd241f0def75e955acc2ef1c340a490c308 Mon Sep 17 00:00:00 2001 From: Alexander Agnarson Date: Thu, 6 Sep 2018 14:03:50 +0200 Subject: [PATCH] Multiple other required fixes --- archive.php | 6 ++-- footer.php | 4 +-- functions/js/post-formats.js | 44 -------------------------- functions/meta-boxes.php | 61 ++++++++---------------------------- inc/featured.php | 6 ++-- inc/page-image.php | 4 +-- inc/page-title.php | 6 ++-- light.css | 8 ++--- readme.txt | 26 ++++++++++++--- single.php | 2 +- style.css | 32 +++++++++++++------ 11 files changed, 73 insertions(+), 126 deletions(-) delete mode 100644 functions/js/post-formats.js diff --git a/archive.php b/archive.php index 2feb1e9..842e4b1 100644 --- a/archive.php +++ b/archive.php @@ -6,10 +6,8 @@
- -
- -
+ + ', '
' ); ?> diff --git a/footer.php b/footer.php index cbc3503..d62c579 100644 --- a/footer.php +++ b/footer.php @@ -66,14 +66,14 @@
- + diff --git a/functions/js/post-formats.js b/functions/js/post-formats.js deleted file mode 100644 index 6f7b953..0000000 --- a/functions/js/post-formats.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - post-formats.js - - License: GNU General Public License v3.0 - License URI: http://www.gnu.org/licenses/gpl-3.0.html - - Copyright: (c) 2013 Jermaine Maree, http://jermainemaree.com -*/ - -jQuery(document).ready(function($) { - - // Hide post format sections - function hide_statuses() { - $('#format-audio,#format-aside,#format-chat,#format-gallery,#format-image,#format-link,#format-quote,#format-status,#format-video').hide(); - } - - // Post Formats - if($("#post-formats-select").length) { - // Hide post format sections - hide_statuses(); - - // Supported post formats - var post_formats = ['audio','aside','chat','gallery','image','link','quote','status','video']; - - // Get selected post format - var selected_post_format = $("input[name='post_format']:checked").val(); - - // Show post format meta box - if(jQuery.inArray(selected_post_format,post_formats) != '-1') { - $('#format-'+selected_post_format).show(); - } - - // Hide/show post format meta box when option changed - $("input[name='post_format']:radio").change(function() { - // Hide post format sections - hide_statuses(); - // Shoe selected section - if(jQuery.inArray($(this).val(),post_formats) != '-1') { - $('#format-'+$(this).val()).show(); - } - }); - } - -}); \ No newline at end of file diff --git a/functions/meta-boxes.php b/functions/meta-boxes.php index aa55423..9eecf6a 100644 --- a/functions/meta-boxes.php +++ b/functions/meta-boxes.php @@ -1,21 +1,21 @@ 'page-options', 'title' => esc_html__( 'Page Options', 'typecore' ), @@ -59,7 +59,7 @@ function typecore_get_meta_box( $meta_boxes ) { ); /* Post options -/* ------------------------------------ */ +/* ------------------------------------ */ $meta_boxes[] = array( 'id' => 'post-options', 'title' => esc_html__( 'Post Options', 'typecore' ), @@ -103,42 +103,7 @@ function typecore_get_meta_box( $meta_boxes ) { ), ); -/* Format: audio -/* ------------------------------------ */ - $meta_boxes[] = array( - 'id' => 'format-audio', - 'title' => esc_html__( 'Format: Audio', 'typecore' ), - 'post_types' => array( 'post' ), - 'context' => 'advanced', - 'priority' => 'high', - 'autosave' => false, - 'fields' => array( - array( - 'id' => $prefix . 'audio_url', - 'type' => 'text', - 'name' => esc_html__( 'Audio URL', 'typecore' ), - ), - ), - ); - -/* Format: video -/* ------------------------------------ */ - $meta_boxes[] = array( - 'id' => 'format-video', - 'title' => esc_html__( 'Format: Video', 'typecore' ), - 'post_types' => array( 'post' ), - 'context' => 'advanced', - 'priority' => 'high', - 'autosave' => false, - 'fields' => array( - array( - 'id' => $prefix . 'video_url', - 'type' => 'text', - 'name' => esc_html__( 'Video URL', 'typecore' ), - ), - ), - ); - return $meta_boxes; } + add_filter( 'rwmb_meta_boxes', 'typecore_get_meta_box' ); \ No newline at end of file diff --git a/inc/featured.php b/inc/featured.php index 5923042..1dff611 100644 --- a/inc/featured.php +++ b/inc/featured.php @@ -6,8 +6,8 @@ $featured = new WP_Query( 'update_post_meta_cache' => false, 'update_post_term_cache' => false, 'ignore_sticky_posts' => 1, - 'posts_per_page' => get_theme_mod('featured-posts-count','3'), - 'cat' => get_theme_mod('featured-category','') + 'posts_per_page' => absint( get_theme_mod('featured-posts-count','3') ), + 'cat' => absint( get_theme_mod('featured-category','') ) ) ); // Query highlight entries @@ -18,7 +18,7 @@ $highlights = new WP_Query( 'update_post_term_cache' => false, 'ignore_sticky_posts' => 1, 'posts_per_page' => 3, - 'cat' => get_theme_mod('highlight-category','') + 'cat' => absint( get_theme_mod('highlight-category','') ) ) ); ?> diff --git a/inc/page-image.php b/inc/page-image.php index 1a83726..9eacc2c 100644 --- a/inc/page-image.php +++ b/inc/page-image.php @@ -6,8 +6,8 @@ $caption = get_post(get_post_thumbnail_id())->post_excerpt; $description = get_post(get_post_thumbnail_id())->post_content; echo '
'; - if ( isset($caption) && $caption ) echo '
'.$caption.'
'; - if ( isset($description) && $description ) echo '
'.$description.'
'; + if ( isset($caption) && $caption ) echo '
'.esc_html( $caption ).'
'; + if ( isset($description) && $description ) echo '
'.esc_html( $description ).'
'; echo '
'; ?>
diff --git a/inc/page-title.php b/inc/page-title.php index 5d43bd3..bf9e3ee 100644 --- a/inc/page-title.php +++ b/inc/page-title.php @@ -41,13 +41,13 @@

-

+

-

+

-

+

diff --git a/light.css b/light.css index 79f9df5..f97b99f 100644 --- a/light.css +++ b/light.css @@ -87,14 +87,14 @@ @media only screen and (min-width: 720px) { #nav-header .nav li a { color: #777; } #nav-header .nav > li > a:hover, - #nav-header .nav > li:hover > a { background: transparent; } + #nav-header .nav > li:hover > a { background: #e5e5e5; } #nav-header .nav li > a:hover, #nav-header .nav li:hover > a, #nav-header .nav li.current_page_item > a, #nav-header .nav li.current-menu-item > a, #nav-header .nav li.current-menu-ancestor > a, #nav-header .nav li.current-post-parent > a { color: #444; } - #nav-header .nav ul { background: #eee; } + #nav-header .nav ul { background: #e5e5e5; } #nav-header .nav ul li { box-shadow: 0 1px 0 rgba(0,0,0,0.06); -webkit-box-shadow: 0 1px 0 rgba(0,0,0,0.06); } } @media only screen and (max-width: 719px) { @@ -114,14 +114,14 @@ @media only screen and (min-width: 720px) { #nav-footer .nav li a { color: #777; } #nav-footer .nav > li > a:hover, - #nav-footer .nav > li:hover > a { background-color: #eee; } + #nav-footer .nav > li:hover > a { background-color: #e5e5e5; } #nav-footer .nav li > a:hover, #nav-footer .nav li:hover > a, #nav-footer .nav li.current_page_item > a, #nav-footer .nav li.current-menu-item > a, #nav-footer .nav li.current-menu-ancestor > a, #nav-footer .nav li.current-post-parent > a { color: #444; } - #nav-footer .nav ul { background: #eee; bottom: 50px; } + #nav-footer .nav ul { background: #e5e5e5; bottom: 50px; } #nav-footer .nav ul li { -webkit-box-shadow: 0 1px 0 rgba(0,0,0,0.05); box-shadow: 0 1px 0 rgba(0,0,0,0.05); } } @media only screen and (max-width: 719px) { diff --git a/readme.txt b/readme.txt index c28d6a6..4b7f1e5 100644 --- a/readme.txt +++ b/readme.txt @@ -2,9 +2,9 @@ Contributors: alxmedia Requires at least: 4.9 Tested up to: 4.9 -Version: 1.1.0 -License: GPLv2 or later -License URI: https://www.gnu.org/licenses/gpl-2.0.html +Version: 1.1.1 +License: GPLv3 +License URI: http://www.gnu.org/licenses/gpl-3.0.html Tags: one-column, two-columns, three-columns, right-sidebar, left-sidebar, custom-colors, custom-menu, featured-images, flexible-header, full-width-template, post-formats, sticky-post, theme-options, threaded-comments, translation-ready == Description == @@ -20,6 +20,7 @@ Typecore is a responsive 100% high resolution theme for blogs and magazines. Uni == Copyright == +Typecore WordPress Theme, Copyright 2018 AlxMedia Typecore is distributed under the terms of the GNU GPL This program is free software: you can redistribute it and/or modify @@ -34,8 +35,8 @@ GNU General Public License for more details. Typecore bundles the following third-party resources: -Font Awesome icons, Copyright Dave Gandy -License: SIL Open Font License, version 1.1. +Font Awesome, Copyright Dave Gandy +License: SIL OFL 1.1 (Fonts); MIT (CSS) Source: http://fontawesome.com/ Titillium font, Copyright Accademia di Belle Arti di Urbino @@ -50,6 +51,10 @@ FitVids, Copyright Chris Coyier License: WTFPL Source: http://fitvidsjs.com/ +Kirki, Copyright Aristeides Stathopoulos +License: MIT +Source: https://github.com/aristath/kirki + Screenshot images License: CC0 1.0 Universal (CC0 1.0) Source: http://pixabay.com/ @@ -82,6 +87,17 @@ Right sidebar images == Changelog == += 1.1.1 - 2018-09-06 = +* Moved plugin territory features to companion plugin +* Added missing style.css tags +* Updated style.css edit warning +* Updated .pot language file +* Fixed gallery widget styling +* Fixed translation issues +* Fixed missing escaping issues +* Fixed broken layout options +* Added missing credits in readme + = 1.1.0 - 2018-07-26 = * Updated theme screenshot diff --git a/single.php b/single.php index 3d4ed02..66bfff8 100644 --- a/single.php +++ b/single.php @@ -17,7 +17,7 @@
-
+
'
'.esc_html__('Pages:','typecore'),'after'=>'
')); ?> diff --git a/style.css b/style.css index 1b1eee9..5717f67 100644 --- a/style.css +++ b/style.css @@ -1,11 +1,11 @@ /* Theme Name: Typecore Theme URI: http://alxmedia.se/themes/typecore/ -Version: 1.1.0 +Version: 1.1.1 Description: Typecore is a responsive 100% high resolution theme for blogs and magazines. Unique toggle sidebars give a great browsing and reading experience on both tablet and mobile. The feature list is long: Unlimited topbar, header, footer and accent colors, unlimited widget areas, 0-2 sidebars to the left or right that can be uniquely specified for each page or post, 300px / 220px fixed width sidebars, 0-4 footer widget columns, almost zero layout images, related posts and post nav, featured story or slider, 10 post formats, good SEO, 2 flexible custom widgets, localisation support, social links, logo upload and many more useful admin panel features. Author: Alexander Agnarson Author URI: http://alxmedia.se -Tags: one-column, two-columns, three-columns, right-sidebar, left-sidebar, custom-colors, custom-menu, featured-images, flexible-header, full-width-template, post-formats, sticky-post, theme-options, threaded-comments, translation-ready +Tags: blog, one-column, two-columns, three-columns, right-sidebar, left-sidebar, custom-colors, custom-menu, featured-images, flexible-header, full-width-template, post-formats, sticky-post, theme-options, threaded-comments, translation-ready, custom-logo, custom-header, custom-background Text Domain: typecore Copyright: (c) 2018 Alexander "Alx" Agnarson @@ -15,9 +15,9 @@ Text Domain: typecore /* WARNING! DO NOT EDIT THIS FILE! -To make it easy to update your theme, you should not edit the styles in this file. Instead use the custom.css -file or a child theme to add your styles. You can copy a style from this file and paste it in custom.css -or the child theme's style.css and it will override the style in this file. You have been warned! :) +To make it easy to update your theme, you should not edit the styles in this file. Instead use a child theme +to add your styles. You can copy a style from this file and paste it in the child theme's style.css and it +will override the style in this file. You have been warned! :) */ /* ------------------------------------------------------------------------- * @@ -269,10 +269,14 @@ input, textarea, button, select, label { font-family: inherit; } .entry table th { font-weight: 600; text-align: center; border-top: 1px solid #fff; border-bottom: 1px solid #fff; padding: 10px 5px; } /* default gallery */ -.entry .gallery { clear: both; overflow: hidden; width: 100%; margin: 15px 0!important; } -.entry .gallery img { display: block; width: 100%; height: auto; border-width: 1px 2px!important; border-color: transparent!important; } -.entry .gallery .gallery-item { position: relative; overflow: hidden; border-color: transparent; margin-top: 0!important; } -.entry .gallery .gallery-caption { background: rgba(255,255,255,0.8); color: #333; font-size: 13px; line-height: 1.4em; padding: 10px 0; text-align: left; text-indent: 10px; font-style: normal; margin: 0; bottom: -44px; left: 2px; right: 2px; overflow: hidden; position: absolute; text-overflow: ellipsis; white-space: nowrap; width: 100%; +.entry .gallery, +.widget .gallery { clear: both; overflow: hidden; width: 100%; margin: 15px 0!important; } +.entry .gallery img, +.widget .gallery img { display: block; width: 100%; height: auto; border-width: 1px 2px!important; border-color: transparent!important; } +.entry .gallery .gallery-item, +.widget .gallery .gallery-item { position: relative; overflow: hidden; border-color: transparent; margin-top: 0!important; } +.entry .gallery .gallery-caption, +.widget .gallery .gallery-caption { background: rgba(255,255,255,0.8); color: #333; font-size: 13px; line-height: 1.4em; padding: 10px 0; text-align: left; text-indent: 10px; font-style: normal; margin: 0; bottom: -44px; left: 2px; right: 2px; overflow: hidden; position: absolute; text-overflow: ellipsis; white-space: nowrap; width: 100%; transition: all .2s ease; -o-transition: all .2s ease; -moz-transition: all .2s ease; @@ -282,7 +286,15 @@ transition: all .2s ease; .entry .gallery-columns-6 .gallery-caption, .entry .gallery-columns-7 .gallery-caption, .entry .gallery-columns-8 .gallery-caption, -.entry .gallery-columns-9 .gallery-caption { display: none!important; } +.entry .gallery-columns-9 .gallery-caption, +.widget .gallery-columns-2 .gallery-caption, +.widget .gallery-columns-3 .gallery-caption, +.widget .gallery-columns-4 .gallery-caption, +.widget .gallery-columns-5 .gallery-caption, +.widget .gallery-columns-6 .gallery-caption, +.widget .gallery-columns-7 .gallery-caption, +.widget .gallery-columns-8 .gallery-caption, +.widget .gallery-columns-9 .gallery-caption { display: none!important; } /* base : headings /* ------------------------------------ */