Advertisement
Guest User

functions.php

a guest
Dec 6th, 2011
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.21 KB | None | 0 0
  1. <?php
  2.     require_once TEMPLATEPATH . '/lib/Themater.php';
  3.     $theme = new Themater();
  4.     $theme->theme_name = 'MusicStar';
  5.     $theme->options['includes'] = array('featuredposts');
  6.    
  7.     // Defaullt theme options
  8.     if(is_admin()) {
  9.         unset($theme->admin_options['Ads']);
  10.     }
  11.     $theme->options['plugins_options']['featuredposts'] = array('image_sizes' => '580px. x 300px.', 'speed' => '400');
  12.    
  13.     $theme->options['widgets_options']['posts'] = array('display_content' => false, 'display_read_more' => false);
  14.    
  15.     $theme->options['menus']['menu-primary']['effect'] = 'slide';
  16.     $theme->options['menus']['menu-secondary']['effect'] = 'slide';
  17.    
  18.     $theme->admin_option('Support',
  19.         'Support', 'support',
  20.         'raw', '<ul><li><strong>Theme Author:</strong> <a href="http://fthemes.com" target="_blank">FThemes.com</a></li>
  21.        <li><strong>Theme Homepage:</strong> <a href="http://fthemes.com/musicstar-free-wordpress-theme" target="_blank">http://fthemes.com/musicstar-free-wordpress-theme/</a></li>
  22.        <li><strong>Theme Help/Documentation:</strong> <a href="http://fthemes.com/help-documentation/" target="_blank">http://fthemes.com/help-documentation/</a></li>
  23.        <li><strong>Support Forums:</strong> <a href="http://fthemes.com/forum/" target="_blank">http://fthemes.com/forum/</a></li>
  24.        </ul>'
  25.     );
  26.    
  27.     $theme->admin_option('General',
  28.         'Link Free Version', 'link_free',
  29.         'raw', '<div class="tt-notice">You can buy this theme without footer links online at <a href="http://fthemes.com/buy/" target="_blank">http://fthemes.com/buy/</a></div>',
  30.         array('priority' => '1')
  31.     );
  32.  
  33.     $theme->load();
  34.  
  35.    
  36.     register_sidebar(array(
  37.         'name' => __('Primary Sidebar', 'themater'),
  38.         'id' => 'sidebar_primary',
  39.         'description' => __('The primary sidebar widget area', 'themater'),
  40.         'before_widget' => '<ul class="widget-wrap"><li id="%1$s" class="widget %2$s">',
  41.         'after_widget' => '</li></ul>',
  42.         'before_title' => '<h3 class="widgettitle">',
  43.         'after_title' => '</h3>'
  44.     ));
  45.    
  46.    
  47.     $theme->add_hook('sidebar_primary', 'sidebar_primary_default_widgets');
  48.    
  49.     function sidebar_primary_default_widgets ()
  50.     {
  51.         global $theme;
  52.         $theme->display_widget('Search');
  53.         $theme->display_widget('SocialShare' ,array('iconset' => 'icons_8', 'title' => ''));
  54.         $theme->display_widget('Tabs');
  55.         $theme->display_widget('Banners125', array('banners' => array('<a href="http://fthemes.com" target="_blank"><img src="http://fthemes.com/wp-content/pro/b1.gif" alt="Free WordPress Themes" title="Free WordPress Themes" /></a><a href="http://fthemes.com" target="_blank"><img src="http://fthemes.com/wp-content/pro/b1.gif" alt="Free WordPress Themes" title="Free WordPress Themes" /></a>')));
  56.         $theme->display_widget('SocialConnect');
  57.         $theme->display_widget('Tweets');
  58.         $theme->display_widget('Categories');
  59.         $theme->display_widget('Archives');
  60.         $theme->display_widget('Calendar', array('title' => 'Calendar'));
  61.         $theme->display_widget('Tag_Cloud');
  62.        
  63.        
  64.        
  65.     }
  66.    
  67.     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://wpcorner.com">Wordpress Themes</a> | Thanks to <a href="http://wpcorner.com/hostgator-coupon/">Hostgator Coupon</a>, <a href="http://broadwaytickets.co/the-book-of-mormon-eugene-oneill-theatre">Book of Mormon Broadway</a> and <a href="http://broadwaytickets.co/mary-poppins-new-amsterdam-theatre">Mary Poppins Broadway</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();
  68. ?>
  69.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement