daily pastebin goal
6%
SHARE
TWEET

Functions.php code

fcvolunteer Nov 22nd, 2011 345 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. add_action( 'after_setup_theme', 'et_setup_theme' );
  3. if ( ! function_exists( 'et_setup_theme' ) ){
  4.         function et_setup_theme(){
  5.                 require_once(TEMPLATEPATH . '/epanel/custom_functions.php');
  6.  
  7.                 require_once(TEMPLATEPATH . '/includes/functions/comments.php');
  8.  
  9.                 require_once(TEMPLATEPATH . '/includes/functions/sidebars.php');
  10.  
  11.                 load_theme_textdomain('Glider',get_template_directory().'/lang');
  12.  
  13.                 require_once(TEMPLATEPATH . '/epanel/options_glider.php');
  14.  
  15.                 require_once(TEMPLATEPATH . '/epanel/core_functions.php');
  16.  
  17.                 require_once(TEMPLATEPATH . '/epanel/post_thumbnails_glider.php');
  18.                
  19.                 include(TEMPLATEPATH . '/includes/widgets.php');
  20.                
  21.                 require_once(TEMPLATEPATH . '/includes/additional_functions.php');
  22.         }
  23. }
  24.  
  25. if ( ! function_exists( 'et_list_pings' ) ){
  26.         function et_list_pings($comment, $args, $depth) {
  27.                 $GLOBALS['comment'] = $comment; ?>
  28.        
  29.                 <li id="comment-<?php comment_ID(); ?>"><?php comment_author_link(); ?> - <?php comment_excerpt(); ?>
  30.         <?php }
  31. }
  32.  
  33. //Define the key to store in the database
  34. define( 'CF7_COUNTER', 'cf7-counter' );
  35.  
  36. //Create the shortcode which will set the value for the DTX field
  37. function cf7dtx_counter(){
  38.     $val = get_option( CF7_COUNTER, 0) + 1;  //Increment the current count
  39.     return $val;
  40. }
  41. add_shortcode('CF7_counter', 'cf7dtx_counter');
  42.  
  43. //Action performed when the mail is actually sent by CF7
  44. function cf7dtx_increment_mail_counter(){
  45.     $val = get_option( CF7_COUNTER, 0) + 1; //Increment the current count
  46.     update_option(CF7_COUNTER, $val); //Update the settings with the new count
  47. }
  48. add_action('wpcf7_mail_sent', 'cf7dtx_increment_mail_counter'); ?>
  49.  
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top