Skip to content

Commit

Permalink
Merge pull request #380 from FameThemes/development
Browse files Browse the repository at this point in the history
Merge brand development to master
  • Loading branch information
TruongTuyen authored Mar 21, 2019
2 parents 127adc1 + fbe572d commit 74071ff
Show file tree
Hide file tree
Showing 9 changed files with 101 additions and 60 deletions.
5 changes: 5 additions & 0 deletions assets/sass/_document.scss
Original file line number Diff line number Diff line change
Expand Up @@ -527,3 +527,8 @@ input[type="radio"],input[type="checkbox"] {
word-break: break-word;
word-wrap: break-word;
}

body.mce-content-body{
margin: 20px 40px;
font-size: 13px;
}
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 : https://demos.famethemes.com/onepress)
Version: 2.2.3
Version: 2.2.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: onepress
Expand Down
8 changes: 8 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# CHANGELOG

# 2.2.4
* NEW: Support Yoast SEO breadcrumb.
* NEW: Support qTranslate-x in page header cover description.
* NEW: Support emojis in Customizer content.
* IMPROVED: Change link guide to create MailChimp URL.
* FIXED: Yoast SEO metabox display.
* FIXED: Visual Editor error.

# 2.2.3
* FIXED: Menu mobile not display.

Expand Down
5 changes: 5 additions & 0 deletions editor-style.css
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,11 @@ h6, p, ul, ol, dl, blockquote, pre {
word-wrap: break-word;
}

body.mce-content-body {
margin: 20px 40px;
font-size: 13px;
}

/* Page: 404
------------------------------*/
.error-404 .search-form, .error-404 .widget {
Expand Down
2 changes: 1 addition & 1 deletion inc/customize-configs/options-footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
array(
'label' => esc_html__( 'MailChimp Action URL', 'onepress' ),
'section' => 'onepres_footer_top',
'description' => __( 'The newsletter form use MailChimp, please follow <a target="_blank" href="http://goo.gl/uRVIst">this guide</a> to know how to get MailChimp Action URL. Example <i>//famethemes.us8.list-manage.com/subscribe/post?u=521c400d049a59a4b9c0550c2&amp;id=83187e0006</i>', 'onepress' )
'description' => __( 'The newsletter form use MailChimp, please follow <a target="_blank" href="https://mailchimp.com/help/host-your-own-signup-forms/">this guide</a> to know how to get MailChimp Action URL. Example <i>//famethemes.us8.list-manage.com/subscribe/post?u=521c400d049a59a4b9c0550c2&amp;id=83187e0006</i>', 'onepress' )
)
);

Expand Down
14 changes: 11 additions & 3 deletions inc/template-tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -1541,7 +1541,15 @@ function onepress_breadcrumb( $post_id = null ) {
</div>
</div>
<?php
}
} else if ( function_exists('yoast_breadcrumb') ) {
?>
<div class="breadcrumbs" typeof="BreadcrumbList" vocab="http://schema.org/">
<div class="container">
<?php yoast_breadcrumb(); ?>
</div>
</div>
<?php
}
}

