Advertisement
Guest User

ignite

a guest
Aug 15th, 2012
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 6.83 KB | None | 0 0
  1. <?php
  2. // Setup  -- Probably want to keep this stuff...
  3. require_once( dirname(__FILE__) . '/setup.php' );
  4.    
  5. pagelines_disable_settings( array( 'panel' => 'color_control', 'keep' => false ) );
  6.  
  7.  
  8. // Default typography
  9. pl_default_setting( array( 'key' => 'type_headers', 'value' => array('font' => 'lato', 'transform' => 'capitalize' ) ) );
  10. pl_default_setting( array( 'key' => 'type_primary', 'value' => array('font' => 'ofl_sorts_mill_goudy_tt' ) ) );
  11. pl_default_setting( array( 'key' => 'type_secondary', 'value' => array('font' => 'lato', 'transform' => 'uppercase' ) ) );
  12.  
  13.  
  14. // Supports these additional sections
  15. pl_support_section( array( 'slug' => 'pagelines-reader', 'class_name' => 'plReader', 'disable_color' => true ) );
  16. pl_support_section( array( 'slug' => 'pagelines-profiles', 'class_name' => 'PLProfiles', 'disable_color' => true ) );
  17. pl_support_section( array( 'slug' => 'pagelines-pricing', 'class_name' => 'PLPricing', 'disable_color' => true ) );
  18.  
  19.  
  20. // ===========
  21. // = Filters =
  22. // ===========
  23.  
  24. add_filter('pagelines_post_metabar','wt_metabar');
  25.  
  26. function wt_metabar(){
  27.     ob_start();?>  
  28.     <div id="postmeta" class="accent">
  29.         <span id="date">
  30.              <?php the_date();?>
  31.         </span>
  32.         <span id="author">
  33.              <?php echo do_shortcode('[post_author_posts_link]');?>
  34.         </span>
  35.         <?php $cats = get_the_category_list( );
  36.         if ($cats) { ?>
  37.             <span id="cats">
  38.                 <?php echo do_shortcode('[post_categories]');?>
  39.             </span>
  40.         <?php } ?>
  41.      </div>
  42.     <?php
  43.     return ob_get_clean();
  44. }
  45.  
  46. // =========
  47. // = Hooks =
  48. // =========
  49.  
  50. add_action('wp_footer','insert_white_fade');
  51.  
  52. function insert_white_fade(){
  53.     ?>
  54.     <script type="text/javascript">
  55.         var $j = jQuery.noConflict();
  56.         $j('.searchform input.submit').attr('src','<?php echo CHILD_IMAGES?>/search.png');
  57.         <?php echo '$j("#dynamic-content").find(".content").first().prepend("<img id=\"feature_holder_bg\" src=\"'.CHILD_IMAGES.'/white_box_fade.png\"/>");';?>
  58.         <?php echo '$j(".buddypress-page #dynamic-content").find("#content").first().prepend("<img id=\"feature_holder_bg\" src=\"'.CHILD_IMAGES.'/white_box_fade.png\"/>");';?>
  59.     </script>
  60.     <?php
  61. }
  62.  
  63. add_filter('pagelines_options_array', 'ignite_options');
  64.  
  65. function ignite_options($original_option_array){
  66.    $ignite_options_array = array(
  67.         'Ignite_options' => array(
  68.         'color_options' => array(
  69.                    'default'    => 'black',
  70.                    'type'        => 'select',
  71.                    'selectvalues'    => array(
  72.                        'black'    => array('name'=> __( 'Black', 'pagelines' )),
  73.                        'grey'    => array('name'=> __( 'Grey', 'pagelines' )),
  74.                        'red'        => array('name'=> __( 'Red', 'pagelines' )),
  75.                        'darkBlue'    => array('name'=> __( 'Dark Blue', 'pagelines' )),
  76.                        'lightBlue'        => array('name'=> __( 'Light Blue', 'pagelines' )),
  77.                        'orange'        => array('name'=> __( 'Orange', 'pagelines' )),
  78.                        'green'    => array('name'=> __( 'Green', 'pagelines' )),
  79.                        'purple'        => array('name'=> __( 'Purple', 'pagelines' )),
  80.                    ),
  81.                    'inputlabel'=> __( 'Select your Color Scheme', 'pagelines' ),
  82.                    'title'        => __( 'Ignite Color Options', 'pagelines' ),                        
  83.                    'shortexp'    => __( 'Select Which To Show', 'pagelines' ),
  84.                    'exp'        => __( "Select the main color scheme for this child theme", 'pagelines' )
  85.            ),
  86.    
  87.         'header_shadows' => array(
  88.                    'default'    => 'yes',
  89.                    'type'        => 'select',
  90.                    'selectvalues'    => array(
  91.                        'yes'    => array('name'=> __( 'Yes', 'pagelines' )),
  92.                        'no'    => array('name'=> __( 'No', 'pagelines' )),
  93.                    ),
  94.                    'inputlabel'=> __( 'Use text shadow on post/page headers', 'pagelines' ),
  95.                    'title'        => __( 'Text Shadows', 'pagelines' ),                        
  96.                    'shortexp'    => __( 'Select Which To Show', 'pagelines' ),
  97.            ),
  98.        'custom-text-colors' => array(
  99.                 'title'     => 'Ignite Text Colors',
  100.                 'layout'    => 'layout',
  101.                 'shortexp'  => 'This section controls the basic theme text color options',
  102.                 'type'      => 'color_multi',
  103.                 'selectvalues'  => array(
  104.                     'ignite_text'   => array(
  105.                         'default'       => '',
  106.                         'css_prop'      => 'color',
  107.                         'selectors'     => 'body',
  108.                         'inputlabel'    => 'Body Text Color',
  109.                     ),
  110.                     'ignite_link'   => array(
  111.                         'default'       => '',
  112.                         'css_prop'      => 'color',
  113.                         'selectors'     => 'body a',
  114.                         'inputlabel'    => 'Link Color',
  115.                     ),
  116.                     'ignite_link_hover' => array(
  117.                         'default'       => '',
  118.                         'css_prop'      => 'color',
  119.                         'selectors'     => 'body a:hover',
  120.                         'inputlabel'    => 'Link Hover Color',
  121.                     ),
  122.  
  123.                 )
  124.             ),
  125.         )
  126. );
  127.    
  128.    return array_merge($original_option_array, $ignite_options_array);
  129. }
  130.  
  131. add_filter('pagelines_options_header_footer', 'ignite_nav_options');
  132.  
  133. function ignite_nav_options($original_option_array){
  134.    $ignite_nav_new = array(
  135.        'drop_down_options' => array(
  136.             'default' => '',
  137.             'type' => 'check_multi',
  138.             'selectvalues'=> array(
  139.  
  140.                 'enable_drop_down'  => array(
  141.                     'default'       => false,
  142.                     'type'          => 'check',
  143.                     'scope'         => '',
  144.                     'inputlabel'    => __( 'Enable Drop Down Navigation?', 'pagelines' ),
  145.                     'title'         => __( 'Drop Down Navigation', 'pagelines' ),
  146.                     'shortexp'      => __( 'Enable universal drop down navigation', 'pagelines' ),
  147.                     'exp'           => __( 'Checking this option will create drop down menus for all child pages when users hover over main navigation items.', 'pagelines' )
  148.                     ),
  149.                 'drop_down_arrows'  => array(
  150.                     'default'       => true,
  151.                     'type'          => 'check',
  152.                     'scope'         => '',
  153.                     'inputlabel'    => __( 'Enable Arrows on Drop Down Menu?', 'pagelines' ),
  154.                     'title'         => __( 'Drop Down Arrows', 'pagelines' ),
  155.                     'shortexp'      => __( 'Enable arrows for drop down navigation', 'pagelines' ),
  156.                     'exp'           => __( 'Checking this option will create arrows for the drop down menus', 'pagelines' )
  157.                     )),
  158.             'inputlabel'            => __( 'Select Which Drop Down Options To Show', 'pagelines' ),
  159.             'title'                 => __( 'Drop Down Navigation - Nav and BrandNav Section', 'pagelines' ),                       
  160.             'shortexp'              => __( 'Select Which To Show', 'pagelines' ),
  161.             'exp'                   => __( 'Enable drop downs and choose the options you would like to show', 'pagelines' )
  162.      
  163.         ),
  164.    );
  165.    
  166.    return array_merge($original_option_array, $ignite_nav_new);
  167. }
  168.  
  169. add_filter('pagelines_lesscode', 'trans_css');
  170.  
  171. function trans_css( $less ){
  172.    
  173.    
  174.     if(ploption('header_shadows') == 'no')
  175.         $less .= ".fpost .post-title h2 a, .clip .post-title h4 a, .fpost .post-title h2 a:hover, .clip .post-title h4 a:hover, h1.entry-title  {
  176.                     text-shadow:none;
  177.                 }";
  178.    
  179.     return $less;
  180. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement