Last active
August 29, 2015 14:01
-
-
Save proframework/2100e308050c3aa00a94 to your computer and use it in GitHub Desktop.
This file contains hidden or 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_action('admin_notices','themeslug_import_settings'); | |
function themeslug_import_settings() | |
{ | |
global $pagenow; | |
if ( is_admin() && $pagenow == "themes.php" && isset( $_GET['activated'] ) ) { | |
?> | |
<div class="updated below-h2"> | |
<p style="font-size: 18px;"> | |
<?php _e('<strong>You\'re almost done!</strong> To import settings for this theme,');?> <a href="<?php echo admin_url('themes.php');?>?slug=installchild"><?php _e('click here','generate');?></a>. | |
</p> | |
</div> | |
<?php | |
} | |
if ( is_admin() && $pagenow == 'themes.php' && isset( $_GET['slug'] ) ) { | |
if ($_GET['gen'] == 'installchild') { | |
?> | |
<div class="updated below-h2"> | |
<p> | |
<?php _e('Child theme successfully installed.','generate'); ?> | |
</p> | |
</div> | |
<?php | |
$new_defaults = array( | |
'container_width' => '700', | |
'header_layout_setting' => 'fluid-header', | |
'nav_layout_setting' => 'fluid-nav', | |
'nav_position_setting' => 'nav-below-header', | |
'content_layout_setting' => 'separate-containers', | |
'layout_setting' => 'left-sidebar' | |
); | |
update_option( 'generate_settings', $new_defaults ); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment