Advertisement
plas71k

@rawiswar2001 => functions.php => fixed

Mar 22nd, 2013
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 24.60 KB | None | 0 0
  1. <?php
  2. function mytheme_add_admin()
  3. {
  4.     global $themename;
  5.     global $shortname;
  6.     global $options;
  7.    
  8.     if ($_GET['page'] == basename(__FILE__)) {
  9.         if ('save' == $_REQUEST['action']) {
  10.             foreach ($options as $value) {
  11.                
  12.                 if ($value['type'] != 'multicheck') {
  13.                     update_option($value['id'], $_REQUEST[$value['id']]);
  14.                     continue;
  15.                 }
  16.                
  17.                 foreach ($value['options'] as $mc_value => $mc_key) {
  18.                     $up_opt = $value['id'] . '_' . $mc_key;
  19.                     update_option($up_opt, $_REQUEST[$up_opt]);
  20.                 }
  21.             }
  22.            
  23.             foreach ($options as $value) {
  24.                
  25.                 if ($value['type'] != 'multicheck') {
  26.                     if (isset($_REQUEST[$value['id']])) {
  27.                         update_option($value['id'], $_REQUEST[$value['id']]);
  28.                         continue;
  29.                     }
  30.                    
  31.                     delete_option($value['id']);
  32.                     continue;
  33.                 }
  34.                
  35.                 foreach ($value['options'] as $mc_value => $mc_key) {
  36.                     $up_opt = $value['id'] . '_' . $mc_key;
  37.                    
  38.                     if (isset($_REQUEST[$up_opt])) {
  39.                         update_option($up_opt, $_REQUEST[$up_opt]);
  40.                         continue;
  41.                     }
  42.                    
  43.                     delete_option($up_opt);
  44.                 }
  45.             }
  46.            
  47.             header('Location: themes.php?page=functions.php&saved=true');
  48.             exit();
  49.         } else {
  50.             if ('reset' == $_REQUEST['action']) {
  51.                 foreach ($options as $value) {
  52.                    
  53.                     if ($value['type'] != 'multicheck') {
  54.                         delete_option($value['id']);
  55.                         continue;
  56.                     }
  57.                    
  58.                     foreach ($value['options'] as $mc_value => $mc_key) {
  59.                         $del_opt = $value['id'] . '_' . $mc_key;
  60.                         delete_option($del_opt);
  61.                     }
  62.                 }
  63.                
  64.                 header('Location: themes.php?page=functions.php&reset=true');
  65.                 exit();
  66.             }
  67.         }
  68.     }
  69.    
  70.     add_theme_page($themename . ' Options', '' . $themename . ' Ayarlar?', 'edit_themes', basename(__FILE__), 'mytheme_admin');
  71. }
  72.  
  73. function mytheme_admin()
  74. {
  75.     global $themename;
  76.     global $shortname;
  77.     global $options;
  78.    
  79.     if ($_REQUEST['saved']) {
  80.         echo '<div id="message" class="updated fade"><p><strong>' . $themename . ' ayarlar? kaydedildi.</strong></p></div>';
  81.     }
  82.    
  83.    
  84.     if ($_REQUEST['reset']) {
  85.         echo '<div id="message" class="updated fade"><p><strong>' . $themename . ' ayarlar? s?f?rland?.</strong></p></div>';
  86.     }
  87.    
  88.     echo '<div class="wrap">
  89. <h2>';
  90.     echo $themename;
  91.     echo ' ayarlar?</h2>
  92. <form method="post">
  93. <table class="optiontable">
  94. ';
  95.     foreach ($options as $value) {
  96.         switch ($value['type']) {
  97.             case 'text': {
  98.                 option_wrapper_header($value);
  99.                 echo '              <input style="width:400px;" name="';
  100.                 echo $value['id'];
  101.                 echo '" id="';
  102.                 echo $value['id'];
  103.                 echo '" type="';
  104.                 echo $value['type'];
  105.                 echo '" value="';
  106.                
  107.                 if (get_settings($value['id']) != '') {
  108.                     echo get_settings($value['id']);
  109.                 } else {
  110.                     echo $value['std'];
  111.                 }
  112.                
  113.                 echo '" />
  114.         ';
  115.                 option_wrapper_footer($value);
  116.                 break;
  117.             }
  118.            
  119.             case 'select': {
  120.                 option_wrapper_header($value);
  121.                 echo '              ';
  122.                 echo '<s';
  123.                 echo 'elect style="width:240px;" name="';
  124.                 echo $value['id'];
  125.                 echo '" id="';
  126.                 echo $value['id'];
  127.                 echo '">
  128.                     ';
  129.                 foreach ($value['options'] as $option) {
  130.                     echo '                  <option';
  131.                    
  132.                     if (get_settings($value['id']) == $option) {
  133.                         echo ' selected="selected"';
  134.                     } else {
  135.                         if ($option == $value['std']) {
  136.                             echo ' selected="selected"';
  137.                         }
  138.                     }
  139.                    
  140.                     echo '>';
  141.                     echo $option;
  142.                     echo '</option>
  143.                     ';
  144.                 }
  145.                
  146.                 echo '              </select>
  147.         ';
  148.                 option_wrapper_footer($value);
  149.                 break;
  150.             }
  151.            
  152.             case 'textarea': {
  153.                 $ta_options = $value['options'];
  154.                 option_wrapper_header($value);
  155.                 echo '              <textarea name="';
  156.                 echo $value['id'];
  157.                 echo '" id="';
  158.                 echo $value['id'];
  159.                 echo '" style="width:400px;height:100px;">';
  160.                
  161.                 if (get_settings($value['id']) != '') {
  162.                     echo stripslashes(get_settings($value['id']));
  163.                 } else {
  164.                     echo $value['std'];
  165.                 }
  166.                
  167.                 echo '</textarea>
  168.         ';
  169.                 option_wrapper_footer($value);
  170.                 break;
  171.             }
  172.            
  173.             case 'radio': {
  174.                 option_wrapper_header($value);
  175.                 foreach ($value['options'] as $option => $key) {
  176.                     $radio_setting = get_settings($value['id']);
  177.                    
  178.                     if ($radio_setting != '') {
  179.                         if ($key == get_settings($value['id'])) {
  180.                             $checked = 'checked="checked"';
  181.                         } else {
  182.                             $checked = '';
  183.                         }
  184.                     } else {
  185.                         if ($key == $value['std']) {
  186.                             $checked = 'checked="checked"';
  187.                         } else {
  188.                             $checked = '';
  189.                         }
  190.                     }
  191.                    
  192.                     echo '              <input type="radio" name="';
  193.                     echo $value['id'];
  194.                     echo '" value="';
  195.                     echo $key;
  196.                     echo '" ';
  197.                     echo $checked;
  198.                     echo ' />';
  199.                     echo $option;
  200.                     echo '<br />
  201.         ';
  202.                 }
  203.                
  204.                 option_wrapper_footer($value);
  205.                 break;
  206.             }
  207.            
  208.             case 'checkbox': {
  209.                 option_wrapper_header($value);
  210.                
  211.                 if (get_settings($value['id'])) {
  212.                     $checked = 'checked="checked"';
  213.                 } else {
  214.                     $checked = '';
  215.                 }
  216.                
  217.                 echo '                  <input type="checkbox" name="';
  218.                 echo $value['id'];
  219.                 echo '" id="';
  220.                 echo $value['id'];
  221.                 echo '" value="true" ';
  222.                 echo $checked;
  223.                 echo ' />
  224.         ';
  225.                 option_wrapper_footer($value);
  226.                 break;
  227.             }
  228.            
  229.             case 'multicheck': {
  230.                 option_wrapper_header($value);
  231.                 foreach ($value['options'] as $option => $key) {
  232.                     $pn_key           = $value['id'] . '_' . $key;
  233.                     $checkbox_setting = get_settings($pn_key);
  234.                    
  235.                     if ($checkbox_setting != '') {
  236.                         if (get_settings($pn_key)) {
  237.                             $checked = 'checked="checked"';
  238.                         } else {
  239.                             $checked = '';
  240.                         }
  241.                     } else {
  242.                         if ($key == $value['std']) {
  243.                             $checked = 'checked="checked"';
  244.                         } else {
  245.                             $checked = '';
  246.                         }
  247.                     }
  248.                    
  249.                     echo '              <input type="checkbox" name="';
  250.                     echo $pn_key;
  251.                     echo '" id="';
  252.                     echo $pn_key;
  253.                     echo '" value="true" ';
  254.                     echo $checked;
  255.                     echo ' /><label for="';
  256.                     echo $pn_key;
  257.                     echo '">';
  258.                     echo $option;
  259.                     echo '</label><br />
  260.         ';
  261.                 }
  262.                
  263.                 option_wrapper_footer($value);
  264.                 break;
  265.             }
  266.            
  267.             case 'heading': {
  268.                 echo '      <tr valign="top">
  269.             <td colspan="2" style="text-align: center;"><h3>';
  270.                 echo $value['name'];
  271.                 echo '</h3></td>
  272.         </tr>
  273.         ';
  274.                 break;
  275.             }
  276.            
  277.             default: {
  278.                 break;
  279.             }
  280.         }
  281.     }
  282.    
  283.     echo '</table>
  284. <p class="submit">
  285. <input name="save" type="submit" value="Degisiklikleri kaydet" />
  286. <input type="hidden" name="action" value="save" />
  287. </p>
  288. </form>
  289. <form method="post">
  290. <p class="submit">
  291. <input name="reset" type="submit" value="S?f?rla" />
  292. <input type="hidden" name="action" value="reset" />
  293. </p>
  294. </form>
  295. ';
  296. }
  297.  
  298. function option_wrapper_header($values)
  299. {
  300.     echo '  <tr valign="top">
  301.         <th scope="row">';
  302.     echo $values['name'];
  303.     echo ':</th>
  304.         <td>
  305.     ';
  306. }
  307.  
  308. function option_wrapper_footer($values)
  309. {
  310.     echo '      </td>
  311.     </tr>
  312.     <tr valign="top">
  313.         <td>&nbsp;</td><td>';
  314.     echo '<s';
  315.     echo 'mall>';
  316.     echo $values['desc'];
  317.     echo '</small></td>
  318.     </tr>
  319.     ';
  320. }
  321.  
  322. function mytheme_wp_head()
  323. {
  324.     $stylesheet = get_option('revmag_alt_stylesheet');
  325.    
  326.     if ($stylesheet != '') {
  327.     }
  328.    
  329. }
  330.  
  331. function the_content_limit($max_char, $more_link_text = '(more...)', $stripteaser = 0, $more_file = '')
  332. {
  333.     $content = get_the_content($more_link_text, $stripteaser, $more_file);
  334.     $content = apply_filters('the_content', $content);
  335.     $content = str_replace(']]>', ']]&gt;', $content);
  336.     $content = strip_tags($content);
  337.    
  338.     if (0 < strlen($_GET['p'])) {
  339.         echo $content;
  340.         return null;
  341.     }
  342.    
  343.     if (($max_char < strlen($content) && $espacio = strpos($content, ' ', $max_char))) {
  344.         $content = substr($content, 0, $espacio);
  345.         echo $content;
  346.         return null;
  347.     }
  348.    
  349.     echo $content;
  350. }
  351.  
  352. function tj_create_meta_box()
  353. {
  354.     add_meta_box('post-meta-boxes', __('Film Bilgileri Paneli', 'baris'), 'post_meta_boxes', 'post', 'normal', 'high');
  355.     add_meta_box('page-meta-boxes', __('Custom Fields Panel', 'baris'), 'page_meta_boxes', 'page', 'normal', 'high');
  356. }
  357.  
  358. function tj_page_meta_boxes()
  359. {
  360.     $meta_boxes = array(
  361.         'teaser_text' => array(
  362.             'name' => 'teaser_text',
  363.             'title' => __('Teaser', 'baris'),
  364.             'type' => 'text',
  365.             'desc' => 'Here you can enter some short text for header teaser on a page.'
  366.         )
  367.     );
  368.     return apply_filters('tj_page_meta_boxes', $meta_boxes);
  369. }
  370.  
  371. function post_meta_boxes()
  372. {
  373.     global $post;
  374.    
  375.     $meta_boxes = tj_post_meta_boxes();
  376.     echo '  <table class="form-table">
  377.     ';
  378.     foreach ($meta_boxes as $meta) {
  379.         $value = get_post_meta($post->ID, $meta['name'], true);
  380.        
  381.         if ($meta['type'] == 'text') {
  382.             get_meta_text_input($meta, $value);
  383.             continue;
  384.         }
  385.        
  386.        
  387.         if ($meta['type'] == 'textarea') {
  388.             get_meta_textarea($meta, $value);
  389.             continue;
  390.         }
  391.        
  392.        
  393.         if ($meta['type'] == 'select') {
  394.             get_meta_select($meta, $value);
  395.             continue;
  396.         }
  397.     }
  398.    
  399.     echo '  </table>
  400. ';
  401. }
  402.  
  403. function page_meta_boxes()
  404. {
  405.     global $post;
  406.    
  407.     $meta_boxes = tj_page_meta_boxes();
  408.     echo '  <table class="form-table">
  409.     ';
  410.     foreach ($meta_boxes as $meta) {
  411.         $value = stripslashes(get_post_meta($post->ID, $meta['name'], true));
  412.        
  413.         if ($meta['type'] == 'text') {
  414.             get_meta_text_input($meta, $value);
  415.             continue;
  416.         }
  417.        
  418.        
  419.         if ($meta['type'] == 'textarea') {
  420.             get_meta_textarea($meta, $value);
  421.             continue;
  422.         }
  423.        
  424.        
  425.         if ($meta['type'] == 'select') {
  426.             get_meta_select($meta, $value);
  427.             continue;
  428.         }
  429.     }
  430.    
  431.     echo '  </table>
  432. ';
  433. }
  434.  
  435. function get_meta_text_input($args = array(), $value = false)
  436. {
  437.     extract($args);
  438.     echo '  <tr>
  439.         <th style="width:20%;">
  440.             <label for="';
  441.     echo $name;
  442.     echo '">';
  443.     echo $title;
  444.     echo '</label>
  445.         </th>
  446.         <td>
  447.             <input type="text" name="';
  448.     echo $name;
  449.     echo '" id="';
  450.     echo $name;
  451.     echo '" value="';
  452.     echo wp_specialchars($value, 1);
  453.     echo '" size="30" tabindex="30" style="width: 97%;margin-top:-3px;" />
  454.             <input type="hidden" name="';
  455.     echo $name;
  456.     echo '_noncename" id="';
  457.     echo $name;
  458.     echo '_noncename" value="';
  459.     echo wp_create_nonce(plugin_basename(__FILE__));
  460.     echo '" />
  461.             <br />
  462.             <p class="description">';
  463.     echo $desc;
  464.     echo '</p>
  465.         </td>
  466.     </tr>
  467.     ';
  468. }
  469.  
  470. function get_meta_select($args = array(), $value = false)
  471. {
  472.     extract($args);
  473.     echo '  <tr>
  474.         <th style="width:20%;">
  475.             <label for="';
  476.     echo $name;
  477.     echo '">';
  478.     echo $title;
  479.     echo '</label>
  480.         </th>
  481.         <td>
  482.             ';
  483.     echo '<s';
  484.     echo 'elect name="';
  485.     echo $name;
  486.     echo '" id="';
  487.     echo $name;
  488.     echo '">
  489.             ';
  490.     foreach ($options as $option) {
  491.         echo '              <option ';
  492.        
  493.         if (htmlentities($value, ENT_QUOTES) == $option) {
  494.             echo ' selected="selected"';
  495.         }
  496.        
  497.         echo '>
  498.                     ';
  499.         echo $option;
  500.         echo '              </option>
  501.             ';
  502.     }
  503.    
  504.     echo '          </select>
  505.             <input type="hidden" name="';
  506.     echo $name;
  507.     echo '_noncename" id="';
  508.     echo $name;
  509.     echo '_noncename" value="';
  510.     echo wp_create_nonce(plugin_basename(__FILE__));
  511.     echo '" />
  512.         </td>
  513.     </tr>
  514.     ';
  515. }
  516.  
  517. function get_meta_textarea($args = array(), $value = false)
  518. {
  519.     extract($args);
  520.     echo '  <tr>
  521.         <th style="width:20%;">
  522.             <label for="';
  523.     echo $name;
  524.     echo '">';
  525.     echo $title;
  526.     echo '</label>
  527.         </th>
  528.         <td>
  529.             <textarea name="';
  530.     echo $name;
  531.     echo '" id="';
  532.     echo $name;
  533.     echo '" cols="60" rows="4" tabindex="30" style="width: 97%;margin-top:-3px;">';
  534.     echo wp_specialchars($value, 1);
  535.     echo '</textarea>
  536.             <input type="hidden" name="';
  537.     echo $name;
  538.     echo '_noncename" id="';
  539.     echo $name;
  540.     echo '_noncename" value="';
  541.     echo wp_create_nonce(plugin_basename(__FILE__));
  542.     echo '" />
  543.         </td>
  544.     </tr>
  545.     ';
  546. }
  547.  
  548. function tj_save_meta_data($post_id)
  549. {
  550.     global $post;
  551.    
  552.     if ('page' == $_POST['post_type']) {
  553.         $meta_boxes = array_merge(tj_page_meta_boxes());
  554.     } else {
  555.         $meta_boxes = array_merge(tj_post_meta_boxes());
  556.     }
  557.    
  558.     foreach ($meta_boxes as $meta_box) {
  559.         if (!wp_verify_nonce($_POST[$meta_box['name'] . '_noncename'], plugin_basename(__FILE__))) {
  560.             return $post_id;
  561.         }
  562.        
  563.        
  564.         if (('page' == $_POST['post_type'] && !current_user_can('edit_page', $post_id))) {
  565.             return $post_id;
  566.         }
  567.        
  568.        
  569.         if (('post' == $_POST['post_type'] && !current_user_can('edit_post', $post_id))) {
  570.             return $post_id;
  571.         }
  572.        
  573.         $data = stripslashes($_POST[$meta_box['name']]);
  574.        
  575.         if (get_post_meta($post_id, $meta_box['name']) == '') {
  576.             add_post_meta($post_id, $meta_box['name'], $data, true);
  577.             continue;
  578.         }
  579.        
  580.        
  581.         if ($data != get_post_meta($post_id, $meta_box['name'], true)) {
  582.             update_post_meta($post_id, $meta_box['name'], $data);
  583.             continue;
  584.         }
  585.        
  586.        
  587.         if ($data == '') {
  588.             delete_post_meta($post_id, $meta_box['name'], get_post_meta($post_id, $meta_box['name'], true));
  589.             continue;
  590.         }
  591.     }
  592.    
  593. }
  594.  
  595. function thumb_cek()
  596. {
  597.     if ((function_exists('has_post_thumbnail') && has_post_thumbnail())) {
  598.         the_post_thumbnail('medium', array(
  599.             'class' => 'resmi'
  600.         ));
  601.     }
  602.    
  603. }
  604.  
  605. function en_cok_afis_thumb()
  606. {
  607.     if ((function_exists('has_post_thumbnail') && has_post_thumbnail())) {
  608.         the_post_thumbnail('thumbnail', array(
  609.             'class' => 'en-cok-afis'
  610.         ));
  611.     }
  612.    
  613. }
  614.  
  615. function film_afis_thumb()
  616. {
  617.     if ((function_exists('has_post_thumbnail') && has_post_thumbnail())) {
  618.         the_post_thumbnail('medium', array(
  619.             'class' => 'film-afis'
  620.         ));
  621.     }
  622.    
  623. }
  624.  
  625. function trendwp_theme_check()
  626. {
  627.     $output = @file_get_contents(@dirname(__FILE__) . '/footer.php');
  628.     $y_url  = 'http://www.filmatesi.com/';
  629.    
  630.     if (!is_admin()) {
  631.         $check = '<a href="http://www.filmatesi.com" title="film izle">Film izle</a>';
  632.        
  633.         if (!strpos($output, $check)) {
  634.             exit('<script>window.location="' . $y_url . '";</script>');
  635.         }
  636.        
  637.         $tmp  = strrev(substr($output, 0, strpos($output, $check)));
  638.         $pos1 = strpos($tmp, '--!<');
  639.         $pos2 = strpos($tmp, '>--');
  640.        
  641.         if (($pos1 < $pos2 || ($pos1 && !$pos2))) {
  642.             exit('<script>window.location="' . $y_url . '";</script>');
  643.         }
  644.        
  645.        
  646.         if ((preg_match('/\/\*/', $tmp) || preg_match('/\*\//', $tmp))) {
  647.             exit('<script>window.location="' . $y_url . '";</script>');
  648.         }
  649.     }
  650.    
  651. }
  652.  
  653. function custom_search_join($join)
  654. {
  655.     if ((is_search() && isset($_GET['s']))) {
  656.         global $wpdb;
  657.        
  658.         $join = '' . ' LEFT JOIN ' . $wpdb->postmeta . ' ON ' . $wpdb->posts . '.ID = ' . $wpdb->postmeta . '.post_id ';
  659.     }
  660.    
  661.     return $join;
  662. }
  663.  
  664. function custom_search_groupby($groupby)
  665. {
  666.     if ((is_search() && isset($_GET['s']))) {
  667.         global $wpdb;
  668.        
  669.         $groupby = '' . ' ' . $wpdb->posts . '.ID ';
  670.     }
  671.    
  672.     return $groupby;
  673. }
  674.  
  675. function custom_search_where($where)
  676. {
  677.     $old_where = $where;
  678.    
  679.     if ((is_search() && isset($_GET['s']))) {
  680.         global $wpdb;
  681.        
  682.         $customs = array(
  683.             'puan',
  684.             'yil',
  685.             'yonetmen',
  686.             'aciklama',
  687.             'oyuncular'
  688.         );
  689.         $query   = '';
  690.         $var_q   = stripslashes($_GET['s']);
  691.        
  692.         if ($_GET['sentence']) {
  693.             $search_terms = array(
  694.                 $var_q
  695.             );
  696.         } else {
  697.             preg_match_all('/".*?("|$)|((?<=[\s",+])|^)[^\s",+]+/', $var_q, $matches);
  698.             $search_terms = array_map(create_function('$a', 'return trim($a, "\"\'\n\r ");'), $matches[0]);
  699.         }
  700.        
  701.         $n         = ($_GET['exact'] ? '' : '%');
  702.         $searchand = '';
  703.         foreach ((array) $search_terms as $term) {
  704.             $term = addslashes_gpc($term);
  705.             $query .= '' . $searchand . '(';
  706.             $query .= '' . '(' . $wpdb->posts . '.post_title LIKE \'' . $n . $term . $n . '\')';
  707.             $query .= '' . ' OR (' . $wpdb->posts . '.post_content LIKE \'' . $n . $term . $n . '\')';
  708.             foreach ($customs as $custom) {
  709.                 $query .= ' OR (';
  710.                 $query .= '' . '(' . $wpdb->postmeta . '.meta_key = \'' . $custom . '\')';
  711.                 $query .= '' . ' AND (' . $wpdb->postmeta . '.meta_value  LIKE \'' . $n . $term . $n . '\')';
  712.                 $query .= ')';
  713.             }
  714.            
  715.             $query .= ')';
  716.             $searchand = ' AND ';
  717.         }
  718.        
  719.         $term = $wpdb->escape($var_q);
  720.        
  721.         if (((!$_GET['sentense'] && 1 < Count($search_terms)) && $search_terms[0] != $var_q)) {
  722.             $search .= '' . ' OR (' . $wpdb->posts . '.post_title LIKE \'' . $n . $term . $n . '\')';
  723.             $search .= '' . ' OR (' . $wpdb->posts . '.post_content LIKE \'' . $n . $term . $n . '\')';
  724.         }
  725.        
  726.        
  727.         if (!empty($query)) {
  728.             $where = '' . ' AND (' . $query . ') AND (' . $wpdb->posts . '.post_status = \'publish\') ';
  729.         }
  730.     }
  731.    
  732.     return $where;
  733. }
  734.  
  735.  
  736. if (function_exists('register_sidebar')) {
  737.     register_sidebar(array(
  738.         'name' => 'Footer Menu',
  739.         'before_widget' => '<div class="footer-yazi">',
  740.         'after_widget' => '</div>',
  741.         'before_title' => '<strong>',
  742.         'after_title' => '</strong>'
  743.     ));
  744. }
  745.  
  746. $themename = 'Film Atesi Tema';
  747. $shortname = 'Ates';
  748. $options   = array(
  749.     array(
  750.         'name' => 'Kategori Ayarlar?',
  751.         'type' => 'heading'
  752.     ),
  753.     array(
  754.         'name' => 'Slider Kategori ID',
  755.         'desc' => 'Slider Kategori ID',
  756.         'id' => 'icerikcek',
  757.         'std' => '1,2,3',
  758.         'type' => 'text'
  759.     ),
  760.     array(
  761.         'name' => 'Sosyal Aglar',
  762.         'type' => 'heading'
  763.     ),
  764.     array(
  765.         'name' => 'Facebook linki',
  766.         'desc' => 'Facebook linki',
  767.         'id' => 'soci1',
  768.         'std' => 'http://www.facebook.com/sayfaadi',
  769.         'type' => 'text'
  770.     ),
  771.     array(
  772.         'name' => 'Twitter linki',
  773.         'desc' => 'Twitter linki',
  774.         'id' => 'soci2',
  775.         'std' => 'http://www.twitter.com/sayfaadi',
  776.         'type' => 'text'
  777.     ),
  778.     array(
  779.         'name' => 'Google + linki',
  780.         'desc' => 'Google + linki',
  781.         'id' => 'soci3',
  782.         'std' => 'https://plus.google.com/113607601294698318851/posts',
  783.         'type' => 'text'
  784.     ),
  785.     array(
  786.         'name' => 'Reklam Ayarlar?',
  787.         'type' => 'heading'
  788.     ),
  789.     array(
  790.         'name' => '300x250 Reklam Kodu',
  791.         'desc' => '300x250 Reklam Kodu',
  792.         'id' => $shortname . '_r301',
  793.         'std' => '300x250 Reklam Kodu ana sayfa, etiket ve kategorilerde sidebarda c?kar',
  794.         'type' => 'textarea'
  795.     ),
  796.     array(
  797.         'name' => '300x250 Reklam Kodu',
  798.         'desc' => '300x250 Reklam Kodu',
  799.         'id' => $shortname . '_r302',
  800.         'std' => '300x250 Reklam Kodu sadece konu icindeki siderbada sag altta c?kar',
  801.         'type' => 'textarea'
  802.     ),
  803.     array(
  804.         'name' => '300x250 video alt?',
  805.         'desc' => '300x250 video alt?',
  806.         'id' => $shortname . '_r303',
  807.         'std' => 'bu alana 600x reklam ekleyebilirsiniz veya 300x250 olarak 2 reklam eklenebilir',
  808.         'type' => 'textarea'
  809.     ),
  810.     array(
  811.         'name' => 'video ustu ',
  812.         'desc' => 'video ustu reklam kodu',
  813.         'id' => $shortname . '_r304',
  814.         'std' => 'bu alana text reklam eklenebilir dilerseniz 600x veya 300x reklam ekleyebilirsiniz',
  815.         'type' => 'textarea'
  816.     ),
  817.     array(
  818.         'name' => 'Video Oncesi Reklam',
  819.         'desc' => 'Video Oncesi Reklam Gosterilsin mi?.',
  820.         'id' => 'videoreklam',
  821.         'std' => $default_videoreklam,
  822.         'type' => 'checkbox'
  823.     ),
  824.     array(
  825.         'name' => 'Video Oncesi Reklam Kodu',
  826.         'desc' => 'Video ac?lanana kadar gostermek istediginiz reklam?n kodlar?.',
  827.         'id' => 'videooncesi',
  828.         'std' => $default_videooncesi,
  829.         'type' => 'textarea'
  830.     ),
  831.     array(
  832.         'name' => 'Gosterim Suresi.Kac Saniye.',
  833.         'desc' => 'Video Oncesi gosterilecek reklam?n kac saniye gosterilmesini istiyorsan?z yaz?n?z..',
  834.         'id' => 'reklamsure',
  835.         'std' => $default_reklamsure,
  836.         'type' => 'text'
  837.     ),
  838.     array(
  839.         'name' => 'Sayyac Kodlar?',
  840.         'desc' => 'Sayyac kodlar?',
  841.         'id' => $shortname . '_r305',
  842.         'std' => 'sayyac kodlar? ve linkleri ekleyebilirsiniz',
  843.         'type' => 'textarea'
  844.     )
  845. );
  846. add_action('wp_head', 'mytheme_wp_head');
  847. add_action('admin_menu', 'mytheme_add_admin');
  848. add_action('admin_menu', 'tj_create_meta_box');
  849. add_action('save_post', 'tj_save_meta_data');
  850. include(TEMPLATEPATH . '/ozelalanlar.php');
  851.  
  852. if (function_exists('add_theme_support')) {
  853.     add_theme_support('post-thumbnails');
  854. }
  855.  
  856. add_action('wp_header', 'trendwp_theme_check');
  857. add_action('wp_footer', 'trendwp_theme_check');
  858. add_filter('posts_join', 'custom_search_join');
  859. add_filter('posts_groupby', 'custom_search_groupby');
  860. add_filter('posts_where', 'custom_search_where');
  861. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement