Skip to content

Commit

Permalink
Fixed cf7 & dismiss customizer actions
Browse files Browse the repository at this point in the history
  • Loading branch information
giucu91 committed Feb 25, 2017
1 parent bf3d3d7 commit cadcbb6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
11 changes: 4 additions & 7 deletions inc/customizer/assets/js/illdy-customizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -831,8 +831,6 @@
liveObj.values.illdy_jumbotron_first_border_color = illdy_hexToRgbA( color, '1' );
}

console.log(liveObj);

wp.customize.previewer.send('update-section-css', liveObj);

}
Expand Down Expand Up @@ -861,7 +859,6 @@
_.each( sections.fullwidth, function( setting ){
liveObj.values[setting] = wp.customize(setting)();
});
console.log('in fws');
wp.customize.previewer.send('update-section-css', liveObj);
}

Expand Down Expand Up @@ -982,9 +979,9 @@ jQuery(document).ready(function(){
type: "GET",
data: { action: 'illdy_dismiss_required_action', id: id, todo: action },
dataType: "html",
url: illdyWelcomeScreenObject.ajaxurl,
url: IlldyCustomizer.ajax_url,
beforeSend: function (data, settings) {
jQuery('#' + id).parent().append('<div id="temp_load" style="text-align:center"><img src="' + illdyWelcomeScreenObject.template_directory + '/inc/admin/welcome-screen/img/ajax-loader.gif" /></div>');
jQuery('#' + id).parent().append('<div id="temp_load" style="text-align:center"><img src="' + IlldyCustomizer.template_directory + '/inc/admin/welcome-screen/img/ajax-loader.gif" /></div>');
},
success: function (data) {
var container = jQuery('#' + data).parent().parent();
Expand Down Expand Up @@ -1018,9 +1015,9 @@ jQuery(document).ready(function(){
type: "GET",
data: { action: 'illdy_dismiss_recommended_plugins', id: id, todo: action },
dataType: "html",
url: illdyWelcomeScreenObject.ajaxurl,
url: IlldyCustomizer.ajax_url,
beforeSend: function (data, settings) {
jQuery('#' + id).parent().append('<div id="temp_load" style="text-align:center"><img src="' + illdyWelcomeScreenObject.template_directory + '/inc/admin/welcome-screen/img/ajax-loader.gif" /></div>');
jQuery('#' + id).parent().append('<div id="temp_load" style="text-align:center"><img src="' + IlldyCustomizer.template_directory + '/inc/admin/welcome-screen/img/ajax-loader.gif" /></div>');
},
success: function (data) {
var container = jQuery('#' + data).parent().parent();
Expand Down
1 change: 1 addition & 0 deletions inc/customizer/customizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ function illdy_customizer_js_load() {
$IlldyCustomizer = array();
$IlldyCustomizer['sections'] = illdy_get_sections_position();
$IlldyCustomizer['ajax_url'] = admin_url( 'admin-ajax.php' );
$IlldyCustomizer['template_directory'] = get_template_directory_uri();

wp_localize_script( 'illdy-customizer', 'IlldyCustomizer', $IlldyCustomizer );

Expand Down
4 changes: 2 additions & 2 deletions sections/front-page-contact-us.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
$address2 = get_theme_mod( 'illdy_address2', __( 'London, UK', 'illdy' ) );
$general_title = get_theme_mod( 'illdy_contact_us_general_title', __( 'Contact us', 'illdy' ) );
$general_entry = get_theme_mod( 'illdy_contact_us_entry', __( 'And we will get in touch as soon as possible.', 'illdy' ) );
$general_contact_form_7 = get_theme_mod( 'illdy_contact_us_contact_form_7' );
$general_contact_form_7 = get_theme_mod( 'illdy_contact_us_general_contact_form_7' );
$general_address_title = get_theme_mod( 'illdy_contact_us_general_address_title', __( 'Address', 'illdy' ) );
$customer_support_title = get_theme_mod( 'illdy_contact_us_general_customer_support_title', __( 'Customer Support', 'illdy' ) );
} else {
Expand All @@ -41,7 +41,7 @@
$address2 = get_theme_mod( 'illdy_address2' );
$general_title = get_theme_mod( 'illdy_contact_us_general_title' );
$general_entry = get_theme_mod( 'illdy_contact_us_entry' );
$general_contact_form_7 = get_theme_mod( 'illdy_contact_us_contact_form_7' );
$general_contact_form_7 = get_theme_mod( 'illdy_contact_us_general_contact_form_7' );
$general_address_title = get_theme_mod( 'illdy_contact_us_general_address_title' );
$customer_support_title = get_theme_mod( 'illdy_contact_us_general_customer_support_title' );
}
Expand Down

0 comments on commit cadcbb6

Please sign in to comment.