Esempio n. 1
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'));
    }
    update_option('posts_per_page', 5);
}
Esempio n. 2
0
/**
* Updates theme settings on activation.
*
* @since 2.2.3
*/
function genesis_sample_theme_setting_defaults()
{
    if (function_exists('genesis_update_settings')) {
        genesis_update_settings(array('blog_cat_num' => 6, 'content_archive' => 'full', 'content_archive_limit' => 0, 'content_archive_thumbnail' => 0, 'posts_nav' => 'numeric', 'site_layout' => 'content-sidebar'));
    }
    update_option('posts_per_page', 6);
}
function leadership_isd_theme_setting_defaults()
{
    if (function_exists('genesis_update_settings')) {
        genesis_update_settings(array('blog_cat_num' => 6, 'content_archive' => 'full', 'content_archive_limit' => 0, 'content_archive_thumbnail' => 1, 'image_alignment' => '', 'image_size' => 'featured-content-lg', 'posts_nav' => 'numeric', 'site_layout' => 'sidebar-content'));
    }
    update_option('posts_per_page', 6);
}
Esempio n. 4
0
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);
}
function author_theme_setting_defaults()
{
    if (function_exists('genesis_update_settings')) {
        genesis_update_settings(array('blog_cat_num' => 6, 'content_archive_limit' => 0, 'content_archive_thumbnail' => 0, 'image_alignment' => 'alignleft', 'posts_nav' => 'numeric', 'site_layout' => 'full-width-content'));
        if (function_exists('GenesisResponsiveSliderInit')) {
            genesis_update_settings(array('location_horizontal' => 'left', 'location_vertical' => 'top', 'posts_num' => '5', 'slideshow_arrows' => 0, 'slideshow_excerpt_content_limit' => '100', 'slideshow_excerpt_content' => 'full', 'slideshow_excerpt_width' => '60', 'slideshow_excerpt_show' => 1, 'slideshow_height' => '400', 'slideshow_more_text' => __('Continue Reading…', 'author'), 'slideshow_pager' => 1, 'slideshow_title_show' => 1, 'slideshow_width' => '1080'), GENESIS_RESPONSIVE_SLIDER_SETTINGS_FIELD);
        }
    }
    update_option('posts_per_page', 6);
}
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);
}
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);
}
function executive_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, 'image_alignment' => 'alignleft', 'posts_nav' => 'numeric', 'site_layout' => 'content-sidebar'));
        if (function_exists('GenesisResponsiveSliderInit')) {
            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);
        }
    } else {
        _genesis_update_settings(array('blog_cat_num' => 5, 'content_archive' => 'full', 'content_archive_limit' => 0, 'content_archive_thumbnail' => 0, 'image_alignment' => 'alignleft', 'posts_nav' => 'numeric', 'site_layout' => 'content-sidebar'));
        if (function_exists('GenesisResponsiveSliderInit')) {
            _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);
}
Esempio n. 9
0
/**
 * Upgrade the database to version 1700.
 *
 * Also removes old user meta box options, as the UI changed.
 *
 * @since 1.7.0
 *
 * @uses genesis_update_settings() Merges new settings with old settings and pushes them into the database.
 *
 * @global object $wpdb WordPress database object.
 */
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'));
}
Esempio n. 10
0
/**
 * Deprecated. Push individual setting (or group of setting) into an options db entry stored as an array.
 *
 * @since 1.7.0
 * @deprecated 2.1.0
 */
function _genesis_update_settings($new, $setting = null)
{
    _deprecated_function(__FUNCTION__, '2.1.0', "genesis_update_setting");
    genesis_update_settings($new, $setting);
}