function executive_theme_setting_defaults()
{
    _genesis_update_settings(array('blog_cat_num' => 5, 'content_archive' => 'full', 'content_archive_limit' => 0, 'content_archive_thumbnail' => 0, 'posts_nav' => 'numeric', 'site_layout' => 'content-sidebar'));
    _genesis_update_settings(array('location_horizontal' => 'Left', 'location_vertical' => 'Top', 'posts_num' => '3', 'slideshow_excerpt_content_limit' => '100', 'slideshow_excerpt_content' => 'full', 'slideshow_excerpt_width' => '30', 'slideshow_height' => '445', 'slideshow_more_text' => __('Continue Reading…', 'executive'), 'slideshow_title_show' => 1, 'slideshow_width' => '1140'), GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD);
    update_option('posts_per_page', 5);
    flush_rewrite_rules(false);
}
function centric_theme_setting_defaults()
{
    if (function_exists('genesis_update_settings')) {
        genesis_update_settings(array('blog_cat_num' => 10, 'content_archive' => 'full', 'content_archive_limit' => 500, 'content_archive_thumbnail' => 0, 'image_alignment' => 'alignleft', 'posts_nav' => 'numeric', 'site_layout' => 'content-sidebar'));
    } else {
        _genesis_update_settings(array('blog_cat_num' => 10, 'content_archive' => 'full', 'content_archive_limit' => 500, 'content_archive_thumbnail' => 0, 'image_alignment' => 'alignleft', 'posts_nav' => 'numeric', 'site_layout' => 'content-sidebar'));
    }
    update_option('posts_per_page', 10);
}
/**
 * Upgrade the database to version 1700
 *
 * @since 1.7
 */
function genesis_upgrade_1700()
{
    global $wpdb;
    /** Changing the UI. Remove old user options. */
    $wpdb->query($wpdb->prepare("DELETE FROM {$wpdb->usermeta} WHERE meta_key = %s OR meta_key = %s", 'meta-box-order_toplevel_page_genesis', 'meta-box-order_genesis_page_seosettings'));
    $wpdb->query($wpdb->prepare("UPDATE {$wpdb->usermeta} SET meta_value = %s WHERE meta_key = %s OR meta_key = %s", '1', 'screen_layout_toplevel_page_genesis', 'screen_layout_genesis_page_seosettings'));
    /** Update Settings */
    _genesis_update_settings(array('db_version' => '1700'));
}
Exemple #4
0
function parallax_theme_setting_defaults()
{
    if (function_exists('genesis_update_settings')) {
        genesis_update_settings(array('blog_cat_num' => 5, 'content_archive' => 'full', 'content_archive_limit' => 0, 'content_archive_thumbnail' => 0, 'posts_nav' => 'numeric', 'site_layout' => 'full-width-content'));
    } else {
        _genesis_update_settings(array('blog_cat_num' => 5, 'content_archive' => 'full', 'content_archive_limit' => 0, 'content_archive_thumbnail' => 0, 'posts_nav' => 'numeric', 'site_layout' => 'full-width-content'));
    }
    update_option('posts_per_page', 5);
}
function magazine_theme_setting_defaults()
{
    if (function_exists('genesis_update_settings')) {
        genesis_update_settings(array('blog_cat_num' => 5, 'content_archive' => 'full', 'content_archive_limit' => 380, 'content_archive_thumbnail' => 1, 'image_alignment' => 'alignleft', 'image_size' => 'thumbnail', 'posts_nav' => 'prev-next', 'site_layout' => 'content-sidebar'));
        genesis_update_settings(array('location_horizontal' => 'left', 'location_vertical' => 'bottom', 'posts_num' => '3', 'slideshow_excerpt_content_limit' => '100', 'slideshow_excerpt_content' => 'full', 'slideshow_excerpt_show' => 0, 'slideshow_excerpt_width' => '100', 'slideshow_height' => '420', 'slideshow_hide_mobile' => 1, 'slideshow_more_text' => __('Continue Reading', 'outreach'), 'slideshow_title_show' => 1, 'slideshow_width' => '750'), GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD);
    } else {
        _genesis_update_settings(array('blog_cat_num' => 5, 'content_archive' => 'full', 'content_archive_limit' => 380, 'content_archive_thumbnail' => 1, 'image_alignment' => 'alignleft', 'image_size' => 'thumbnail', 'posts_nav' => 'prev-next', 'site_layout' => 'content-sidebar'));
        _genesis_update_settings(array('location_horizontal' => 'left', 'location_vertical' => 'bottom', 'posts_num' => '3', 'slideshow_excerpt_content_limit' => '100', 'slideshow_excerpt_content' => 'full', 'slideshow_excerpt_show' => 0, 'slideshow_excerpt_width' => '100', 'slideshow_height' => '420', 'slideshow_hide_mobile' => 1, 'slideshow_more_text' => __('Continue Reading', 'outreach'), 'slideshow_title_show' => 1, 'slideshow_width' => '750'), GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD);
    }
    update_option('posts_per_page', 5);
}
Exemple #6
0
/**
 * Upgrade the database to version 1500.
 *
 * @since 1.5.0
 *
 * @uses _genesis_update_settings()
 */
