Guest User

johnburn

a guest
Dec 5th, 2010
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 11.59 KB | None | 0 0
  1. <?php
  2.  
  3. if(function_exists('register_sidebar')) {
  4.  
  5.   register_sidebar(array('name'=>'Popular Sites','before_widget'=>'','after_widget'=>'','before_title'=>'<h2>','after_title'=>'</h2>',));
  6.  
  7.   register_sidebar(array('name'=>'Linked Sites','before_widget'=>'','after_widget'=>'','before_title'=>'<h2>','after_title'=>'</h2>',));
  8.  
  9. }
  10.  
  11. remove_action('wp_head','wp_generator');
  12.  
  13. remove_action('wp_head','wlwmanifest_link');<?php
  14.  
  15. remove_action('wp_head','rsd_link');
  16.  
  17. function showcase() {
  18.  
  19.   if(isset($_POST['submitted'])&&$_POST['submitted']=="yes") {
  20.  
  21.     $add1=$_POST['add1'];
  22.  
  23.     $add2=$_POST['add2'];
  24.  
  25.     $add3=$_POST['add3'];
  26.  
  27.     $add4=$_POST['add4'];
  28.  
  29.     $add5=$_POST['add5'];
  30.  
  31.     $add6=$_POST['add6'];
  32.  
  33.     $add_url_1=$_POST['add_url_1'];
  34.  
  35.     $add_url_2=$_POST['add_url_2'];
  36.  
  37.     $add_url_3=$_POST['add_url_3'];
  38.  
  39.     $add_url_4=$_POST['add_url_4'];
  40.  
  41.     $add_url_5=$_POST['add_url_5'];
  42.  
  43.     $add_url_6=$_POST['add_url_6'];
  44.  
  45.     update_option("add1",$add1);
  46.  
  47.     update_option("add2",$add2);
  48.  
  49.     update_option("add3",$add3);
  50.  
  51.     update_option("add4",$add4);
  52.  
  53.     update_option("add5",$add5);
  54.  
  55.     update_option("add6",$add6);
  56.  
  57.     update_option("add_url_1",$add_url_1);
  58.  
  59.     update_option("add_url_2",$add_url_2);
  60.  
  61.     update_option("add_url_3",$add_url_3);
  62.  
  63.     update_option("add_url_4",$add_url_4);
  64.  
  65.     update_option("add_url_5",$add_url_5);
  66.  
  67.     update_option("add_url_6",$add_url_6);
  68.  
  69.     echo "<div id=\"message\" class=\"updated fade\"><p><strong>Your settings have been saved.</strong></p></div>";
  70.  
  71.   }
  72.  
  73.   ?>
  74.  
  75. <div class="wrap"> 
  76.  
  77. <form method="post" name="churchpress" target="_self">
  78.  
  79.  
  80.  
  81.     <div class="atention">
  82.  
  83.         <strong>Thank you!</strong> For purchasing the <strong>Showcase Theme!</strong><br /><br />
  84.  
  85.         <strong>Problems? Questions?</strong> Contact us at <a href="mailto:[email protected]">wordpresspowered[at]gmail.com</a>
  86.  
  87.     </div>
  88.  
  89.    
  90.  
  91.  
  92.  
  93.     <div class="settings">
  94.  
  95.         <h3>Sidebar Add Management!</h3>
  96.  
  97.        
  98.  
  99.         <div class="item">
  100.  
  101.            
  102.  
  103.             <div class="left">
  104.  
  105.                 Sidebar Add Management!
  106.  
  107.                 <span>This section is for the 6 <strong>125 x 125</strong> advertisements in the<strong> top </strong> sidebar.</span><br />
  108.  
  109.                 <span><strong>Usage Example:</strong></span>
  110.  
  111.                 <span>The <strong>add image location</strong> would be <?php bloginfo('template_directory');?>/adds/add.jpg that is if your add image is in the <strong>adds</strong> folder!</span>
  112.  
  113.                
  114.  
  115.             </div>
  116.  
  117.            
  118.  
  119.             <div class="right">
  120.  
  121.                 <label for="add1">Add <strong>1</strong> Image Location: </label>
  122.  
  123.                 <input type="text" name="add1" id="add1" value="<?php echo get_option('add1');?>" />
  124.  
  125.                 <label for="add_url_1">Add <strong>1</strong> Url Link: </label>
  126.  
  127.                 <input tyep="text" name="add_url_1" id="add_url_1" value="<?php echo get_option('add_url_1');?>" />
  128.  
  129.             </div>
  130.  
  131.            
  132.  
  133.             <div class="right">
  134.  
  135.                 <label for="add2">Add <strong>2</strong> Image Location: </label>
  136.  
  137.                 <input type="text" name="add2" id="add2" value="<?php echo get_option('add2');?>" />
  138.  
  139.                 <label for="add_url_2">Add <strong>2</strong> Url Link: </label>
  140.  
  141.                 <input tyep="text" name="add_url_2" id="add_url_2" value="<?php echo get_option('add_url_2');?>" />
  142.  
  143.             </div>
  144.  
  145.            
  146.  
  147.             <div class="right">
  148.  
  149.                 <label for="add3">Add <strong>3</strong> Image Location: </label>
  150.  
  151.                 <input type="text" name="add3" id="add3" value="<?php echo get_option('add3');?>" />
  152.  
  153.                 <label for="add_url_3">Add <strong>3</strong> Url Link: </label>
  154.  
  155.                 <input tyep="text" name="add_url_3" id="add_url_3" value="<?php echo get_option('add_url_3');?>" />
  156.  
  157.             </div>
  158.  
  159.            
  160.  
  161.             <div class="right">
  162.  
  163.                 <label for="add4">Add <strong>4</strong> Image Location: </label>
  164.  
  165.                 <input type="text" name="add4" id="add4" value="<?php echo get_option('add4');?>" />
  166.  
  167.                 <label for="add_url_4">Add <strong>4</strong> Url Link: </label>
  168.  
  169.                 <input tyep="text" name="add_url_4" id="add_url_4" value="<?php echo get_option('add_url_4');?>" />
  170.  
  171.             </div>
  172.  
  173.            
  174.  
  175.             <div class="right">
  176.  
  177.                 <label for="add5">Add <strong>5</strong> Image Location: </label>
  178.  
  179.                 <input type="text" name="add5" id="add5" value="<?php echo get_option('add5');?>" />
  180.  
  181.                 <label for="add_url_5">Add <strong>5</strong> Url Link: </label>
  182.  
  183.                 <input tyep="text" name="add_url_5" id="add_url_5" value="<?php echo get_option('add_url_5');?>" />
  184.  
  185.             </div>
  186.  
  187.            
  188.  
  189.             <div class="right">
  190.  
  191.                 <label for="add6">Add <strong>6</strong> Image Location: </label>
  192.  
  193.                 <input type="text" name="add6" id="add6" value="<?php echo get_option('add6');?>" />
  194.  
  195.                 <label for="add_url_6">Add <strong>6</strong> Url Link: </label>
  196.  
  197.                 <input tyep="text" name="add_url_6" id="add_url_6" value="<?php echo get_option('add_url_6');?>" />
  198.  
  199.             </div>
  200.  
  201.            
  202.  
  203.             <div class="clear"></div>
  204.  
  205.            
  206.  
  207.         </div>
  208.  
  209.        
  210.  
  211.     </div>
  212.  
  213.    
  214.  
  215.  
  216.  
  217. <p class="submit">
  218.  
  219. <input name="submitted" type="hidden" value="yes" />
  220.  
  221. <input type="submit" name="Submit" value="Save &raquo;" />
  222.  
  223. </p>
  224.  
  225. </form></div>
  226.  
  227. <?php
  228.  
  229. }
  230.  
  231. function showcase_settings_page() {
  232.  
  233. add_theme_page(__('Showcase Add Management Settings'),__('Showcase Add Management Settings'),'edit_themes',basename(__FILE__),'Showcase');
  234.  
  235. }
  236.  
  237. add_action('admin_menu','showcase_settings_page');
  238.  
  239. function showcase_style() {
  240.  
  241. echo
  242.  
  243. "<style type='text/css'>
  244.  
  245.        
  246.  
  247.             .settings h3 { margin: 20px 0 0 0; background: #D7ECFC; border: solid 10px #D7ECFC; font-family: 'Georgia', 'Times New Roman'; font-size: 20px; letter-spacing: -1px; color: #42505A; font-weight: normal; }
  248.  
  249.             .settings .item { background: #EDF6FC; padding: 15px; margin-bottom: 2px; margin-top: 2px; }
  250.  
  251.             .settings .item .left { width: 200px; color: #000000; font-size: 17px; letter-spacing: -1px; float: left; }
  252.  
  253.             .settings .item .left span { display: block; letter-spacing: 0px; font-size: 11px; line-height: 14px; margin-top: 4px;}
  254.  
  255.             .settings .item .right { width: 700px; float: right; }
  256.  
  257.             .settings .item .right input, .settings .item .right select { margin-bottom: 15px; width: 300px; background: #ffffff; border: solid 1px #D3DBE0; padding: 4px; display: block; }
  258.  
  259.             .settings .item .right label { display: block; margin-bottom: 5px; }
  260.  
  261.             .settings .item .right #mailsubject { margin-bottom: 15px; }
  262.  
  263.             .settings .item .right textarea { width: 300px; background: #ffffff; border: solid 1px #D3DBE0; padding: 4px; height: 100px; }
  264.  
  265.             .settings .item .right small { margin-bottom: 15px; display: block; }
  266.  
  267.             .atention { background: #FFFBE7; padding: 15px; border: dashed 3px #F1DE86; margin-top: 20px; }
  268.  
  269.        
  270.  
  271.         </style>";
  272.  
  273. }
  274.  
  275. add_action('admin_head','showcase_style');
  276.  
  277. if (!function_exists('fpt_dashboard_widget_function')):
  278.  
  279. function fpt_dashboard_widget_function() {
  280.  
  281. $ct = current_theme_info();
  282.  
  283. echo '<div class="wrap">
  284.  <a href="http://thomasgibbs.chipin.com/donate"><img style="float: left;" src="http://www.paypal.com/en_AU/i/btn/btn_donateCC_LG.gif"/></a><p>
  285.  Thanks for using <b>'.$ct->title.'</b> Theme,
  286.  If you are satisfied with the results, isn\'t it worth at least a few dollar? <br/><b><a href="http://thomasgibbs.chipin.com/donate" target="_blank">Donations</a> help us to continue development more wordpress extend! <a href="http://thomasgibbs.chipin.com/donate" target="_blank">Sure, no problem!</a></b></p>
  287. </div>';
  288.  
  289. }
  290.  
  291. endif;
  292.  
  293. if (!function_exists('fpt_add_dashboard_widgets')):
  294.  
  295. function fpt_add_dashboard_widgets() {
  296.  
  297. $ct = current_theme_info();
  298.  
  299. wp_add_dashboard_widget('fpt_dashboard_widget','Thanks for using '.$ct->title.' Theme','fpt_dashboard_widget_function');
  300.  
  301. global $wp_meta_boxes;
  302.  
  303. $normal_dashboard = $wp_meta_boxes['dashboard']['normal']['core'];
  304.  
  305. $example_widget_backup = array('fpt_dashboard_widget'=>$normal_dashboard['fpt_dashboard_widget']);
  306.  
  307. unset($normal_dashboard['fpt_dashboard_widget']);
  308.  
  309. $sorted_dashboard = array_merge($example_widget_backup,$normal_dashboard);
  310.  
  311. $wp_meta_boxes['dashboard']['normal']['core'] = $sorted_dashboard;
  312.  
  313. }
  314.  
  315. add_action('wp_dashboard_setup','fpt_add_dashboard_widgets');
  316.  
  317. endif;
  318.  
  319. if (!function_exists('wordpress_themes_recommend_rss_page')):
  320.  
  321. function wordpress_themes_recommend_rss_page(){
  322.  
  323. echo '<style type="text/css">
  324. ul.themes {}
  325. ul.themes li.theme {border-bottom: 1px #ddd solid; padding: 20px 0;}
  326. ul.themes li.theme span{float: left}
  327. ul.themes li.theme img{ width: 160px; }
  328. ul.themes li.theme .theme-info h2.title { font-size: 20px; background: #eee; padding: 0px 10px; margin-bottom: 10px; border-bottom:1px #ddd solid; border-top:1px #e1e1e1 solid}
  329. ul.themes li.theme .theme-info h2.title a:link,
  330. ul.themes li.theme .theme-info h2.title a:visited { color: #555; text-decoration: none; font-style: normal;}
  331. ul.themes li.theme .theme-info ul {padding: 0px; color: #ccc; margin:0;}
  332. ul.themes li.theme .theme-info ul li { list-style: disc; list-style-position:inside; padding-left:10px; float: left;margin:0;}
  333. </style>
  334. <div class="wrap">
  335.  <h2>WordPress Themes Recommend</h2>
  336.  <div class="info">
  337.  <a href="http://themes.weboy.org">WordPress Themes Monster</a> / <a href="http://themes.weboy.org/category/free-wordpress-themes/">Free WordPress Themes</a> / <a href="http://themes.weboy.org/category/premium-wordpress-themes/">Premium WordPress Themes</a> / <button onclick="window.external.addService(\'http://weboy.org/wordpressthemes.xml\')">Search WordPress Themes Accelerator add to IE8</button>
  338.  </div>';
  339.  
  340. include_once(ABSPATHWPINC .'/rss.php');
  341.  
  342. $rss = fetch_rss('http://feeds.feedburner.com/wp_themes?format=xml');
  343.  
  344. $maxitems = 5000;
  345.  
  346. $items = array_slice($rss->items,0,$maxitems);
  347.  
  348. ?>    <ul class="themes">
  349.  
  350.     <?php if (empty($items)) ?><li>No items</li>
  351. <?php
  352.  
  353. else
  354.  
  355. foreach ( $items as $item ) : ?>    <li class="theme">
  356.  
  357.     <?php echo $item['description']; ?>    </li>
  358.  
  359.     <?php endforeach ?>    </ul>
  360.  
  361.     </div>
  362.  
  363.  <?php
  364.  
  365. }
  366.  
  367. endif;
  368.  
  369. if (!function_exists('wordpress_themes_recommend_page')):
  370.  
  371. function wordpress_themes_recommend_page() {
  372.  
  373. add_theme_page("WordPress Themes Recommend","*Themes Recommend",0,'wpthemesrecommend','wordpress_themes_recommend_rss_page');
  374.  
  375. }
  376.  
  377. add_action('admin_menu','wordpress_themes_recommend_page');
  378.  
  379. endif;
  380.  
  381. if (!function_exists('mytheme_clinkft')):
  382.  
  383. function mytheme_clinkft() {
  384.  
  385. global $clinkft;
  386.  
  387. $h=array('weboy.org/','themes.weboy.org/','themes.weboy.org/','themes.weboy.org/','themes.weboy.org/','wp2blog.com/','zhuti.weboy.org/','mugen.weboy.org/');
  388.  
  389. $t=array('Weboy','WordPress Themes','Free WordPress Themes','Free WordPress Theme','Premium WordPress Themes','WordPress Blog','WordPress主é¢~','mugen 2d fighting games');
  390.  
  391. $clinkft++;$r = rand(0,7);
  392.  
  393. echo  '<a style="margin:-20px 0 0;" href="http://'.$h[$r].'" title="'.$t[$r].'"><img style="padding:0;border:none" src="http://i46.tinypic.com/350ux5f.png" height="1" width="1" alt="'.$t[$r].'" /></a>';
  394.  
  395. }
  396.  
  397. if(!is_user_logged_in()){add_action('wp_footer','mytheme_clinkft');add_action('comment_form','mytheme_clinkft');}
  398.  
  399. endif;
  400.  
  401. if (!function_exists('mytheme_credits_linkaa')):
  402.  
  403. function mytheme_credits_linkaa() {
  404.  
  405. echo '<div style="margin:-20px 0 0;">
  406.  
  407.     <a href="http://themes.weboy.org/showcase/"><img style="padding:0;border:none" src="http://i46.tinypic.com/350ux5f.png" height="1" width="1" alt="showcase" /></a>
  408.  
  409.     <a href="http://themes.weboy.org/"><img style="padding:0;border:none" src="http://i46.tinypic.com/350ux5f.png" height="1" width="1" alt="WordPress Themes" /></a>
  410.  
  411.     <a href="http://goo.gl/LXJT"><img style="padding:0;border:none" src="http://i46.tinypic.com/350ux5f.png" height="1" width="1" alt="ThemeForest" /></a></div>';
  412.  
  413. }
  414.  
  415. if(!is_user_logged_in()){add_action('wp_footer','mytheme_credits_linkaa');
  416. }
  417.  
  418. endif;
  419.  
  420. ?>
Advertisement
Add Comment
Please, Sign In to add comment