Skip to content

Commit

Permalink
modified: README.txt
Browse files Browse the repository at this point in the history
	modified:   changelog.txt
	modified:   fonts.css
	modified:   functions.php
	modified:   header-front.php
	modified:   header.php
	modified:   index.php
	modified:   lib/hooks.php
	modified:   lib/vars.php
	modified:   lib/widgets.php
	modified:   plugins/plugins-presentation.php
	modified:   style.css
  • Loading branch information
tenman committed Sep 13, 2017
1 parent bd70492 commit 7d8bd7e
Show file tree
Hide file tree
Showing 12 changed files with 120 additions and 26 deletions.
6 changes: 3 additions & 3 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

Contributors: nobita
Requires at least: WordPress 4.5
Tested up to: WordPress 4.8
Stable tag: 1.481
Version: 1.487
Tested up to: WordPress 4.8.1
Stable tag: 1.487
Version: 1.488
License: GPLv2
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: one-column, two-columns, three-columns, four-columns, left-sidebar, right-sidebar, custom-colors, custom-header, custom-background, custom-menu, editor-style, theme-options, threaded-comments, sticky-post, translation-ready, post-formats, featured-images, full-width-template, rtl-language-support, microformats, grid-layout, flexible-header, custom-logo, featured-image-header, footer-widgets
Expand Down
23 changes: 23 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,27 @@
Changelog -----------------------------------
version:1.488

Overview of Changes
Add SSL support changes
If you change the web site under operation from http to https,
http link and so on remain in the post body, custom menu,
Custom CSS for This Entry, Additional CSS,
and the ability to rewrite these http links to https Added.

This function rewrites only the internal link. It will not change external links

If you not need this functionality.
Please add the following variables to the first line of functions.php.

$raindrops_ssl_link_helper = true;

Files Modified
modified: functions.php

Description of Code Changes
please see https://themes.trac.wordpress.org/changeset?old_path=raindrops/1.487&new_path=raindrops/1.488
-----------------------------------------------Changelog -----------------------------------
Changelog -----------------------------------
version:1.487

Overview of Changes
Expand Down
2 changes: 1 addition & 1 deletion fonts.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ version: 2.8.1
/**
* The example of use Google WEB Fonts
@import url(http://fonts.googleapis.com/css?family=Parisienne);
@import url(//fonts.googleapis.com/css?family=Parisienne);
#site-title span{
font-family: 'Parisienne', cursive;
Expand Down
43 changes: 36 additions & 7 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -2920,8 +2920,6 @@ function raindrops_embed_meta( $content ) {

$css_single .= get_post_meta( $post->ID, '_css', true );




if ( true == RAINDROPS_OVERRIDE_POST_STYLE_ALL_CONTENTS ) {

Expand Down Expand Up @@ -3051,9 +3049,9 @@ function raindrops_embed_meta( $content ) {
$result .= "\n<!--/*<! [CDATA[*/\n";
$result .= $css;
$result .= "/*start custom fields style for loop pages*/\n";

$result_indv = raindrops_remove_spaces_from_css( $result_indv );

$result .= $result_indv;
$result .= "\n/*end custom fields style for loop pages*/";
$result .= "\n/*]]>*/-->\n";
Expand Down Expand Up @@ -4779,8 +4777,15 @@ function raindrops_load_small_device_helper() {
}
}
}
/* @since 1.488 */
$raindrops_header_image_uri = raindrops_ssl_link_helper( $raindrops_header_image_uri );

$raindrops_restore_check = get_theme_mod( 'header_image', get_theme_support( 'custom-header', 'default-image' ) );
/* @since 1.488 */
$raindrops_restore_check = raindrops_ssl_link_helper( $raindrops_restore_check );

