Skip to content
This repository was archived by the owner on Jan 28, 2019. It is now read-only.

Commit de781a7

Browse files
Merge pull request #410 from Codeinwp/development
Make contact form on contact page full width when the page content is empty Fixed issue with large menus loading slowly in header Improved code Make About section full width when no image is selected Add an improved icon picker in customizer
2 parents 35a8efb + 3e6cfbf commit de781a7

23 files changed

+1473
-907
lines changed

content-contact.php

+14-10
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,21 @@
1717

1818
<?php
1919
$parallax_one_contact_form_shortcode = get_theme_mod('parallax_one_contact_form_shortcode');
20+
21+
$contact_column = empty($parallax_one_contact_form_shortcode) || $post->post_content === "" ? "col-md-12" : "col-md-6";
22+
23+
if( $post->post_content !== "" ):
24+
echo '<div class="' . $contact_column . '">';
25+
the_content();
26+
echo '</div>';
27+
endif;
28+
29+
if(!empty($parallax_one_contact_form_shortcode)) {
30+
echo '<div class="' . $contact_column . '">';
31+
echo do_shortcode( $parallax_one_contact_form_shortcode);
32+
echo '</div>';
33+
}
2034
?>
21-
<div class="col-md-6">
22-
<?php the_content(); ?>
23-
</div>
24-
<?php
25-
if(!empty($parallax_one_contact_form_shortcode)) {
26-
echo '<div class="col-md-6">';
27-
echo do_shortcode( $parallax_one_contact_form_shortcode);
28-
echo '</div>';
29-
}
30-
?>
3135

3236
<footer class="entry-footer">
3337
<?php edit_post_link( esc_html__( 'Edit', 'parallax-one' ), '<span class="edit-link">', '</span>' ); ?>

css/admin-style.css

-7
Large diffs are not rendered by default.

footer.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,12 @@
4545

4646
<div class="footer-bottom-wrap">
4747
<?php
48-
global $wp_customize;
4948
$paralax_one_copyright = get_theme_mod('parallax_one_copyright','Themeisle');
5049

5150
if( !empty($paralax_one_copyright) ){ ?>
5251
<span class="parallax_one_copyright_content"><?php echo esc_attr($paralax_one_copyright); ?></span>
5352
<?php
54-
} elseif ( isset( $wp_customize ) ) { ?>
53+
} elseif ( is_customize_preview() ) { ?>
5554
<span class="parallax_one_copyright_content paralax_one_only_customizer"></span>
5655
<?php
5756
} ?>

functions.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,9 @@ function parallax_one_wp_page_menu()
186186

187187

188188
function parallax_one_customizer_scripts(){
189-
wp_register_script( 'parallax_ddslick', get_template_directory_uri() .'/js/jquery.ddslick.js', array("jquery"), '1.0.0');
190189

191-
wp_enqueue_script( 'parallax_one_customizer_script', parallax_get_file('/js/parallax_one_customizer.js'), array("jquery","jquery-ui-draggable","parallax_ddslick"),'1.0.2', true );
190+
191+
wp_enqueue_script( 'parallax_one_customizer_script', parallax_get_file('/js/parallax_one_customizer.js'), array("jquery","jquery-ui-draggable"),'1.0.2', true );
192192

193193
wp_localize_script( 'parallax_one_customizer_script', 'parallaxOneCustomizerObject', array(
194194

header.php

+2-4
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@
3333
============================== -->
3434
<?php
3535

36-
global $wp_customize;
37-
38-
if(is_front_page() && !isset( $wp_customize ) && get_option( 'show_on_front' ) != 'page' ):
36+
if(is_front_page() && !is_customize_preview() && get_option( 'show_on_front' ) != 'page' ):
3937

4038
$parallax_one_disable_preloader = get_theme_mod('paralax_one_disable_preloader');
4139

@@ -119,7 +117,7 @@
119117

120118
else:
121119

122-
if( isset( $wp_customize ) ):
120+
if( is_customize_preview() ):
123121

124122
echo '<a href="'.esc_url( home_url( '/' ) ).'" class="navbar-brand paralax_one_only_customizer" title="'.get_bloginfo('title').'">';
125123

inc/class/parallax-one-general-control.php

+358-455
Large diffs are not rendered by default.

inc/icon-picker/css/iconpicker.min.css

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

inc/icon-picker/css/stamp-icons.min.css

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
( function( $ ) {
2+
3+
$( function() {
4+
$( '.icp' ).iconpicker().on( 'iconpickerUpdated', function() {
5+
$( this ).trigger( 'change' );
6+
} );
7+
} );
8+
9+
} )( jQuery );

0 commit comments

Comments
 (0)