function prose_update_1500()
{
    /** Calculate new unitless line height */
    $body_line_height = absint(prose_get_design_option('body_line_height')) / absint(prose_get_design_option('body_font_size'));
    /** Update Settings */
    _genesis_update_settings(array('theme_version' => '1.5.0', 'db_version' => '1500', 'body_line_height' => round($body_line_height, 3)), PROSE_SETTINGS_FIELD);
    /** write CSS to media folder */
    prose_create_stylesheets();
    /** write custom.php to media folder */
    prose_create_custom_php();
}
function nonprofit_theme_setting_defaults()
{
    if (function_exists('genesis_update_settings')) {
        genesis_update_settings(array('blog_cat_num' => 3, 'content_archive' => 'excerpts', 'content_archive_limit' => 0, 'content_archive_thumbnail' => 0, 'image_alignment' => 'alignleft', 'posts_nav' => 'numeric', 'site_layout' => 'content-sidebar'));
        if (defined('GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD')) {
            genesis_update_settings(array('location_horizontal' => 'right', 'location_vertical' => 'top', 'posts_num' => '3', 'slideshow_arrows' => 0, 'slideshow_excerpt_content_limit' => '170', 'slideshow_excerpt_content' => 'full', 'slideshow_excerpt_width' => '35', 'slideshow_height' => '800', 'slideshow_more_text' => __('Continue Reading', 'nonprofit'), 'slideshow_pager' => 0, 'slideshow_title_show' => 1, 'slideshow_width' => '1600'), GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD);
        }
    } else {
        _genesis_update_settings(array('blog_cat_num' => 3, 'content_archive' => 'excerpts', 'content_archive_limit' => 0, 'content_archive_thumbnail' => 0, 'image_alignment' => 'alignleft', 'posts_nav' => 'numeric', 'site_layout' => 'content-sidebar'));
        _genesis_update_settings(array('location_horizontal' => 'right', 'location_vertical' => 'top', 'posts_num' => '3', 'slideshow_arrows' => 0, 'slideshow_excerpt_content_limit' => '170', 'slideshow_excerpt_content' => 'full', 'slideshow_excerpt_width' => '35', 'slideshow_height' => '800', 'slideshow_more_text' => __('Continue Reading', 'nonprofit'), 'slideshow_pager' => 0, 'slideshow_title_show' => 1, 'slideshow_width' => '1600'), GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD);
    }
    update_option('posts_per_page', 3);
}
/**
 * Get config options from DB
 * @param array any new options to update
 */
function gltw_api_config(array $update = array())
{
    static $conf;
    if (!isset($conf)) {
        $conf = array('consumer_key' => '', 'consumer_secret' => '', 'request_secret' => '', 'access_key' => '', 'access_secret' => '');
        foreach ($conf as $key => $val) {
            $conf[$key] = genesis_get_option($key, 'gltw_widget_field') or $conf[$key] = $val;
        }
    }
    foreach ($update as $key => $val) {
        if (isset($conf[$key])) {
            _genesis_update_settings(array($key => $val), 'gltw_widget_field');
            $conf[$key] = $val;
        }
    }
    return $conf;
}