Beispiel #1
0
 function chip_validation_fn($input)
 {
     /* Validation: chip_zero_logo */
     $chip_boolean_pd = Chip_Zero_Options::chip_boolean_pd();
     if (!array_key_exists($input['chip_zero_logo'], $chip_boolean_pd)) {
         $input['chip_zero_logo'] = 0;
     }
     /* Validation: chip_zero_logo_url */
     if (!empty($input['chip_zero_logo_url'])) {
         $input['chip_zero_logo_url'] = esc_url($input['chip_zero_logo_url']);
     }
     /* Validation: chip_zero_post_style */
     $chip_post_style_pd = Chip_Zero_Options::chip_post_style_pd();
     if (!array_key_exists($input['chip_zero_post_style'], $chip_post_style_pd)) {
         $input['chip_zero_post_style'] = "excerpt";
     }
     /* Validation: chip_zero_header_style */
     $chip_header_style_pd = Chip_Zero_Options::chip_header_style_pd();
     if (!array_key_exists($input['chip_zero_header_style'], $chip_header_style_pd)) {
         $input['chip_zero_header_style'] = "header";
     }
     /* Validation: chip_zero_related_post */
     $chip_boolean_pd = Chip_Zero_Options::chip_boolean_pd();
     if (!array_key_exists($input['chip_zero_related_post'], $chip_boolean_pd)) {
         $input['chip_zero_related_post'] = 0;
     }
     /* Validation: chip_zero_related_post_number */
     $chip_related_posts_pd = Chip_Zero_Options::chip_related_posts_pd();
     if (!array_key_exists($input['chip_zero_related_post_number'], $chip_related_posts_pd)) {
         $input['chip_zero_related_post_number'] = 3;
     }
     /* Validation: chip_zero_sponsor_header_728x90 */
     $chip_boolean_pd = Chip_Zero_Options::chip_boolean_pd();
     if (!array_key_exists($input['chip_zero_sponsor_header_728x90'], $chip_boolean_pd)) {
         $input['chip_zero_sponsor_header_728x90'] = 0;
     }
     /* Validation: chip_zero_sponsor_header_728x90_code */
     if (!empty($input['chip_zero_sponsor_header_728x90_code'])) {
         $input['chip_zero_sponsor_header_728x90_code'] = htmlspecialchars($input['chip_zero_sponsor_header_728x90_code']);
     }
     /* Validation: chip_zero_sponsor_header_728x15 */
     $chip_boolean_pd = Chip_Zero_Options::chip_boolean_pd();
     if (!array_key_exists($input['chip_zero_sponsor_header_728x15'], $chip_boolean_pd)) {
         $input['chip_zero_sponsor_header_728x15'] = 0;
     }
     /* Validation: chip_zero_sponsor_header_728x15_code */
     if (!empty($input['chip_zero_sponsor_header_728x15_code'])) {
         $input['chip_zero_sponsor_header_728x15_code'] = htmlspecialchars($input['chip_zero_sponsor_header_728x15_code']);
     }
     /* Validation: chip_zero_sponsor_post_undertitle */
     $chip_boolean_pd = Chip_Zero_Options::chip_boolean_pd();
     if (!array_key_exists($input['chip_zero_sponsor_post_undertitle'], $chip_boolean_pd)) {
         $input['chip_zero_sponsor_post_undertitle'] = 0;
     }
     /* Validation: chip_zero_sponsor_post_undertitle_code */
     if (!empty($input['chip_zero_sponsor_post_undertitle_code'])) {
         $input['chip_zero_sponsor_post_undertitle_code'] = htmlspecialchars($input['chip_zero_sponsor_post_undertitle_code']);
     }
     /* Validation: chip_zero_sponsor_post_468x15 */
     $chip_boolean_pd = Chip_Zero_Options::chip_boolean_pd();
     if (!array_key_exists($input['chip_zero_sponsor_post_468x15'], $chip_boolean_pd)) {
         $input['chip_zero_sponsor_post_468x15'] = 0;
     }
     /* Validation: chip_zero_sponsor_post_468x15_code */
     if (!empty($input['chip_zero_sponsor_post_468x15_code'])) {
         $input['chip_zero_sponsor_post_468x15_code'] = htmlspecialchars($input['chip_zero_sponsor_post_468x15_code']);
     }
     /* Validation: chip_zero_rss */
     $chip_boolean_pd = Chip_Zero_Options::chip_boolean_pd();
     if (!array_key_exists($input['chip_zero_rss'], $chip_boolean_pd)) {
         $input['chip_zero_rss'] = 0;
     }
     /* Validation: chip_zero_rss_url */
     if (!empty($input['chip_zero_rss_url'])) {
         $input['chip_zero_rss_url'] = esc_url($input['chip_zero_rss_url']);
     }
     /* Validation: chip_zero_feedburner */
     $chip_boolean_pd = Chip_Zero_Options::chip_boolean_pd();
     if (!array_key_exists($input['chip_zero_feedburner'], $chip_boolean_pd)) {
         $input['chip_zero_rss'] = 0;
     }
     /* Validation: chip_zero_feedburner_id */
     if (!empty($input['chip_zero_feedburner_id'])) {
         $input['chip_zero_feedburner_id'] = wp_kses($input['chip_zero_feedburner_id'], array());
     }
     /* Validation: chip_zero_feedburner_post_bottom */
     $chip_boolean_pd = Chip_Zero_Options::chip_boolean_pd();
     if (!array_key_exists($input['chip_zero_feedburner_post_bottom'], $chip_boolean_pd)) {
         $input['chip_zero_rss'] = 0;
     }
     /* Validation: chip_zero_twitter */
     $chip_boolean_pd = Chip_Zero_Options::chip_boolean_pd();
     if (!array_key_exists($input['chip_zero_twitter'], $chip_boolean_pd)) {
         $input['chip_zero_twitter'] = 0;
     }
     /* Validation: chip_zero_twitter_url */
     if (!empty($input['chip_zero_twitter_url'])) {
         $input['chip_zero_twitter_url'] = esc_url($input['chip_zero_twitter_url']);
     }
     /* Validation: chip_zero_delicious */
     $chip_boolean_pd = Chip_Zero_Options::chip_boolean_pd();
     if (!array_key_exists($input['chip_zero_delicious'], $chip_boolean_pd)) {
         $input['chip_zero_delicious'] = 0;
     }
     /* Validation: chip_zero_delicious_url */
     if (!empty($input['chip_zero_delicious_url'])) {
         $input['chip_zero_delicious_url'] = esc_url($input['chip_zero_delicious_url']);
     }
     /* Validation: chip_zero_facebook */
     $chip_boolean_pd = Chip_Zero_Options::chip_boolean_pd();
     if (!array_key_exists($input['chip_zero_facebook'], $chip_boolean_pd)) {
         $input['chip_zero_facebook'] = 0;
     }
     /* Validation: chip_zero_facebook_url */
     if (!empty($input['chip_zero_facebook_url'])) {
         $input['chip_zero_facebook_url'] = esc_url($input['chip_zero_facebook_url']);
     }
     /* Validation: chip_zero_stumble */
     $chip_boolean_pd = Chip_Zero_Options::chip_boolean_pd();
     if (!array_key_exists($input['chip_zero_stumble'], $chip_boolean_pd)) {
         $input['chip_zero_stumble'] = 0;
     }
     /* Validation: chip_zero_stumble_url */
     if (!empty($input['chip_zero_stumble_url'])) {
         $input['chip_zero_stumble_url'] = esc_url($input['chip_zero_stumble_url']);
     }
     /* Validation: chip_zero_digg */
     $chip_boolean_pd = Chip_Zero_Options::chip_boolean_pd();
     if (!array_key_exists($input['chip_zero_digg'], $chip_boolean_pd)) {
         $input['chip_zero_digg'] = 0;
     }
     /* Validation: chip_zero_digg_url */
     if (!empty($input['chip_zero_digg_url'])) {
         $input['chip_zero_digg_url'] = esc_url($input['chip_zero_digg_url']);
     }
     /* Validation: chip_zero_authorbox */
     $chip_boolean_pd = Chip_Zero_Options::chip_boolean_pd();
     if (!array_key_exists($input['chip_zero_authorbox'], $chip_boolean_pd)) {
         $input['chip_zero_authorbox'] = 0;
     }
     /* Validation: chip_zero_analytic */
     $chip_boolean_pd = Chip_Zero_Options::chip_boolean_pd();
     if (!array_key_exists($input['chip_zero_analytic'], $chip_boolean_pd)) {
         $input['chip_zero_analytic'] = 0;
     }
     /* Validation: chip_zero_analytic_code */
     if (!empty($input['chip_zero_analytic_code'])) {
         $input['chip_zero_analytic_code'] = htmlspecialchars($input['chip_zero_analytic_code'], ENT_NOQUOTES);
     }
     /* Validation: chip_zero_field_copyright */
     if (!empty($input['chip_zero_field_copyright'])) {
         $input['chip_zero_field_copyright'] = htmlspecialchars($input['chip_zero_field_copyright'], ENT_NOQUOTES);
     }
     /* Validation: chip_zero_reset */
     $chip_boolean_pd = Chip_Zero_Options::chip_boolean_pd();
     if (!array_key_exists(chip_zero_undefined_index_fix($input['chip_zero_reset']), $chip_boolean_pd)) {
         $input['chip_zero_reset'] = 0;
     }
     return $input;
 }
Beispiel #2
0
 Forum</a> &sdot;
       <a href="http://www.tutorialchip.com/chip-zero-free-premium-wordpress-theme/" class="chipzeroadmin"><?php 
echo get_current_theme();
?>
 Official Page</a> &sdot;
       <a href="http://chip-zero.tutorialchip.com/" class="chipzeroadmin"><?php 
echo get_current_theme();
?>
 Demo Page</a> &sdot;
       <a href="http://www.tutorialchip.com/" class="chipzeroadmin">More WordPress Themes</a>
     </p>
   </div>   
  </div>
  
  <?php 
if (chip_zero_undefined_index_fix($_REQUEST['settings-updated']) == "true") {
    ?>
  <div class="updated fade margin10tb"><p><strong>Settings Saved.</strong></p></div>
  <?php 
}
?>
  
  <form action="options.php" method="post" class="margin10tb">
    
    <?php 
settings_fields('chip_zero_options_group');
?>
    
    <div id="chip_zero_tabs" class="margin10tb">
    
      <ul>