Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- add_action( 'after_setup_theme', 'et_setup_theme' );
- if ( ! function_exists( 'et_setup_theme' ) ){
- function et_setup_theme(){
- require_once(TEMPLATEPATH . '/epanel/custom_functions.php');
- require_once(TEMPLATEPATH . '/includes/functions/comments.php');
- require_once(TEMPLATEPATH . '/includes/functions/sidebars.php');
- load_theme_textdomain('Glider',get_template_directory().'/lang');
- require_once(TEMPLATEPATH . '/epanel/options_glider.php');
- require_once(TEMPLATEPATH . '/epanel/core_functions.php');
- require_once(TEMPLATEPATH . '/epanel/post_thumbnails_glider.php');
- include(TEMPLATEPATH . '/includes/widgets.php');
- require_once(TEMPLATEPATH . '/includes/additional_functions.php');
- }
- }
- if ( ! function_exists( 'et_list_pings' ) ){
- function et_list_pings($comment, $args, $depth) {
- $GLOBALS['comment'] = $comment; ?>
- <li id="comment-<?php comment_ID(); ?>"><?php comment_author_link(); ?> - <?php comment_excerpt(); ?>
- <?php }
- }
- //Define the key to store in the database
- define( 'CF7_COUNTER', 'cf7-counter' );
- //Create the shortcode which will set the value for the DTX field
- function cf7dtx_counter(){
- $val = get_option( CF7_COUNTER, 0) + 1; //Increment the current count
- return $val;
- }
- add_shortcode('CF7_counter', 'cf7dtx_counter');
- //Action performed when the mail is actually sent by CF7
- function cf7dtx_increment_mail_counter(){
- $val = get_option( CF7_COUNTER, 0) + 1; //Increment the current count
- update_option(CF7_COUNTER, $val); //Update the settings with the new count
- }
- add_action('wpcf7_mail_sent', 'cf7dtx_increment_mail_counter'); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement