This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This function handles updating old settings that are now outdated and should | |
* only fire on theme updates and activations. | |
* | |
* @since Crush 3.0.7 | |
*/ | |
function jnt_migrate_settings() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* re-skin the title sections */ | |
#customize-theme-controls li.accordion-sectional-title { | |
display: block !important; | |
background: none; | |
outline: none; | |
margin: 30px 15px 10px 15px; | |
} | |
#customize-theme-controls li.accordion-sectional-title h3 { | |
font-size: 18px; | |
line-height: 1.6; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* re-skin the title sections */ | |
#customize-theme-controls li.accordion-sectional-title { | |
display: block !important; | |
background: none; | |
outline: none; | |
padding: 25px 15px 10px 15px; | |
border: none; | |
} | |
#customize-theme-controls li.accordion-sectional-title h3 { | |
font-size: 18px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Enqueue our customizer UI stylesheet so we can style our custom section titles | |
* @return void | |
*/ | |
function jn_customizer_ui_styles() { | |
wp_enqueue_style('jn-customizer-ui-styles', get_theme_file_uri('/jn-customizer-ui-styles.css'), 'all' ); | |
} | |
add_action( 'customize_controls_enqueue_scripts', 'jn_customizer_ui_styles' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Register our sectional titles in the customizer | |
* @param class $wp_customize Instance of WP_Customize_Manager created when using the 'customize_register' hook | |
*/ | |
add_action( 'customize_register', 'jn_customizer_titles' ); | |
function jn_customizer_titles( $wp_customize ) { | |
$text_domain = 'your_themes_text_domain'; | |
// layout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Add a new section class that allows for adding sectional titles to the customizer | |
* @param class $wp_customize Instance of WP_Customize_Manager created when using the 'customize_register' hook | |
*/ | |
add_action( 'customize_register', 'jn_section_titles_class' ); | |
function jn_section_titles_class($wp_customize) { | |
/** | |
* Extends the WP_Customize_Section for custom output | |
* @return void |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo '<pre>'; | |
echo '<span style="color:blue">DOWNLOADING...</span>'.PHP_EOL; | |
// Download file | |
file_put_contents('wp.zip', file_get_contents('http://wordpress.org/latest.zip')); | |
$zip = new ZipArchive(); | |
$res = $zip->open('wp.zip'); | |
if ($res === TRUE) { |