Skip to content

Commit

Permalink
Merge pull request #182 from MachoThemes/master
Browse files Browse the repository at this point in the history
Updates
  • Loading branch information
cristianraiber authored Mar 20, 2017
2 parents f26c86d + 0cdee48 commit 612f0e1
Show file tree
Hide file tree
Showing 9 changed files with 90 additions and 109 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
### V2.0.1
- Fixed left sidebar mobile issue. ( https://github.com/puikinsh/illdy/issues/176 )
- Woocommerce "Additional Information" Tab issue. ( https://github.com/puikinsh/illdy/issues/179 )
- Allow change of font for title and also make the period optional( https://github.com/puikinsh/illdy/issues/180 )
- Contact Us Title not displaying on front end. ( https://github.com/puikinsh/illdy/issues/181 )

### V2.0.0
- Added new Welcome Page.
- Remove static fronpate action from Illdy theme and added to Illdy companion
Expand Down
54 changes: 54 additions & 0 deletions inc/back-compatible.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,58 @@

}


// Jumbotron Title
$first_word = get_theme_mod( 'illdy_jumbotron_general_first_row_from_title' );
$second_word = get_theme_mod( 'illdy_jumbotron_general_second_row_from_title' );
$third_word = get_theme_mod( 'illdy_jumbotron_general_third_row_from_title' );

if ( $first_word || $second_word || $third_word ) {

$title = '';
if ( $first_word ) {
$title = $first_word;
}
if ( $second_word ) {
if ( $title != '' ) {
$title .= '<span class="span-dot">.</span>';
}
$title .= $second_word;
}
if ( $third_word ) {
if ( $title != '' ) {
$title .= '<span class="span-dot">.</span>';
}
$title .= $third_word;
}


set_theme_mod( 'illdy_jumbotron_title', $title );
remove_theme_mod( 'illdy_jumbotron_general_first_row_from_title');
remove_theme_mod( 'illdy_jumbotron_general_second_row_from_title');
remove_theme_mod( 'illdy_jumbotron_general_third_row_from_title');

}

// Contact US Title
$contacus_title = get_theme_mod( 'illdy_contact_us_title' );
if ( $contacus_title ) {
set_theme_mod( 'illdy_contact_us_general_title', $contacus_title );
remove_theme_mod( 'illdy_contact_us_title');
}

//Adress Title
$address_title = get_theme_mod( 'illdy_contact_us_address_title' );
if ( $address_title ) {
set_theme_mod( 'illdy_contact_us_general_address_title', $address_title );
remove_theme_mod( 'illdy_contact_us_address_title');
}

//Support Title
$support_title = get_theme_mod( 'illdy_contact_us_customer_support_title' );
if ( $support_title ) {
set_theme_mod( 'illdy_contact_us_general_customer_support_title', $support_title );
remove_theme_mod( 'illdy_contact_us_customer_support_title');
}

}
6 changes: 3 additions & 3 deletions inc/customizer/customizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -345,10 +345,10 @@ function illdy_create_contact_tab_sections() {
$prefix = 'illdy';
$sections = array(
$prefix . '_contact_us_show',
$prefix . '_contact_us_title',
$prefix . '_contact_us_general_title',
$prefix . '_contact_us_entry',
$prefix . '_contact_us_address_title',
$prefix . '_contact_us_customer_support_title',
$prefix . '_contact_us_general_address_title',
$prefix . '_contact_us_general_customer_support_title',
);

if ( illdy_is_not_active_contact_form_7() ) {
Expand Down
24 changes: 9 additions & 15 deletions inc/customizer/panels/contact-us.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,25 +73,24 @@
);

// Title
$wp_customize->add_setting( $prefix .'_contact_us_title',
$wp_customize->add_setting( $prefix .'_contact_us_general_title',
array(
'sanitize_callback' => 'illdy_sanitize_html',
'default' => __( 'Contact us', 'illdy' ),
'transport' => 'postMessage'
)
);
$wp_customize->add_control(
$prefix .'_contact_us_title',
$prefix .'_contact_us_general_title',
array(
'label' => __( 'Title', 'illdy' ),
'description' => __( 'Add the title for this section.', 'illdy'),
'section' => $prefix . '_contact_us',
'priority' => 2
)
);
$wp_customize->selective_refresh->add_partial( $prefix .'_contact_us_title', array(
$wp_customize->selective_refresh->add_partial( $prefix .'_contact_us_general_title', array(
'selector' => '#contact-us .section-header h3',
'render_callback' => $prefix .'_contact_us_title',
) );

// Entry
Expand Down Expand Up @@ -140,49 +139,46 @@
}
$wp_customize->selective_refresh->add_partial( $prefix .'_contact_us_entry', array(
'selector' => '#contact-us .section-header .section-description',
'render_callback' => $prefix .'_contact_us_entry',
) );

// Address Title
$wp_customize->add_setting( $prefix .'_contact_us_address_title',
$wp_customize->add_setting( $prefix .'_contact_us_general_address_title',
array(
'sanitize_callback' => 'illdy_sanitize_html',
'default' => __( 'Address', 'illdy' ),
'transport' => 'postMessage'
)
);
$wp_customize->add_control(
$prefix .'_contact_us_address_title',
$prefix .'_contact_us_general_address_title',
array(
'label' => __( 'Address Title', 'illdy' ),
'section' => $prefix . '_contact_us',
'priority' => 4
)
);
$wp_customize->selective_refresh->add_partial( $prefix .'_contact_us_address_title', array(
$wp_customize->selective_refresh->add_partial( $prefix .'_contact_us_general_address_title', array(
'selector' => '#contact-us .section-content .row .col-sm-4 .box-left',
'render_callback' => $prefix .'_contact_us_address_title',
) );

// Customer Support Title
$wp_customize->add_setting( $prefix .'_contact_us_customer_support_title',
$wp_customize->add_setting( $prefix .'_contact_us_general_customer_support_title',
array(
'sanitize_callback' => 'illdy_sanitize_html',
'default' => __( 'Customer Support', 'illdy' ),
'transport' => 'postMessage'
)
);
$wp_customize->add_control(
$prefix .'_contact_us_customer_support_title',
$prefix .'_contact_us_general_customer_support_title',
array(
'label' => __( 'Customer Support Title', 'illdy' ),
'section' => $prefix . '_contact_us',
'priority' => 5
)
);
$wp_customize->selective_refresh->add_partial( $prefix .'_contact_us_customer_support_title', array(
$wp_customize->selective_refresh->add_partial( $prefix .'_contact_us_general_customer_support_title', array(
'selector' => '#contact-us .section-content .row .col-sm-5 .box-left',
'render_callback' => $prefix .'_contact_us_customer_support_title',
) );

// Contact Form 7
Expand Down Expand Up @@ -447,7 +443,6 @@
);
$wp_customize->selective_refresh->add_partial( $prefix .'_phone', array(
'selector' => '#contact-us .section-content .row .col-sm-5 .box-right span:nth-child(2)',
'render_callback' => $prefix .'_phone',
) );

// Address 1
Expand All @@ -470,7 +465,6 @@
);
$wp_customize->selective_refresh->add_partial( $prefix .'_address1', array(
'selector' => '#contact-us .section-content .row .col-sm-4 .box-right span:first-child',
'render_callback' => $prefix .'_address1',
) );

// Address 2
Expand Down
54 changes: 11 additions & 43 deletions inc/customizer/panels/jumbotron.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,53 +43,21 @@
'section' => $prefix . '_jumbotron_general',
) ) );

// First word from title
$wp_customize->add_setting( $prefix . '_jumbotron_general_first_row_from_title', array(
'sanitize_callback' => 'illdy_sanitize_html',
'default' => __( 'Clean', 'illdy' ),
$wp_customize->add_setting( $prefix . '_jumbotron_title', array(
'sanitize_callback' => 'wp_kses_post',
'default' => __( 'Clean <span class="span-dot">.</span> Slick<span class="span-dot">.</span> Pixel Perfect', 'illdy' ),
'transport' => 'postMessage',
) );
$wp_customize->add_control( $prefix . '_jumbotron_general_first_row_from_title', array(
'label' => __( 'First word from title', 'illdy' ),
'section' => $prefix . '_jumbotron_general',
) );

$wp_customize->selective_refresh->add_partial( $prefix .'_jumbotron_general_first_row_from_title', array(
'selector' => '#header .bottom-header.front-page h1 span:nth-child(1)',
'render_callback' => $prefix .'_jumbotron_general_first_row_from_title',
) );

// Second word from title
$wp_customize->add_setting( $prefix . '_jumbotron_general_second_row_from_title', array(
'sanitize_callback' => 'illdy_sanitize_html',
'default' => __( 'Slick', 'illdy' ),
'transport' => 'postMessage',
) );
$wp_customize->add_control( $prefix . '_jumbotron_general_second_row_from_title', array(
'label' => __( 'Second word from title', 'illdy' ),
'section' => $prefix . '_jumbotron_general',
) );

$wp_customize->selective_refresh->add_partial( $prefix .'_jumbotron_general_second_row_from_title', array(
'selector' => '#header .bottom-header.front-page h1 span:nth-child(3)',
'render_callback' => $prefix .'_jumbotron_general_second_row_from_title',
) );

// Third word from title
$wp_customize->add_setting( $prefix . '_jumbotron_general_third_row_from_title', array(
'sanitize_callback' => 'illdy_sanitize_html',
'default' => __( 'Pixel Perfect', 'illdy' ),
'transport' => 'postMessage',
) );
$wp_customize->add_control( $prefix . '_jumbotron_general_third_row_from_title', array(
'label' => __( 'Third word from title', 'illdy' ),
'section' => $prefix . '_jumbotron_general',
$wp_customize->add_control( new Epsilon_Editor_Custom_Control(
$wp_customize, $prefix . '_jumbotron_title', array(
'label' => __( 'Title', 'illdy' ),
'description' => __( 'Add the title for this section.', 'illdy' ),
'section' => $prefix . '_jumbotron_general',
) ) );
$wp_customize->selective_refresh->add_partial( $prefix .'_jumbotron_title', array(
'selector' => '#header .bottom-header.front-page h1',
) );

$wp_customize->selective_refresh->add_partial( $prefix .'_jumbotron_general_third_row_from_title', array(
'selector' => '#header .bottom-header.front-page h1 span:nth-child(5)',
// 'render_callback' => $prefix .'_jumbotron_general_second_row_from_title',
) );

// Entry
if ( get_theme_mod( $prefix . '_jumbotron_general_entry' ) ) {
Expand Down
2 changes: 0 additions & 2 deletions layout/css/main.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 1 addition & 26 deletions layout/js/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jQuery( document ).ready( function($) {

// Smooth Scroll Anchors
function smoothScrollAnchors() {
$('a[href*="#"]:not([href="#"])').on('click', function() {
$('body:not(.single-product) a[href*="#"]:not([href="#"])').on('click', function() {
if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
Expand Down Expand Up @@ -101,30 +101,6 @@ jQuery( document ).ready( function($) {
}
}

// WooCommerce Tabs
function woocommerceTabs() {
var descriptionTab = $( 'li.description_tab' );
var descriptionTabLink = $( 'li.description_tab a' );
var reviewsTab = $( 'li.reviews_tab' );
var reviewsTabLink = $( 'li.reviews_tab a' );
var panelDescription = $( '.panel#tab-description' );
var panelReviews = $( '.panel#tab-reviews' );

$( descriptionTabLink ).click( function() {
$( this ).parent().addClass( 'active' );
$( reviewsTab ).removeClass( 'active' );
$( panelDescription ).show();
$( panelReviews ).hide();
});

$( reviewsTabLink ).click( function() {
$( this ).parent().addClass( 'active' );
$( descriptionTab ).removeClass( 'active' );
$( panelReviews ).show();
$( panelDescription ).hide();
});
}

// Called Functions
$( function() {
isIsIOS();
Expand All @@ -135,7 +111,6 @@ jQuery( document ).ready( function($) {
setColorOnFrontPagePerson();
subMenu();
alignSubSubMenu();
woocommerceTabs();
});

// Window Resize
Expand Down
2 changes: 1 addition & 1 deletion layout/js/scripts.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 5 additions & 19 deletions sections/front-page-bottom-header.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,44 +8,30 @@
?>
<?php
if ( current_user_can( 'edit_theme_options' ) ) {
$first_row_from_title = get_theme_mod( 'illdy_jumbotron_general_first_row_from_title', __( 'Clean', 'illdy' ) );
$second_row_from_title = get_theme_mod( 'illdy_jumbotron_general_second_row_from_title', __( 'Slick', 'illdy' ) );
$third_row_from_title = get_theme_mod( 'illdy_jumbotron_general_third_row_from_title', __( 'Pixel Perfect', 'illdy' ) );
$jumbotron_title = get_theme_mod( 'illdy_jumbotron_title', __( 'Clean <span class="span-dot">.</span> Slick<span class="span-dot">.</span> Pixel Perfect', 'illdy' ) );
$entry = get_theme_mod( 'illdy_jumbotron_general_entry', __( 'lldy is a great one-page theme, perfect for developers and designers but also for someone who just wants a new website for his business. Try it now!', 'illdy' ) );
$first_button_title = get_theme_mod( 'illdy_jumbotron_general_first_button_title', __( 'Learn more', 'illdy' ) );
$first_button_url = get_theme_mod( 'illdy_jumbotron_general_first_button_url', esc_url( '#' ) );
$second_button_title = get_theme_mod( 'illdy_jumbotron_general_second_button_title', __( 'Download', 'illdy' ) );
$second_button_url = get_theme_mod( 'illdy_jumbotron_general_second_button_url', esc_url( '#' ) );
} else {
$first_row_from_title = get_theme_mod( 'illdy_jumbotron_general_first_row_from_title', get_the_title() );
$second_row_from_title = get_theme_mod( 'illdy_jumbotron_general_second_row_from_title' );
$third_row_from_title = get_theme_mod( 'illdy_jumbotron_general_third_row_from_title' );
$jumbotron_title = get_theme_mod( 'illdy_jumbotron_title', __( 'Clean <span class="span-dot">.</span> Slick<span class="span-dot">.</span> Pixel Perfect', 'illdy' ) );
$entry = get_theme_mod( 'illdy_jumbotron_general_entry' );
$first_button_title = get_theme_mod( 'illdy_jumbotron_general_first_button_title' );
$first_button_url = get_theme_mod( 'illdy_jumbotron_general_first_button_url' );
$second_button_title = get_theme_mod( 'illdy_jumbotron_general_second_button_title' );
$second_button_url = get_theme_mod( 'illdy_jumbotron_general_second_button_url' );
}

if ( $first_row_from_title || $second_row_from_title || $third_row_from_title || $entry || $first_button_title || $second_button_title ) {
if ( $jumbotron_title || $entry || $first_button_title || $second_button_title ) {

?>
<div class="bottom-header front-page">
<div class="container">
<div class="row">
<?php if ( $first_row_from_title || $second_row_from_title || $third_row_from_title ): ?>
<?php if ( $jumbotron_title ): ?>
<div class="col-sm-12">
<h1><?php if ( $first_row_from_title ) {
echo '<span data-customizer="first-row-from-title">' . illdy_sanitize_html( $first_row_from_title ) . '</span><span class="span-dot first-span-dot">' . __( '.', 'illdy' ) . '</span>';
} ?>
<?php if ( $second_row_from_title ) {
echo '<span data-customizer="second-row-from-title">' . illdy_sanitize_html( $second_row_from_title ) . '</span><span class="span-dot second-span-dot">' . __( '.', 'illdy' ) . '</span>';
} ?>

<?php if ( $third_row_from_title ) {
echo '<span data-customizer="third-row-from-title">' . illdy_sanitize_html( $third_row_from_title ) . '</span>';
} ?>
</h1>
<h1><?php echo $jumbotron_title; ?></h1>
</div><!--/.col-sm-12-->
<?php endif; ?>
<div class="col-sm-8 col-sm-offset-2">
Expand Down

0 comments on commit 612f0e1

Please sign in to comment.