123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- <?php
- /**
- * This file adds the Theme Defaults to the Captivating Theme.
- *
- * @package Captivating
- * @subpackage Customizations
- * @link http://restored316designs.com/themes
- * @author Lauren Gaige // Restored 316 LLC
- * @copyright Copyright (c) 2015, Restored 316 LLC, Released 08/09/2017
- * @license GPL-2.0+
- */
- //* Captivating Theme Setting Defaults
- add_filter( 'genesis_theme_settings_defaults', 'captivating_theme_defaults' );
- function captivating_theme_defaults( $defaults ) {
- $defaults['blog_cat_num'] = 5;
- $defaults['content_archive'] = 'full';
- $defaults['content_archive_limit'] = 500;
- $defaults['content_archive_thumbnail'] = 1;
- $defaults['image_size'] = 'vertical-entry-image';
- $defaults['image_alignment'] = 'alignleft';
- $defaults['posts_nav'] = 'numeric';
- $defaults['site_layout'] = 'content-sidebar';
- return $defaults;
- }
- //* Captivating Theme Setup
- add_action( 'after_switch_theme', 'captivating_theme_setting_defaults' );
- function captivating_theme_setting_defaults() {
- if( function_exists( 'genesis_update_settings' ) ) {
- genesis_update_settings( array(
- 'blog_cat_num' => 5,
- 'content_archive' => 'full',
- 'content_archive_limit' => 500,
- 'content_archive_thumbnail' => 1,
- 'image_size' => 'vertical-entry-image',
- 'image_alignment' => 'alignleft',
- 'posts_nav' => 'numeric',
- 'site_layout' => 'content-sidebar',
- ) );
-
- }
- update_option( 'posts_per_page', 5 );
- }
- //* Captivating Simple Social Icon Defaults
- add_filter( 'simple_social_default_styles', 'captivating_social_default_styles' );
- function captivating_social_default_styles( $defaults ) {
- $args = array(
- 'alignment' => 'aligncenter',
- 'background_color' => '#FFFFFF',
- 'background_color_hover' => '#FFFFFF',
- 'border_radius' => 0,
- 'border_color' => '#FFFFFF',
- 'border_color_hover' => '#FFFFFF',
- 'border_width' => 0,
- 'icon_color' => '#3a4974',
- 'icon_color_hover' => '#333333',
- 'size' => 26,
- 'new_window' => 1,
- );
-
- $args = wp_parse_args( $args, $defaults );
-
- return $args;
-
- }
- //* Set Genesis Responsive Slider defaults
- add_filter( 'genesis_responsive_slider_settings_defaults', 'captivating_responsive_slider_defaults' );
- function captivating_responsive_slider_defaults( $defaults ) {
- $args = array(
- 'location_horizontal' => 'Left',
- 'location_vertical' => 'Top',
- 'posts_num' => '5',
- 'slideshow_excerpt_content_limit' => '0',
- 'slideshow_excerpt_content' => 'full',
- 'slideshow_excerpt_width' => '30',
- 'slideshow_excerpt_show' => 0,
- 'slideshow_height' => '600',
- 'slideshow_more_text' => __( 'Read More', 'captivating' ),
- 'slideshow_title_show' => 1,
- 'slideshow_width' => '1220',
- );
- $args = wp_parse_args( $args, $defaults );
-
- return $args;
- }
- //* Set option to show posts on front page after switching themes
- add_action( 'after_switch_theme', 'captivating_theme_reading_defaults' );
- function captivating_theme_reading_defaults() {
- if ( 'posts' != get_option( 'show_on_front' ) ) {
-
- update_option( 'show_on_front', 'posts' );
-
- }
- }
|