if ( ! function_exists( 'onepress_is_selective_refresh' ) ) {
Expand Down Expand Up @@ -1697,7 +1705,7 @@ function onepress_display_page_title() {
if ( get_post_meta( $page_id, '_show_excerpt', true ) ) {
$post = get_post( $page_id );
if ( $post->post_excerpt ) {
$excerpt = get_the_excerpt( $page_id );
$excerpt = apply_filters( 'the_excerpt', get_post_field('post_excerpt', $page_id) );
}
}
}
Expand All @@ -1713,7 +1721,7 @@ function onepress_display_page_title() {
// WPCS: XSS OK.
echo '<' . $el . ' class="entry-title">' . $title . '</' . $el . '>';
if ( $excerpt ) {
echo '<div class="entry-tagline">' . $excerpt . '</div>';
echo '<div class="entry-tagline">' . $excerpt . '</div>';
}
?>
</div>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "onepress",
"version": "2.2.3",
"version": "2.2.4",
"main": "Gruntfile.js",
"engines": {
"node": ">= 0.10.0"
Expand Down
116 changes: 63 additions & 53 deletions section-parts/section-hero.php
Original file line number Diff line number Diff line change
@@ -1,116 +1,126 @@
<?php
$id = get_theme_mod( 'onepress_hero_id', esc_html__('hero', 'onepress') );
$disable = sanitize_text_field( get_theme_mod( 'onepress_hero_disable' ) ) == 1 ? true : false ;
$id = get_theme_mod( 'onepress_hero_id', esc_html__( 'hero', 'onepress' ) );
$disable = sanitize_text_field( get_theme_mod( 'onepress_hero_disable' ) ) == 1 ? true : false;
$fullscreen = sanitize_text_field( get_theme_mod( 'onepress_hero_fullscreen' ) );
$pdtop = floatval( get_theme_mod( 'onepress_hero_pdtop', '10' ) );
$pdbottom = floatval( get_theme_mod( 'onepress_hero_pdbotom', '10' ) );

if ( onepress_is_selective_refresh() ) {
$disable = false;
$disable = false;
}

$hero_content_style = '';
if ( $fullscreen != '1' ) {
$hero_content_style = ' style="padding-top: '. $pdtop .'%; padding-bottom: '. $pdbottom .'%;"';
$hero_content_style = ' style="padding-top: ' . $pdtop . '%; padding-bottom: ' . $pdbottom . '%;"';
}

$_images = get_theme_mod('onepress_hero_images');
if (is_string($_images)) {
$_images = json_decode($_images, true);
$_images = get_theme_mod( 'onepress_hero_images' );
if ( is_string( $_images ) ) {
$_images = json_decode( $_images, true );
}

if ( empty( $_images ) || !is_array( $_images ) ) {
$_images = array();
if ( empty( $_images ) || ! is_array( $_images ) ) {
$_images = array();
}

$images = array();

foreach ( $_images as $m ) {
$m = wp_parse_args( $m, array('image' => '' ) );
$m = wp_parse_args( $m, array( 'image' => '' ) );
$_u = onepress_get_media_url( $m['image'] );
if ( $_u ) {
$images[] = $_u;
}
}

if ( empty( $images ) ){
$images = array( get_template_directory_uri().'/assets/images/hero5.jpg' );
if ( empty( $images ) ) {
$images = array( get_template_directory_uri() . '/assets/images/hero5.jpg' );
}

$is_parallax = get_theme_mod( 'onepress_hero_parallax' ) == 1 && ! empty( $images ) ;
$is_parallax = get_theme_mod( 'onepress_hero_parallax' ) == 1 && ! empty( $images );
$hook_args = array();
if ( $is_parallax ) {
$hook_args = array(
'image' => $images[0],
'alpha' => '',
'enable_parallax' => 1,
'_bg_type' => 'image'
);
$hook_args = array(
'image' => $images[0],
'alpha' => '',
'enable_parallax' => 1,
'_bg_type' => 'image',
);
}

do_action('onepress_before_section_part', 'hero', $hook_args );
do_action( 'onepress_before_section_part', 'hero', $hook_args );

?>
<?php if ( ! $disable && ! empty ( $images ) ) : ?>
<section id="<?php if ( $id != '' ){ echo esc_attr( $id ); } ?>" <?php if ( ! empty ( $images) && ! $is_parallax ) { ?> data-images="<?php echo esc_attr( json_encode( $images ) ); ?>"<?php } ?>
class="hero-slideshow-wrapper <?php echo ( $fullscreen == 1 ) ? 'hero-slideshow-fullscreen' : 'hero-slideshow-normal'; ?>">

<?php if ( ! get_theme_mod( 'onepress_hero_disable_preload', false ) ) { ?>
<div class="slider-spinner">
<div class="double-bounce1"></div>
<div class="double-bounce2"></div>
</div>
<?php } ?>

<?php
<?php if ( ! $disable && ! empty( $images ) ) : ?>
<section id="<?php if ( $id != '' ) {
echo esc_attr( $id ); } ?>" <?php if ( ! empty( $images ) && ! $is_parallax ) {
?> data-images="<?php echo esc_attr( json_encode( $images ) ); ?>"<?php } ?>
class="hero-slideshow-wrapper <?php echo ( $fullscreen == 1 ) ? 'hero-slideshow-fullscreen' : 'hero-slideshow-normal'; ?>">

<?php if ( ! get_theme_mod( 'onepress_hero_disable_preload', false ) ) { ?>
<div class="slider-spinner">
<div class="double-bounce1"></div>
<div class="double-bounce2"></div>
</div>
<?php } ?>

<?php
$layout = get_theme_mod( 'onepress_hero_layout', 1 );
switch( $layout ) {
switch ( $layout ) {
case 2:
$hcl2_content = get_theme_mod( 'onepress_hcl2_content', wp_kses_post( '<h1>Business Website'."\n".'Made Simple.</h1>'."\n".'We provide creative solutions to clients around the world,'."\n".'creating things that get attention and meaningful.'."\n\n".'<a class="btn btn-secondary-outline btn-lg" href="#">Get Started</a>' ) );
$hcl2_image = get_theme_mod( 'onepress_hcl2_image', get_template_directory_uri().'/assets/images/onepress_responsive.png' );
$hcl2_content = get_theme_mod( 'onepress_hcl2_content', wp_kses_post( '<h1>Business Website' . "\n" . 'Made Simple.</h1>' . "\n" . 'We provide creative solutions to clients around the world,' . "\n" . 'creating things that get attention and meaningful.' . "\n\n" . '<a class="btn btn-secondary-outline btn-lg" href="#">Get Started</a>' ) );
$hcl2_image = get_theme_mod( 'onepress_hcl2_image', get_template_directory_uri() . '/assets/images/onepress_responsive.png' );
?>
<div class="container"<?php echo $hero_content_style; ?>>
<div class="row hero__content hero-content-style<?php echo esc_attr( $layout ); ?>">
<div class="col-md-12 col-lg-6">
<?php if ( $hcl2_content ) { echo '<div class="hcl2-content">'.apply_filters( 'the_content', do_shortcode( wp_kses_post( $hcl2_content ) ) ).'</div>' ; }; ?>
<?php if ( $hcl2_content ) {
echo '<div class="hcl2-content">' . apply_filters( 'the_content', do_shortcode( wp_kses_post( $hcl2_content ) ) ) . '</div>';
}; ?>
</div>
<div class="col-md-12 col-lg-6">
<?php if ( $hcl2_image ) { echo '<img class="hcl2-image" src="'.esc_url( $hcl2_image ).'" alt="">' ; }; ?>
<?php if ( $hcl2_image ) {
echo '<img class="hcl2-image" src="' . esc_url( $hcl2_image ) . '" alt="">';
}; ?>
</div>
</div>
</div>
<?php
break;
break;
default:
$hcl1_largetext = get_theme_mod( 'onepress_hcl1_largetext', wp_kses_post('We are <span class="js-rotating">OnePress | One Page | Responsive | Perfection</span>', 'onepress' ));
$hcl1_smalltext = get_theme_mod( 'onepress_hcl1_smalltext', wp_kses_post('Morbi tempus porta nunc <strong>pharetra quisque</strong> ligula imperdiet posuere<br> vitae felis proin sagittis leo ac tellus blandit sollicitudin quisque vitae placerat.', 'onepress') );
$hcl1_btn1_text = get_theme_mod( 'onepress_hcl1_btn1_text', esc_html__('Our Services', 'onepress') );
$hcl1_btn1_link = get_theme_mod( 'onepress_hcl1_btn1_link', esc_url( home_url( '/' )).esc_html__('#services', 'onepress') );
$hcl1_btn2_text = get_theme_mod( 'onepress_hcl1_btn2_text', esc_html__('Get Started', 'onepress') );
$hcl1_btn2_link = get_theme_mod( 'onepress_hcl1_btn2_link', esc_url( home_url( '/' )).esc_html__('#contact', 'onepress') );
$hcl1_largetext = get_theme_mod( 'onepress_hcl1_largetext', wp_kses_post( 'We are <span class="js-rotating">OnePress | One Page | Responsive | Perfection</span>', 'onepress' ) );
$hcl1_smalltext = get_theme_mod( 'onepress_hcl1_smalltext', wp_kses_post( 'Morbi tempus porta nunc <strong>pharetra quisque</strong> ligula imperdiet posuere<br> vitae felis proin sagittis leo ac tellus blandit sollicitudin quisque vitae placerat.', 'onepress' ) );
$hcl1_btn1_text = get_theme_mod( 'onepress_hcl1_btn1_text', esc_html__( 'Our Services', 'onepress' ) );
$hcl1_btn1_link = get_theme_mod( 'onepress_hcl1_btn1_link', esc_url( home_url( '/' ) ) . esc_html__( '#services', 'onepress' ) );
$hcl1_btn2_text = get_theme_mod( 'onepress_hcl1_btn2_text', esc_html__( 'Get Started', 'onepress' ) );
$hcl1_btn2_link = get_theme_mod( 'onepress_hcl1_btn2_link', esc_url( home_url( '/' ) ) . esc_html__( '#contact', 'onepress' ) );

$btn_1_style = get_theme_mod( 'onepress_hcl1_btn1_style', 'btn-theme-primary' );
$btn_2_style = get_theme_mod( 'onepress_hcl1_btn2_style', 'btn-secondary-outline' );
$btn_1_style = get_theme_mod( 'onepress_hcl1_btn1_style', 'btn-theme-primary' );
$btn_2_style = get_theme_mod( 'onepress_hcl1_btn2_style', 'btn-secondary-outline' );

$btn_1_target = get_theme_mod( 'onepress_hcl1_btn1_target' );
$btn_1_target = get_theme_mod( 'onepress_hcl1_btn1_target' );
$btn_2_target = get_theme_mod( 'onepress_hcl1_btn2_target' );
$target_1 = ( $btn_1_target == 1 ) ? 'target="_blank"' : '';
$target_2 = ( $btn_2_target == 1 ) ? 'target="_blank"' : '';

?>
<div class="container"<?php echo $hero_content_style; ?>>
<div class="hero__content hero-content-style<?php echo esc_attr( $layout ); ?>">
<?php if ($hcl1_largetext != '') echo '<h2 class="hero-large-text">' . wp_kses_post($hcl1_largetext) . '</h2>'; ?>
<?php if ($hcl1_smalltext != '') echo '<p class="hero-small-text"> ' . do_shortcode( wp_kses_post( $hcl1_smalltext ) ) . '</p>' ?>
<?php if ($hcl1_btn1_text != '' && $hcl1_btn1_link != '') echo '<a '. $target_1 .' href="' . esc_url($hcl1_btn1_link) . '" class="btn '.esc_attr( $btn_1_style ).' btn-lg">' . wp_kses_post($hcl1_btn1_text) . '</a>'; ?>
<?php if ($hcl1_btn2_text != '' && $hcl1_btn2_link != '') echo '<a '. $target_2 .' href="' . esc_url($hcl1_btn2_link) . '" class="btn '.esc_attr( $btn_2_style ).' btn-lg">' . wp_kses_post($hcl1_btn2_text) . '</a>'; ?>
<?php if ( $hcl1_largetext != '' ) {
echo '<h2 class="hero-large-text">' . wp_kses_post( $hcl1_largetext ) . '</h2>';} ?>
<?php if ( $hcl1_smalltext != '' ) {
echo '<p class="hero-small-text">' . apply_filters( 'onepress_the_content', wp_kses_post( $hcl1_smalltext ) ) . '</p>';} ?>
<?php if ( $hcl1_btn1_text != '' && $hcl1_btn1_link != '' ) {
echo '<a ' . $target_1 . ' href="' . esc_url( $hcl1_btn1_link ) . '" class="btn ' . esc_attr( $btn_1_style ) . ' btn-lg">' . wp_kses_post( $hcl1_btn1_text ) . '</a>';} ?>
<?php if ( $hcl1_btn2_text != '' && $hcl1_btn2_link != '' ) {
echo '<a ' . $target_2 . ' href="' . esc_url( $hcl1_btn2_link ) . '" class="btn ' . esc_attr( $btn_2_style ) . ' btn-lg">' . wp_kses_post( $hcl1_btn2_text ) . '</a>';} ?>
</div>
</div>
<?php
}

?>
?>
</section>
<?php endif;

do_action('onepress_after_section_part', 'hero', $hook_args );
do_action( 'onepress_after_section_part', 'hero', $hook_args );
7 changes: 6 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 : https://demos.famethemes.com/onepress)
Version: 2.2.3
Version: 2.2.4
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 @@ -606,6 +606,11 @@ h6, p, ul, ol, dl, blockquote, pre {
word-wrap: break-word;
}

body.mce-content-body {
margin: 20px 40px;
font-size: 13px;
}

/*--------------------------------------------------------------
3.0 Layout
--------------------------------------------------------------*/
Expand Down

0 comments on commit 74071ff

Please sign in to comment.