Created
April 23, 2018 08:49
-
-
Save shrimp2t/3af0cba6b17d7d1877cb364b85d7b944 to your computer and use it in GitHub Desktop.
Customify Export Default Theme Mod
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 | |
/** | |
* Plugin Name: Customify Export Default | |
* Plugin URI: # | |
* Description: | |
* Author: | |
* Version: 1.0 | |
*/ | |
function customify_customize_export(){ | |
if ( isset( $_GET['customify_export']) ) { | |
//$mod = get_theme_mods(); | |
$fields = Customify_Customizer::get_config(); | |
$data = array(); | |
foreach( $fields as $f ) { | |
$key = $f['name']; | |
$value = get_theme_mod( $key ); | |
if ( ! empty( $value ) ) { | |
$data[ $key ] = $value; | |
} | |
} | |
var_export( $data ); | |
die(); | |
} | |
} | |
add_action( 'wp', 'customify_customize_export' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment