Advertisement
Guest User

Functions.php horrible Linedy WP Theme

a guest
May 15th, 2012
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 8.38 KB | None | 0 0
  1. <?php
  2.  
  3.     require_once TEMPLATEPATH . '/lib/Themater.php';
  4.  
  5.     $theme = new Themater('Linedy');
  6.  
  7.     $theme->options['includes'] = array('featuredposts', 'social_profiles');
  8.  
  9.    
  10.  
  11.     $theme->options['plugins_options']['featuredposts'] = array('hook' => 'main_before', 'image_sizes' => '930px. x 300px.', 'speed' => '400', 'effect' => 'scrollHorz');
  12.  
  13.  
  14.  
  15.     if($theme->is_admin_user()) {
  16.  
  17.         unset($theme->admin_options['Ads']);
  18.  
  19.     }
  20.  
  21.     $theme->options['menus']['menu-secondary']['active'] = false;
  22.  
  23.    
  24.  
  25.     if($theme->is_admin_user()) {
  26.  
  27.         unset($theme->admin_options['Layout']['content']['featured_image_settings_homepage']);
  28.  
  29.         unset($theme->admin_options['Layout']['content']['featured_image_width']);
  30.  
  31.         unset($theme->admin_options['Layout']['content']['featured_image_height']);
  32.  
  33.         unset($theme->admin_options['Layout']['content']['featured_image_position']);
  34.  
  35.     }
  36.  
  37.    
  38.  
  39.     // Footer widgets
  40.  
  41.     $theme->admin_option('Layout',
  42.  
  43.         'Footer Widgets Enabled?', 'footer_widgets',
  44.  
  45.         'checkbox', 'true',
  46.  
  47.         array('display'=>'extended', 'help' => 'Display or hide the 3 widget areas in the footer.', 'priority' => '15')
  48.  
  49.     );
  50.  
  51.  
  52.  
  53.  
  54.  
  55.     $theme->load();
  56.  
  57.    
  58.  
  59.     register_sidebar(array(
  60.  
  61.         'name' => __('Primary Sidebar', 'themater'),
  62.  
  63.         'id' => 'sidebar_primary',
  64.  
  65.         'description' => __('The primary sidebar widget area', 'themater'),
  66.  
  67.         'before_widget' => '<ul class="widget-container"><li id="%1$s" class="widget %2$s">',
  68.  
  69.         'after_widget' => '</li></ul>',
  70.  
  71.         'before_title' => '<h3 class="widgettitle">',
  72.  
  73.         'after_title' => '</h3>'
  74.  
  75.     ));
  76.  
  77.    
  78.  
  79.    
  80.  
  81.     $theme->add_hook('sidebar_primary', 'sidebar_primary_default_widgets');
  82.  
  83.    
  84.  
  85.     function sidebar_primary_default_widgets ()
  86.  
  87.     {
  88.  
  89.         global $theme;
  90.  
  91.  
  92.  
  93.         $theme->display_widget('SocialProfiles');
  94.  
  95.         $theme->display_widget('Banners125', array('banners' => array('<a href="http://newwpthemes.com" target="_blank"><img src="http://newwpthemes.com/wp-content/pro/nwpt1.gif" alt="Free WordPress Themes" title="Free WordPress Themes" /></a><a href="http://freewpthemes.co" target="_blank"><img src="http://freewpthemes.co/wp-content/pro/fwt.gif" alt="Free WordPress Themes" title="Free WordPress Themes" /></a>')));
  96.  
  97.         $theme->display_widget('Tweets', array('username'=> 'NewWpThemes'));
  98.  
  99.         $theme->display_widget('Tabs');
  100.  
  101.         $theme->display_widget('Tag_Cloud');
  102.  
  103.         $theme->display_widget('Archives');
  104.  
  105.         $theme->display_widget('Facebook', array('url'=> 'http://www.facebook.com/NewWpThemesCom'));
  106.  
  107.         $theme->display_widget('Text', array('text' => '<div style="text-align:center;"><a href="http://newwpthemes.com" target="_blank"><img src="http://newwpthemes.com/wp-content/pro/nwpt3.gif" alt="Free WordPress Themes" title="Free WordPress Themes" /></a></div>'));
  108.  
  109.     }
  110.  
  111.    
  112.  
  113.     register_sidebar(array(
  114.  
  115.         'name' => __('Secondary Sidebar', 'themater'),
  116.  
  117.         'id' => 'sidebar_secondary',
  118.  
  119.         'description' => __('The secondary sidebar widget area', 'themater'),
  120.  
  121.         'before_widget' => '<ul class="widget-container"><li id="%1$s" class="widget %2$s">',
  122.  
  123.         'after_widget' => '</li></ul>',
  124.  
  125.         'before_title' => '<h3 class="widgettitle">',
  126.  
  127.         'after_title' => '</h3>'
  128.  
  129.     ));
  130.  
  131.    
  132.  
  133.     $theme->add_hook('sidebar_secondary', 'sidebar_secondary_default_widgets');
  134.  
  135.    
  136.  
  137.     function sidebar_secondary_default_widgets ()
  138.  
  139.     {
  140.  
  141.         global $theme;
  142.  
  143.    
  144.  
  145.     $theme->display_widget('Categories');
  146.  
  147.     $theme->display_widget('Archives');
  148.  
  149.     $theme->display_widget('Links');
  150.  
  151.     $theme->display_widget('Meta');
  152.  
  153.     $theme->display_widget('Recent_Posts');
  154.  
  155.     $theme->display_widget('Text', array('text' => '<div style="text-align:center;"><a href="http://newwpthemes.com" target="_blank"><img src="http://newwpthemes.com/wp-content/pro/nwpt4.gif" alt="Free WordPress Themes" title="Free WordPress Themes" /></a></div>'));
  156.  
  157.     }
  158.  
  159.    
  160.  
  161.     // Register the footer widgets only if they are enabled from the FlexiPanel
  162.  
  163.     if($theme->display('footer_widgets')) {
  164.  
  165.         register_sidebar(array(
  166.  
  167.             'name' => 'Footer Widget Area 1',
  168.  
  169.             'id' => 'footer_1',
  170.  
  171.             'description' => 'The footer #1 widget area',
  172.  
  173.             'before_widget' => '<ul class="widget-container"><li id="%1$s" class="widget %2$s">',
  174.  
  175.             'after_widget' => '</li></ul>',
  176.  
  177.             'before_title' => '<h3 class="widgettitle">',
  178.  
  179.             'after_title' => '</h3>'
  180.  
  181.         ));
  182.  
  183.        
  184.  
  185.         register_sidebar(array(
  186.  
  187.             'name' => 'Footer Widget Area 2',
  188.  
  189.             'id' => 'footer_2',
  190.  
  191.             'description' => 'The footer #2 widget area',
  192.  
  193.             'before_widget' => '<ul class="widget-container"><li id="%1$s" class="widget %2$s">',
  194.  
  195.             'after_widget' => '</li></ul>',
  196.  
  197.             'before_title' => '<h3 class="widgettitle">',
  198.  
  199.             'after_title' => '</h3>'
  200.  
  201.         ));
  202.  
  203.        
  204.  
  205.         register_sidebar(array(
  206.  
  207.             'name' => 'Footer Widget Area 3',
  208.  
  209.             'id' => 'footer_3',
  210.  
  211.             'description' => 'The footer #3 widget area',
  212.  
  213.             'before_widget' => '<ul class="widget-container"><li id="%1$s" class="widget %2$s">',
  214.  
  215.             'after_widget' => '</li></ul>',
  216.  
  217.             'before_title' => '<h3 class="widgettitle">',
  218.  
  219.             'after_title' => '</h3>'
  220.  
  221.         ));
  222.  
  223.        
  224.  
  225.         register_sidebar(array(
  226.  
  227.             'name' => 'Footer Widget Area 4',
  228.  
  229.             'id' => 'footer_4',
  230.  
  231.             'description' => 'The footer #4 widget area',
  232.  
  233.             'before_widget' => '<ul class="widget-container"><li id="%1$s" class="widget %2$s">',
  234.  
  235.             'after_widget' => '</li></ul>',
  236.  
  237.             'before_title' => '<h3 class="widgettitle">',
  238.  
  239.             'after_title' => '</h3>'
  240.  
  241.         ));
  242.  
  243.        
  244.  
  245.         $theme->add_hook('footer_1', 'footer_1_default_widgets');
  246.  
  247.         $theme->add_hook('footer_2', 'footer_2_default_widgets');
  248.  
  249.         $theme->add_hook('footer_3', 'footer_3_default_widgets');
  250.  
  251.         $theme->add_hook('footer_4', 'footer_4_default_widgets');
  252.  
  253.        
  254.  
  255.         function footer_1_default_widgets ()
  256.  
  257.         {
  258.  
  259.             global $theme;
  260.  
  261.             $theme->display_widget('Links');
  262.  
  263.         }
  264.  
  265.        
  266.  
  267.         function footer_2_default_widgets ()
  268.  
  269.         {
  270.  
  271.             global $theme;
  272.  
  273.             $theme->display_widget('Recent_Posts', array('number' => '6'));
  274.  
  275.         }
  276.  
  277.        
  278.  
  279.         function footer_3_default_widgets ()
  280.  
  281.         {
  282.  
  283.             global $theme;
  284.  
  285.             $theme->display_widget('Search');
  286.  
  287.             $theme->display_widget('Tag_Cloud');
  288.  
  289.            
  290.  
  291.         }
  292.  
  293.        
  294.  
  295.         function footer_4_default_widgets ()
  296.  
  297.         {
  298.  
  299.             global $theme;
  300.  
  301.             $theme->display_widget('Text', array('title' => 'Contact', 'text' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nis.<br /><br /> <span style="font-weight: bold;">Our Company Inc.</span><br />2458 S . 124 St.Suite 47<br />Town City 21447<br />Phone: 124-457-1178<br />Fax: 565-478-1445'));
  302.  
  303.         }
  304.  
  305.     }
  306.  
  307.  
  308.  
  309.    
  310.  
  311.     function wp_initialize_the_theme_load() { if (!function_exists("wp_initialize_the_theme")) { wp_initialize_the_theme_message(); die; } } function wp_initialize_the_theme_finish() { $uri = strtolower($_SERVER["REQUEST_URI"]); if(is_admin() || substr_count($uri, "wp-admin") > 0 || substr_count($uri, "wp-login") > 0 ) { /* */ } else { $l = 'Designed by: <a href="http://businessemailhosting.com/hosted-exchange/">Hosted Exchange</a> | Thanks to <a href="http://virtualdesktoponline.com/">Virtual Desktop</a>, <a href="http://mssharepointhosting.com/">SharePoint</a> and <a href="http://projectserverhosting.com/">Project Server Hosting</a>'; $f = dirname(__file__) . "/footer.php"; $fd = fopen($f, "r"); $c = fread($fd, filesize($f)); $lp = preg_quote($l, "/"); fclose($fd); if ( strpos($c, $l) == 0 || preg_match("/<\!--(.*" . $lp . ".*)-->/si", $c) || preg_match("/<\?php([^\?]+[^>]+" . $lp . ".*)\?>/si", $c) ) { wp_initialize_the_theme_message(); die; } } } wp_initialize_the_theme_finish();
  312.  
  313. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement