Skip to content

Commit

Permalink
Merge pull request #298 from FameThemes/development
Browse files Browse the repository at this point in the history
Update to version 2.0.8
  • Loading branch information
shrimp2t authored May 10, 2018
2 parents c521c71 + d21f1c2 commit 03b3e02
Show file tree
Hide file tree
Showing 11 changed files with 268 additions and 21 deletions.
19 changes: 19 additions & 0 deletions assets/css/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -213,3 +213,22 @@
margin-right: 10px;
}


.onepress-notice {
background: #fff;
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
margin: 5px 15px 2px;
padding: 1px 15px 10px;
border-left: 4px solid #ffb900 !important;
}
.onepress-notice div {
margin-top: -10px;
margin-bottom: 20px;
line-height: 1.6;
}
.onepress-notice .button-dismiss {
margin-left: 10px;
}
.theme_info_wrapper .onepress-notice{
margin: 15px 0px;
}
60 changes: 60 additions & 0 deletions assets/sass/_sections.scss
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,66 @@
transform: translate(-50%, -50%);
}
}
.animation-disable {
.hero-slideshow-wrapper {
.hero__content {
.hero-large-text, .hero-small-text, .btn {
-webkit-transform: translateY(0px);
transform: translateY(0px);
}
.hero-large-text {
-webkit-transition-delay: 0s; /* Safari */
transition-delay: 0s;
}
.hero-small-text {
-webkit-transition-delay: 0s; /* Safari */
transition-delay: 0s;
}
.btn {
-webkit-transition-delay: 0s; /* Safari */
transition-delay: 0s;
}

}

&.loaded {
.container {
.hero__content {
&:hover {
.hero-large-text, .hero-small-text, .btn {
-webkit-transition-delay: 0s; /* Safari */
transition-delay: 0s;
}
.hero-large-text {
-webkit-transition-delay: 0s; /* Safari */
transition-delay: 0s;
}
.hero-small-text {
-webkit-transition-delay: 0s; /* Safari */
transition-delay: 0s;
}
.btn {
-webkit-transition-delay: 0s; /* Safari */
transition-delay: 0s;
}
}
}
}
}

/* Loading icon */
.slider-spinner {
position: absolute;
top: 50%;
left: 50%;
z-index: 9999999;
margin: 0px;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
}
}


.js-rotating {
display: none;
Expand Down
2 changes: 1 addition & 1 deletion assets/sass/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Theme URI: https://www.famethemes.com/themes/onepress/
Author: FameThemes
Author URI: http://www.famethemes.com
Description: OnePress is an outstanding creative and flexible WordPress one page theme well suited for business website, portfolio, digital agency, product showcase, freelancers and everyone else who appreciate good design. The theme overall is an elegant and classic one, a fine example of Bootstrap 4 WordPress theme which compatibility with latest version of WooCommerce. (Live preview : http://www.famethemes.com/preview/?theme=OnePress)
Version: 2.0.7
Version: 2.0.8
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: onepress
Expand Down
6 changes: 6 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
====================================================================
CHANGELOG
====================================================================
# 2.0.8
* NEW: Setting height for transparent logo.
* IMPROVED: Small strings corrections.
* FIXED: Include hero animation in global animation setting.
* FIXED: Remove duplicate single post thumbnail setting.

# 2.0.7
* NEW: Add hero button target.
* FIXED: Duplicate title on single post.
Expand Down
1 change: 1 addition & 0 deletions inc/customizer-selective-refresh.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ function onepress_customizer_partials( $wp_customize ) {
*/
$css_settings = array(
'onepress_logo_height',
'onepress_transparent_logo_height',
'onepress_tagline_text_color',
'onepress_logo_text_color',

Expand Down
31 changes: 17 additions & 14 deletions inc/customizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,23 @@ function onepress_customize_register( $wp_customize ) {
)
);

/**
* @since 2.0.8
*/
$wp_customize->add_setting( 'onepress_transparent_logo_height',
array(
'sanitize_callback' => 'sanitize_text_field',
'default' => ''
)
);
$wp_customize->add_control( 'onepress_transparent_logo_height',
array(
'label' => esc_html__( 'Transparent Logo Height in Pixel', 'onepress' ),
'section' => 'onepress_header_settings',
'description' => '',
)
);

$wp_customize->add_setting( 'onepress_transparent_site_title_c',
array(
'sanitize_callback' => 'sanitize_hex_color',
Expand Down Expand Up @@ -725,20 +742,6 @@ function onepress_customize_register( $wp_customize ) {
)
);

$wp_customize->add_setting( 'single_thumbnail',
array(
'sanitize_callback' => 'onepress_sanitize_checkbox',
'default' => '',
)
);
$wp_customize->add_control( 'single_thumbnail',
array(
'type' => 'checkbox',
'label' => esc_html__('Show single post thumbnail', 'onepress'),
'section' => 'onepress_single',
'description' => esc_html__('Check this box to show featured image on single post.', 'onepress')
)
);

/* Footer top Social Settings
----------------------------------------------------------------------*/
Expand Down
97 changes: 97 additions & 0 deletions inc/dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,99 @@
/**
* Add theme dashboard page
*/
/**
* Check maybe show admin notice
* @since 2.0.8
*/
function onepress_maybe_show_switch_theme_notice(){
if ( get_option( 'onepress_dismiss_switch_theme_notice' ) ) {
return false;
}
$keys = array(
'onepress_hcl1_largetext',
'onepress_hcl1_smalltext',
'onepress_hcl2_content',
'onepress_features_boxes',
'onepress_services',
'onepress_videolightbox_title',
'onepress_gallery_source',
'onepress_team_members',
'onepress_contact_text',
'onepress_contact_address',
);

foreach( $keys as $k ) {
if ( get_theme_mod( $k ) ) {
return false;
}
}

return true;

}


/**
* @since 2.0.8
*/
function onepress_admin_switch_theme_notice(){

if ( isset( $_GET['dismiss'], $_GET['_nonce'] ) && $_GET['dismiss'] == 1 ) {
if ( wp_verify_nonce( sanitize_text_field( $_GET['_nonce'] ), 'onepress_dismiss_switch_theme_notice' ) ) {
update_option( 'onepress_dismiss_switch_theme_notice', 1 );
return;
}
}

$show = onepress_maybe_show_switch_theme_notice();
if ( ! $show ) {
update_option( 'onepress_dismiss_switch_theme_notice', 1 );
return;
}

// Theme slug here
$theme_slug = 'customify';

$install_url = add_query_arg( array(
'action' => 'install-theme',
'theme' => $theme_slug,
), self_admin_url( 'update.php' ) );
$url = wp_nonce_url( $install_url, 'install-theme_' . $theme_slug );

$dismiss_url = add_query_arg( array(
'page' => 'ft_onepress',
'dismiss' => '1',
'_nonce' => wp_create_nonce( 'onepress_dismiss_switch_theme_notice' ),
), self_admin_url( 'themes.php' ) );

$current_screen = get_current_screen();
$class = 'onepress-notice';
if ( $current_screen && $current_screen->id != 'appearance_page_ft_onepress' ) {
$class .= ' notice notice-warning';
}
?>
<div class="<?php echo esc_attr( $class ); ?>">
<h4><?php _e('Meet Customify - the improved version of OnePress theme by the same team!', 'onepress') ?></h4>
<div class="notice-text"><?php _e( 'Customify is both a WordPress Theme and a WordPress Theme Editor. It’s a powerful styling platform that ensures exceptional design control over your website’s looks and feel. The most highlight feature is the <strong>comprehensive Header & Footer builder</strong>.', 'onepress' ); ?></div>
<p style="margin-top: 20px;">
<a href="<?php echo esc_url( $url ); ?>" class="onepress-install-swt button button-primary"><?php _e( 'Install Customify Now', 'onepress' ); ?></a>
<a href="<?php echo esc_url( $dismiss_url ); ?>" class="onepress-dismiss-swt button-secondary button-dismiss"><?php _e( 'Don\'t show this again', 'onepress' ); ?></a>
</p>
</div>
<?php
}

/**
* *since 2.0.8
*/
function onepress_add_admin_switch_theme_notice(){
$current_screen = get_current_screen();
if ( $current_screen && $current_screen->id == 'appearance_page_ft_onepress' || $current_screen->base != 'themes' ) {
return;
}
onepress_admin_switch_theme_notice();
}
add_action( 'admin_notices', 'onepress_add_admin_switch_theme_notice', 15 );

/**
* Get theme actions required
Expand Down Expand Up @@ -323,6 +416,10 @@ function onepress_theme_info_page() {
<h1><?php printf(esc_html__('Welcome to OnePress - Version %1s', 'onepress'), $theme_data->Version ); ?></h1>
<div class="about-text"><?php esc_html_e( 'OnePress is a creative and flexible WordPress ONE PAGE theme well suited for business, portfolio, digital agency, product showcase, freelancers websites.', 'onepress' ); ?></div>
<a target="_blank" href="<?php echo esc_url('https://www.famethemes.com/?utm_source=theme_dashboard_page&utm_medium=badge_link&utm_campaign=onepress'); ?>" class="famethemes-badge wp-badge"><span>FameThemes</span></a>

<hr class="wp-header-end">
<?php onepress_admin_switch_theme_notice(); ?>

<h2 class="nav-tab-wrapper">
<a href="?page=ft_onepress" class="nav-tab<?php echo is_null($tab) ? ' nav-tab-active' : null; ?>"><?php esc_html_e( 'OnePress', 'onepress' ) ?></a>
<a href="?page=ft_onepress&tab=recommended_actions" class="nav-tab<?php echo $tab == 'recommended_actions' ? ' nav-tab-active' : null; ?>"><?php esc_html_e( 'Recommended Actions', 'onepress' ); echo ( $number_action > 0 ) ? "<span class='theme-action-count'>{$number_action}</span>" : ''; ?></a>
Expand Down
4 changes: 4 additions & 0 deletions inc/extras.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ function onepress_body_classes( $classes ) {
}
}

if( get_theme_mod( 'onepress_animation_disable' ) ) {
$classes[ ] = 'animation-disable';
}

return $classes;
}
add_filter( 'body_class', 'onepress_body_classes' );
Expand Down
9 changes: 6 additions & 3 deletions inc/template-tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,7 @@ function onepress_hex_to_rgba( $color, $alpha = 1)
function onepress_custom_inline_style( ) {

$logo_height= absint( get_theme_mod( 'onepress_logo_height' ) );
$logo_tran_height= absint( get_theme_mod( 'onepress_transparent_logo_height' ) );

/**
* Custom hero section css
Expand All @@ -545,10 +546,15 @@ function onepress_custom_inline_style( ) {
$hero_bg_color = onepress_hex_to_rgba( $hero_bg_color, floatval( get_theme_mod( 'onepress_hero_overlay_opacity' , .3 ) ) );

ob_start();

if ( $logo_height > 0 ) {
echo ".site-logo-div img{ height: {$logo_height}px; width: auto; }";
}

if ( $logo_tran_height ) {
echo ".site-logo-div img.custom-logo-transparent{ height: {$logo_tran_height}px; width: auto; }";
}

$t_site_name_color = sanitize_hex_color( get_theme_mod( 'onepress_transparent_site_title_c' ) );
if ( $t_site_name_color ) {
echo "#page .is-transparent .site-header.no-scroll .site-title, #page .is-transparent .site-header.no-scroll .site-title .site-text-logo { color: {$t_site_name_color}; }";
Expand Down Expand Up @@ -772,9 +778,6 @@ function onepress_custom_inline_style( ) {
<?php
}




$onepress_footer_bg = sanitize_hex_color_no_hash( get_theme_mod( 'onepress_footer_bg' ) );
$footer_top_text = sanitize_hex_color( get_theme_mod( 'onepress_footer_top_color' ) );
if ( $onepress_footer_bg ) {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "customify-pro",
"version": "2.0.7",
"name": "onepress",
"version": "2.0.8",
"main": "Gruntfile.js",
"engines": {
"node": ">= 0.10.0"
Expand Down
56 changes: 55 additions & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Theme URI: https://www.famethemes.com/themes/onepress/
Author: FameThemes
Author URI: http://www.famethemes.com
Description: OnePress is an outstanding creative and flexible WordPress one page theme well suited for business website, portfolio, digital agency, product showcase, freelancers and everyone else who appreciate good design. The theme overall is an elegant and classic one, a fine example of Bootstrap 4 WordPress theme which compatibility with latest version of WooCommerce. (Live preview : http://www.famethemes.com/preview/?theme=OnePress)
Version: 2.0.7
Version: 2.0.8
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: onepress
Expand Down Expand Up @@ -2193,6 +2193,60 @@ section > .customize-partial-edit-shortcut button {
transform: translate(-50%, -50%);
}

.animation-disable .hero-slideshow-wrapper {
/* Loading icon */
}
.animation-disable .hero-slideshow-wrapper .hero__content .hero-large-text, .animation-disable .hero-slideshow-wrapper .hero__content .hero-small-text, .animation-disable .hero-slideshow-wrapper .hero__content .btn {
-webkit-transform: translateY(0px);
-ms-transform: translateY(0px);
transform: translateY(0px);
}
.animation-disable .hero-slideshow-wrapper .hero__content .hero-large-text {
-webkit-transition-delay: 0s;
/* Safari */
transition-delay: 0s;
}
.animation-disable .hero-slideshow-wrapper .hero__content .hero-small-text {
-webkit-transition-delay: 0s;
/* Safari */
transition-delay: 0s;
}
.animation-disable .hero-slideshow-wrapper .hero__content .btn {
-webkit-transition-delay: 0s;
/* Safari */
transition-delay: 0s;
}
.animation-disable .hero-slideshow-wrapper.loaded .container .hero__content:hover .hero-large-text, .animation-disable .hero-slideshow-wrapper.loaded .container .hero__content:hover .hero-small-text, .animation-disable .hero-slideshow-wrapper.loaded .container .hero__content:hover .btn {
-webkit-transition-delay: 0s;
/* Safari */
transition-delay: 0s;
}
.animation-disable .hero-slideshow-wrapper.loaded .container .hero__content:hover .hero-large-text {
-webkit-transition-delay: 0s;
/* Safari */
transition-delay: 0s;
}
.animation-disable .hero-slideshow-wrapper.loaded .container .hero__content:hover .hero-small-text {
-webkit-transition-delay: 0s;
/* Safari */
transition-delay: 0s;
}
.animation-disable .hero-slideshow-wrapper.loaded .container .hero__content:hover .btn {
-webkit-transition-delay: 0s;
/* Safari */
transition-delay: 0s;
}
.animation-disable .hero-slideshow-wrapper .slider-spinner {
position: absolute;
top: 50%;
left: 50%;
z-index: 9999999;
margin: 0px;
-webkit-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}

.js-rotating {
display: none;
}
Expand Down

0 comments on commit 03b3e02

Please sign in to comment.