if ( $raindrops_restore_check !== 'remove-header' ) {


if ( $raindrops_header_image_width > 0 && $raindrops_header_image_height > 0 ) {

Expand Down Expand Up @@ -9915,8 +9920,13 @@ function raindrops_tiny_mce_before_init( $init_array ) {
}

$separator = '';

if ( ! empty( $init_array['content_css'] ) ) {

$separator = ',';
} else {

$init_array['content_css'] = '';
}
$init_array['content_css'] = trim( $init_array['content_css'], ',' ) . $separator . raindrops_google_fonts_for_tinymce();

Expand All @@ -9934,11 +9944,11 @@ function raindrops_tiny_mce_before_init( $init_array ) {
* @since 1.264
*/
function raindrops_google_fonts_for_tinymce() {

global $post;
if ( raindrops_warehouse_clone( 'raindrops_sync_style_for_tinymce' ) !== 'yes' ) {
return;
}
global $post;

$google_font_link_elements = get_post_meta( $post->ID, '_web_fonts_link_element', true );
$comma_separated_urls = '';
if ( preg_match_all( '!href="([^"]+)"!', $google_font_link_elements, $regs, PREG_SET_ORDER ) ) {
Expand Down Expand Up @@ -10075,7 +10085,6 @@ function raindrops_get_pinup_widget_ids() {


if ( !function_exists( 'raindrops_apply_pinup_styles' ) ) {

/**
*
* @return type string styles
Expand Down Expand Up @@ -13528,6 +13537,26 @@ function raindrops_google_font_helper_for_japanese( $font_style , $font_name ) {
return $font_style;
}
}
if( ! function_exists( 'raindrops_ssl_link_helper' ) ) {
/**
* @since 1.488
*/
function raindrops_ssl_link_helper( $content ) {

global $raindrops_ssl_link_helper;

if( is_ssl( ) && true == $raindrops_ssl_link_helper ) {

$parsed_url = parse_url ( home_url() );
$host = $parsed_url['host'];

$replace_pairs = apply_filters( 'raindrops_ssl_link_helper_hosts', array( 'http://'.$host =>'https://'.$host ) );

return strtr( $content, $replace_pairs );
}
return $content;
}
}
/**
*
*
Expand Down
2 changes: 1 addition & 1 deletion header-front.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
<?php

if ( has_post_thumbnail() ) {
the_post_thumbnail( 'large', 'style=max-width:100%;width:100%;height:auto;' );
the_post_thumbnail( 'large' );
} else {
echo $raindrops_header_image;

Expand Down
2 changes: 1 addition & 1 deletion header.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
raindrops_the_header_image();
}

raindrops_nav_menu_primary();
raindrops_nav_menu_primary( );

raindrops_after_nav_menu();
?>
Expand Down
3 changes: 2 additions & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
get_header( $raindrops_document_type );
do_action( 'raindrops_pre_' . basename( __FILE__ ) );
raindrops_debug_navitation( __FILE__ );
?>

?>
<div id="yui-main" class="<?php raindrops_dinamic_class( 'yui-main',true ); ?>">
<div class="<?php raindrops_dinamic_class( 'yui-b',true ); ?>">
<div class="<?php echo raindrops_yui_class_modify(); ?>" id="container">
Expand Down Expand Up @@ -81,4 +81,5 @@
<?php
}
?>

<?php get_footer( $raindrops_document_type ); ?>
18 changes: 18 additions & 0 deletions lib/hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,24 @@ function raindrops_theme_setup() {
* @since 1.486
*/
add_filter( 'raindrops_fallback_google_font', 'raindrops_google_font_helper_for_japanese', 10, 2 );

/**
* @somce 1.488
*/
add_filter( 'raindrops_embed_meta_echo', 'raindrops_ssl_link_helper' );
add_filter( 'raindrops_custom_fields_style_for_loop', 'raindrops_ssl_link_helper',99 );//not work
add_filter( 'raindrops_embed_meta_css', 'raindrops_ssl_link_helper' );
add_filter( 'raindrops_footer_text', 'raindrops_ssl_link_helper' );
add_filter( 'post_link', 'raindrops_ssl_link_helper' );
add_filter( 'wp_nav_menu', 'raindrops_ssl_link_helper' );
add_filter( 'wp_get_custom_css', 'raindrops_ssl_link_helper' );
add_filter('widget_text_content', 'raindrops_ssl_link_helper' );
add_filter( 'widget_custom_html_content','raindrops_ssl_link_helper' );
add_filter( 'post_type_archive_link','raindrops_ssl_link_helper' );
add_filter( 'tag_link','raindrops_ssl_link_helper' );
add_filter( 'category_link','raindrops_ssl_link_helper' );
add_filter( 'the_content','raindrops_ssl_link_helper' );
add_filter('the_content_rss','raindrops_ssl_link_helper' );

}
}
Expand Down
20 changes: 14 additions & 6 deletions lib/vars.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,22 @@
if ( !defined( 'ABSPATH' ) ) {
exit;
}
/**
* When WEBSITE Change from http: to https
* Old post content filtered to https://your domain/...
*/
if( ! isset( $raindrops_ssl_link_helper ) ) {

$raindrops_ssl_link_helper = true;
}
/**
* Customize / Featured Image Settings Featured Image Special Layout Apply Post Count limit
* @since 1.472
* value 'posts_per_page' or 'none'
* ver1.472 default none. Experimental implementation
*/
if( ! isset( $raindrops_allow_safe_link_target ) ) {
if( ! isset( $raindrops_featured_image_recent_post_count_limit ) ) {

$raindrops_featured_image_recent_post_count_limit = 'none';
}
/**
Expand All @@ -40,7 +48,7 @@
$raindrops_change_all_excerpt_archives_to_grid_layout = false;
}
/**
* custom format needs style
* custom format needs style
* The excerpt display of WordPress removes all html, but the custom format has no meaning unless it has html
* @since 1.464
*/
Expand Down Expand Up @@ -623,7 +631,7 @@
empty( $raindrops_current_style_type ) ) ) {
//@1.433 todo
$raindrops_current_style_type = 'dark';
}
}

$raindrops_base_setting_args = array(
"raindrops_color_scheme" => array( 'option_id' => 1,
Expand Down Expand Up @@ -1987,8 +1995,8 @@

$raindrops_base_setting_args["raindrops_page_width"]['option_value'] = 'doc5';
$raindrops_base_setting_args["raindrops_featured_image_recent_post_count"]['option_value'] = 10;
$raindrops_base_setting_args["raindrops_place_of_site_title"]['option_value'] = 'header_image';
$raindrops_base_setting_args["raindrops_style_type"]['option_value'] = 'minimal';
$raindrops_base_setting_args["raindrops_place_of_site_title"]['option_value'] = 'header_image';
$raindrops_base_setting_args["raindrops_style_type"]['option_value'] = 'minimal';
}

if ( !isset( $raindrops_base_setting ) || empty( $raindrops_base_setting ) ) {
Expand Down
2 changes: 1 addition & 1 deletion lib/widgets.php
Original file line number Diff line number Diff line change
Expand Up @@ -1039,7 +1039,7 @@ public function widget( $args, $instance ) {
$result = array();
$groups = $group_year_month;
$display_start_year = $archives_start_year;
$display_end_year = apply_filters( 'raindrops_extend_archive_widget_end_year', date( 'Y' ) );
$display_end_year = apply_filters( 'raindrops_extend_archive_widget_end_year', date( 'Y' ), $title );
if ( $groups == 'year' ) {
for ( $i = $display_start_year; $i < $display_end_year + 1; $i++ ) {

Expand Down
1 change: 0 additions & 1 deletion plugins/plugins-presentation.php
Original file line number Diff line number Diff line change
Expand Up @@ -1034,4 +1034,3 @@ function raindrops_load_amp_css() {

}
}
?>
24 changes: 20 additions & 4 deletions style.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/*
Theme Name: raindrops
Theme URI: http://www.tenman.info/wp3/raindrops/
Theme URI: https://www.tenman.info/wp3/raindrops/
Description: This theme can change freely fonts,layout,color scheme and header image for each post,page. The google fonts, you can use freely in the post more than 90percent of the fonts.Color scheme and layout, you can freely change from theme customizer.For more updates, please make sure to open the link of the changelog from the help tab of this theme page.Add new post, so also to help tab of edit post page has been described how to use tips, please visit. Supported languages Japanese - JAPAN (ja) French - FRANCE (fr_FR) Polish - POLAND (PL) (pl_PL) Portuguese - BRAZIL (pt_BR)
Author: Tenman
Author URI: http://www.tenman.info/wp3/
Version: 1.487
Author URI: https://www.tenman.info/wp3/
Version: 1.488
Tags: one-column, two-columns, three-columns, four-columns, left-sidebar, right-sidebar, custom-colors, custom-header, custom-background, custom-menu, editor-style, theme-options, threaded-comments, sticky-post, translation-ready, post-formats, featured-images, full-width-template, rtl-language-support, microformats, grid-layout, flexible-header, custom-logo, featured-image-header, footer-widgets
License: GNU General Public License v2.0
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -5129,7 +5129,7 @@ body:not(.no-apply-bbpress-css) #bbpress-forums a{
* <span lang="lang-not-ja">English Title</span><span class="lang-ja">Japanese Title</span>
*/

body.accept-lang-ja:not(.firefox) :not(.rd-l-en_US) .lang-not-ja,
body.accept-lang-ja :not(.rd-l-en_US) .lang-not-ja,
body.accept-lang-ja div:not(.rd-l-ja) .lang-ja,
body.accept-lang-ja div:not(.rd-l-ja-JP) .lang-ja,
body.accept-lang-ja div.rd-l-ja .post .lang-not-ja{
Expand Down Expand Up @@ -8289,3 +8289,19 @@ html[xmlns="http://www.w3.org/1999/xhtml"] .rsidebar .widget_media_image .alignn
}
/* WordPress4.8.1 core widget end */
/* WordPress4.8 core widget end */
.entry-content .gallery{
display:inline-block;
}
.static-front-media img{
max-width:100%;
width:100%;
height:auto;
}
.h2-thumb:empty{
display:none!important;
min-width:0;
}
.h2-thumb:empty + .entry-title-text{
padding-left:0;
padding-right:0;
}

0 comments on commit 7d8bd7e

Please sign in to comment.