/* Get Options from Theme Options */
$atp_style = get_option('atp_style');
$readmoretxt = get_option('atp_readmoretxt') ? get_option('atp_readmoretxt') : 'Read more';
$starttimetxt = get_option('atp_starttime') ? get_option('atp_starttime') : 'Starts';
$endtimetxt = get_option('atp_endtime') ? get_option('atp_endtime') : 'Ends';
$datetxt = get_option('atp_date') ? get_option('atp_date') : 'Date';
$venuetxt = get_option('atp_venue') ? get_option('atp_venue') : 'Venue';
$locationtxt = get_option('atp_location') ? get_option('atp_location') : 'Location';
$projectdatetxt = get_option('atp_project_date') ? get_option('atp_project_date') : 'Project Date:';
$projecturltxt = get_option('atp_project_url') ? get_option('atp_project_url') : 'Project Url:';
$skillstxt = get_option('atp_skills') ? get_option('atp_skills') : 'Skills:';
$visitsitetxt = get_option('atp_visitsitetxt') ? get_option('atp_visitsitetxt'):'Visit Site';
$categoriestxt = get_option('atp_category') ? get_option('atp_category') : 'Category:';
$breadcrumb_separator = get_option('atp_breadcrumbsep',"") ? get_option('atp_breadcrumbsep') : '';
$atp_singlenavigation = get_option( 'atp_singlenavigation' );
$projectDescription = get_option('atp_projectDescription',"") ? get_option('atp_projectDescription') : 'Project Description';
$projectDetails = get_option('atp_projectDetails',"") ? get_option('atp_projectDetails') : 'Project Details';
// Awesomefonts - deprecated since hostmev2 - v1.7.2
// Updated to Awesomefonts version 4.0.3
//require_once( get_template_directory() . '/framework/includes/awesomefont_array.php' );
// Corner Ribbons
require_once( get_template_directory() . '/framework/includes/ribbons_array.php' );
/* Importer */
require_once( get_template_directory() . '/framework/admin/iva-importer/iva-importer.php' );
require_once( get_template_directory() . '/framework/admin/ob_import_export.php' );
// Animation Effects Array
$iva_anim = array(
'' => 'Select Animation',
'flash' => 'flash',
'shake' => 'shake',
'bounce' => 'bounce',
'tada' => 'tada',
'swing' => 'swing',
'wobble' => 'wobble',
'flip' => 'flip',
'flipInX' => 'flipInX',
'flipOutX' => 'flipOutX',
'flipInY' => 'flipInY',
'flipOutY' => 'flipOutY',
'fadeIn' => 'fadeIn',
'fadeInUp' => 'fadeInUp',
'fadeInDown' => 'fadeInDown',
'fadeInLeft' => 'fadeInLeft',
'fadeInRight' => 'fadeInRight',
'fadeOut' => 'fadeOut',
'fadeOutUp' => 'fadeOutUp',
'fadeOutDown' => 'fadeOutDown',
'fadeOutLeft' => 'fadeOutLeft',
'fadeOutRight' => 'fadeOutRight',
'slideInDown' => 'slideInDown',
'slideInLeft' => 'slideInLeft',
'slideInRight' => 'slideInRight',
'slideOutUp' => 'slideOutUp',
'slideOutLeft' => 'slideOutLeft',
'slideOutRight' => 'slideOutRight',
'bounceIn' => 'bounceIn',
'bounceInDown' => 'bounceInDown',
'bounceInUp' => 'bounceInUp',
'bounceInLeft' => 'bounceInLeft',
'bounceInRight' => 'bounceInRight',
'lightSpeedIn' => 'lightSpeedIn',
'lightSpeedOut' => 'lightSpeedOut'
);
// Sociable Icons Array
$staff_social = array(
'' => 'Select Sociable',
'delicious' => 'Delicious',
'deviant' => 'Deviant',
'digg' => 'Digg',
'facebook' => 'Facebook',
'flickr' => 'Flickr',
'google' => 'Goolge',
'google-plus' => 'Goolge Plus',
'linkedin' => 'Linkedin',
'pinterest' => 'Pinterest',
'skype' => 'Skype',
'stumbleupon' => 'Stumbleupon',
'twitter' => 'Twitter',
'dribbble' => 'Dribbble',
'yahoo' => 'Yahoo',
'youtube' => 'Youtube'
);
ksort($staff_social); // Sort Sociabls by Alphabetical Order
// Theme Class
if ( ! class_exists('ATP_Theme') ) {
class ATP_Theme
{
public $theme_name;
public $meta_box;
public function __construct()
{
$this->atp_constant();
$this->atp_themesupport();
$this->atp_head();
$this->atp_themepanel();
$this->atp_widgets();
$this->atp_post_types();
$this->atp_custom_meta();
$this->atp_meta_generator();
$this->atp_shortcodes();
$this->atp_common();
}
function atp_constant()
{
// Framework General Variables and directory paths
$theme_data;
if ( function_exists('wp_get_theme') ) {
$theme_data = wp_get_theme();
$themeversion = $theme_data->Version;
$theme_name = $theme_data->Name;
}
/**
* Set the file path based on whether the Options
* Framework is in a parent theme or child theme
* Directory Structure
*/
define( 'FRAMEWORK', '4.0' ); // Theme Framework
define( 'THEMENAME', $theme_name );
define( 'THEMEVERSION', $themeversion );
define( 'THEME_URI', get_template_directory_uri() );
define( 'THEME_DIR', get_template_directory() );
define( 'THEME_JS', THEME_URI . '/js' );
define( 'THEME_CSS', THEME_URI . '/css' );
define( 'FRAMEWORK_DIR', THEME_DIR. '/framework/' );
define( 'FRAMEWORK_URI', THEME_URI. '/framework/' );
define( 'CUSTOM_META', FRAMEWORK_DIR. '/custom-meta/' );
define( 'CUSTOM_PLUGINS', FRAMEWORK_DIR. '/custom-plugins/' );
define( 'CUSTOM_POST', FRAMEWORK_DIR. '/custom-post/' );
define( 'THEME_SHORTCODES', FRAMEWORK_DIR . 'shortcode/' );
define( 'THEME_WIDGETS', FRAMEWORK_DIR . 'widgets/' );
define( 'THEME_PLUGINS', FRAMEWORK_DIR . 'plugins/' );
define( 'THEME_POSTTYPE', FRAMEWORK_DIR .'custom-post/' );
define( 'THEME_CUSTOMMETA', FRAMEWORK_DIR.'custom-meta/' );
define( 'THEME_PATTDIR', THEME_URI. '/images/patterns/' );
}
/**
* Allows a theme to register its support of a certain features
*/
function atp_themesupport()
{
add_theme_support( 'post-formats', array( 'aside', 'audio', 'link', 'image', 'gallery', 'quote', 'status', 'video' ) );
add_theme_support( 'post-thumbnails');
add_theme_support( 'automatic-feed-links' );
add_theme_support( 'editor-style' );
add_theme_support( 'menus' );
/* Register Menu */
register_nav_menus( array(
'primary-menu' => __( 'Primary Menu','ATP_ADMIN_SITE' )
));
/* Define Content Width */
if ( ! isset( $content_width ) ) $content_width = 900;
}
/* Scripts and Styles Enqueue */
function atp_head()
{
require_once( FRAMEWORK_DIR . 'common/head.php' );
}
/* Admin Interface */
function atp_themepanel()
{
require_once( FRAMEWORK_DIR . 'common/atp_googlefont.php' );
require_once( FRAMEWORK_DIR . 'admin/admin-interface.php' );
require_once( FRAMEWORK_DIR . 'admin/theme-options.php' );
}
/* Widgets */
function atp_widgets()
{
$atp_widgts = array( 'register_widget', 'contactinfo', 'flickr', 'twitter', 'sociable', 'popularpost', 'recentpost', 'testimonial', 'testimonials_submit' );
foreach( $atp_widgts as $widget ) {
require_once( THEME_WIDGETS .$widget.'.php' );
}
}
/**
* Load Custom Post Types Templates
* @files slider, events, testimonials, portfolio
*/
function atp_post_types()
{
require_once( THEME_POSTTYPE . '/slider.php' );
require_once( THEME_POSTTYPE . '/events.php' );
require_once( THEME_POSTTYPE . '/testimonial.php' );
require_once(THEME_POSTTYPE . '/portfolio.php');
}
/** Load Meta Generator Templates
* @files Slider, Events, Menus, Testimonial, Page, Posts, Shortcodes Generator
*/
function atp_custom_meta()
{
require_once( THEME_CUSTOMMETA . '/page-meta.php' );
require_once( THEME_CUSTOMMETA . '/post-meta.php' );
require_once( THEME_CUSTOMMETA . '/slider-meta.php' );
require_once( THEME_CUSTOMMETA . '/testimonial-meta.php' );
require_once( THEME_CUSTOMMETA . '/portfolio-meta.php');
require_once( THEME_CUSTOMMETA . '/events-meta.php' );
}
function atp_meta_generator()
{
require_once( THEME_CUSTOMMETA . '/meta-generator.php' );
require_once( THEME_CUSTOMMETA . '/shortcode-meta.php' );
require_once( THEME_CUSTOMMETA . '/shortcode-generator.php' );
}
/* Shortcodes */
function atp_shortcodes()
{
$atp_short = array( 'accordion', 'boxes', 'blog', 'portfolio', 'buttons', 'contactinfo', 'flickr', 'general', 'gallery', 'feature_box','image', 'layout', 'lightbox', 'planbox', 'messageboxes', 'flexslider', 'tabs_toggles', 'twitter', 'gmap', 'testimonial', 'sociable', 'videos', 'staff', 'progressbar', 'services', 'carousel_events', 'carousel_blog', 'progresscircle', 'iva_whmcsdomain' );
foreach( $atp_short as $short ) {
require_once( THEME_SHORTCODES .$short.'.php' );
}
}
/**
* Theme Functions
* @uses skin generator
* @uses twitter class
* @uses pagination
* @uses sociables
* @uses Aqua imageresize // Credits : http://aquagraphite.com/
* @uses plugin activation class
*/
function atp_common()
{
require_once( THEME_DIR . '/css/skin.php' );
require_once( FRAMEWORK_DIR . 'common/class_twitter.php' );
require_once( FRAMEWORK_DIR . 'common/atp_generator.php' );
require_once( FRAMEWORK_DIR . 'common/pagination.php' );
require_once( FRAMEWORK_DIR . 'common/sociables.php' );
require_once( FRAMEWORK_DIR . 'includes/image_resize.php' );
require_once( FRAMEWORK_DIR . 'includes/class-activation.php' );
}
/**
* Custom Switch case for fetching
* posts, post-types, custom-taxonomies, tags
*/
function atp_variable( $type )
{
$iva_terms = array();
switch( $type ){
case 'pages': // Get Page Titles
$atp_entries = get_pages( 'sort_column=post_parent,menu_order' );
foreach ( $atp_entries as $atpPage ) {
$iva_terms[$atpPage->ID] = $atpPage->post_title;
}
break;
case 'slider': // Get Slider Slug and Name
$atp_entries = get_terms( 'slider_cat', 'orderby=name&hide_empty=0' );
foreach ( $atp_entries as $atpSlider ) {
$iva_terms[$atpSlider->slug] = $atpSlider->name;
$slider_ids[] = $atpSlider->slug;
}
break;
case 'portfolio': // Get Portfolio Slug and Name
$atp_entries = get_terms( 'portfolio_cat', 'orderby=name&hide_empty=0' );
foreach ( $atp_entries as $atpPortfolio ) {
$iva_terms[$atpPortfolio->slug] = $atpPortfolio->name;
$slider_ids[] = $atpPortfolio->slug;
}
break;
case 'posts': // Get Posts Slug and Name
$atp_entries = get_categories( 'hide_empty=0' );
foreach ( $atp_entries as $atpPosts ) {
$iva_terms[$atpPosts->slug] = $atpPosts->name;
$atp_posts_ids[] = $atpPosts->slug;
}
break;
case 'categories':
$atp_entries = get_categories('hide_empty=true');
foreach ($atp_entries as $atp_posts) {
$iva_terms[$atp_posts->term_id] = $atp_posts->name;
$atp_posts_ids[] = $atp_posts->term_id;
}
break;
case 'events': // Get Events Slug and Name
$atp_entries = get_terms( 'events_cat','orderby=name&hide_empty=0' );
foreach ( $atp_entries as $atpEvents ) {
$iva_terms[$atpEvents->slug] = $atpEvents->name;
$eventsvalue_id[] = $atpEvents->slug;
}
break;
case 'testimonial': // Get Testimonial Slug and Name
$atp_entries = get_terms( 'testimonial_cat', 'orderby=name&hide_empty=0' );
foreach ( $atp_entries as $atpTestimonial ) {
$iva_terms[$atpTestimonial->slug] = $atpTestimonial->name;
$testimonialvalue_id[] = $atpTestimonial->slug;
}
break;
case 'tags': // Get Taxonomy Tags
$atp_entries = get_tags( array( 'taxonomy' => 'post_tag' ) );
foreach ( $atp_entries as $atpTags ) {
$iva_terms[$atpTags->slug] = $atpTags->name;
}
break;
case 'slider_type': // Slider Arrays for Theme Options
$iva_terms = array(
'' => 'Select Slider',
'flexslider' => 'Flex Slider',
'planbox' => 'Planbox Slider',
'videoslider' => 'Single Video',
'static_image' => 'Static Image',
'customslider' => 'Custom Slider'
);
break;
}
return $iva_terms;
}
}
}
$atp_theme = new ATP_Theme();
$shortname = 'atp';
$url = FRAMEWORK_URI . 'admin/images/';
if ( ! function_exists( 'atp_theme_setup' ) ) {
function atp_theme_setup()
{
load_theme_textdomain( 'THEME_FRONT_SITE', get_template_directory() . '/languages' );
load_theme_textdomain( 'ATP_ADMIN_SITE', get_template_directory() . '/languages' );
add_filter( 'the_content', 'pfix' );
add_filter( 'the_content', 'pre_process_shortcode', 7);
add_filter( 'widget_text', 'do_shortcode' );
add_filter( 'posts_where', 'multi_tax_terms');
add_filter( 'wp_trim_excerpt', 'new_excerpt_more' );
add_filter( 'upload_mimes', 'atp_custom_upload_mimes');
}
add_action( 'after_setup_theme', 'atp_theme_setup' );
}
// Admin Login Logo
if ( ! function_exists( 'atp_custom_login_logo' ) ) {
function atp_custom_login_logo() {
if ( get_option('atp_admin_logo') ) {
echo '';
}
}
add_action('login_head', 'atp_custom_login_logo');
}
/***
* Shortcodes p tag Fix
*/
if ( ! function_exists( 'pfix' ) ) {
function pfix( $content )
{
$array = array (
'[' => '[',
']
' => ']',
']
' => ']'
);
$content = strtr( $content, $array );
return $content;
}
}
if ( ! function_exists( 'pre_process_shortcode' ) ) {
function pre_process_shortcode($content) {
global $shortcode_tags;
$orig_shortcode_tags = $shortcode_tags;
$shortcode_tags = array();
add_shortcode('button', 'sys_button');
add_shortcode('services', 'services_content');
add_shortcode('contactinfo', 'sys_contact_info');
$content = do_shortcode($content);
// Put the original shortcodes back
$shortcode_tags = $orig_shortcode_tags;
return $content;
}
}
if ( ! function_exists( 'get_attachment_id_from_src' ) ) {
function get_attachment_id_from_src ($image_src) {
global $wpdb;
$query = "SELECT ID FROM {$wpdb->posts} WHERE guid='$image_src'";
$id = $wpdb->get_var($query);
return $id;
}
}
/**
* Multiple taxonomies
*/
if ( ! function_exists( 'multi_tax_terms' ) ) {
function multi_tax_terms($where) {
global $wp_query, $wpdb;
$term_ids = array();
if (isset($wp_query->query_vars['term']) && (strpos($wp_query->query_vars['term'], ',') !== false && strpos($where, "AND 0") !== false)) {
//Get the terms
$term_arr = explode(",", $wp_query->query_vars['term']);
foreach ($term_arr as $term_item) {
$terms[] = get_terms($wp_query->query_vars['taxonomy'], array(
'slug' => $term_item
));
} //$term_arr as $term_item
//Get the id of posts with that term in that taxonomy
if ($terms){
foreach ($terms as $term) {
$term_ids[] = $term[0]->term_id;
} //$terms as $term
}
$post_ids = get_objects_in_term($term_ids, $wp_query->query_vars['taxonomy']);
if (!is_wp_error($post_ids) && count($post_ids)) {
// Build the new query
$new_where = " AND $wpdb->posts.ID IN (" . implode(', ', $post_ids) . ") ";
$where = str_replace("AND 0", $new_where, $where);
}else {
}
} //$wp_query
return $where;
}
}
// Excerpt removes ...
if ( ! function_exists( 'new_excerpt_more' ) ) {
function new_excerpt_more( $excerpt ) {
return str_replace( '[...]', '...', $excerpt );
}
}
// Custom Upload file extension
if ( ! function_exists( 'atp_custom_upload_mimes' ) ) {
function atp_custom_upload_mimes($existing_mimes)
{
// add the file extension to the array
$existing_mimes['eot'] = 'font/eot';
$existing_mimes['ttf'] = 'font/ttf';
$existing_mimes['woff'] = 'font/woff';
$existing_mimes['svg'] = 'font/svg';
return $existing_mimes;
}
}
/***
* code that executes when theme is being activated
*/
if ( is_admin() && isset( $_GET['activated'] ) && $pagenow == 'themes.php' && get_option( 'atp_default_template_option_values','defaultoptionsnotexists' ) == 'defaultoptionsnotexists' ){
$default_option_values = 'YToxODA6e3M6ODoiYXRwX2xvZ28iO3M6NDoibG9nbyI7czoxNToiYXRwX2hlYWRlcl9sb2dvIjtzOjU0OiJodHRwOi8vd3d3LmFpdmFodGhlbWVzLmNvbS9ob3N0bWV2Mi9maWxlcy9ob3N0bWV2Mi5wbmciO3M6MTQ6ImF0cF9hZG1pbl9sb2dvIjtzOjU0OiJodHRwOi8vd3d3LmFpdmFodGhlbWVzLmNvbS9ob3N0bWV2Mi9maWxlcy9ob3N0bWV2Mi5wbmciO3M6MTk6ImF0cF9sb2dvdGl0bGVfY29sb3IiO3M6MDoiIjtzOjE4OiJhdHBfbG9nb3RpdGxlX3NpemUiO3M6MDoiIjtzOjI0OiJhdHBfbG9nb3RpdGxlX2xpbmVoZWlnaHQiO3M6MDoiIjtzOjE5OiJhdHBfbG9nb3RpdGxlX3N0eWxlIjtzOjA6IiI7czoyNToiYXRwX2xvZ290aXRsZV9mb250dmFyaWFudCI7czowOiIiO3M6MTc6ImF0cF90YWdsaW5lX2NvbG9yIjtzOjA6IiI7czoxNjoiYXRwX3RhZ2xpbmVfc2l6ZSI7czowOiIiO3M6MjI6ImF0cF90YWdsaW5lX2xpbmVoZWlnaHQiO3M6MDoiIjtzOjE3OiJhdHBfdGFnbGluZV9zdHlsZSI7czowOiIiO3M6MjM6ImF0cF90YWdsaW5lX2ZvbnR2YXJpYW50IjtzOjA6IiI7czoxODoiYXRwX2N1c3RvbV9mYXZpY29uIjtzOjA6IiI7czoxMDoiYXRwX3RlYXNlciI7czo3OiJkZWZhdWx0IjtzOjE2OiJhdHBfbGF5b3V0b3B0aW9uIjtzOjk6InN0cmV0Y2hlZCI7czoxOToiYXRwX2dvb2dsZWFuYWx5dGljcyI7czowOiIiO3M6MTg6ImF0cF90ZWFzZXJfdHdpdHRlciI7czoxNDoiQHN5c3RlbTMyc3Rvcm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default_template_option_values', $default_option_values, '', 'yes' );
atp_options();
update_option_values( $iva_options,unserialize( base64_decode( $default_option_values ) ) );
}
/**
* Filters wp_title to print a neat tag based on what is being viewed.
*
* @param string $title Default title text for current view.
* @param string $sep Optional separator.
* @return string The filtered title.
*/
if ( ! function_exists( 'iva_wp_title' ) ) {
function iva_wp_title( $title, $sep ) {
global $paged, $page;
if ( is_feed() )
return $title;
// Add the site name.
$title .= get_bloginfo( 'name' );
// Add the site description for the home/front page.
$site_description = get_bloginfo( 'description', 'display' );
if ( $site_description && ( is_home() || is_front_page() ) )
$title = "$title $sep $site_description";
// Add a page number if necessary.
if ( $paged >= 2 || $page >= 2 )
$title = "$title $sep " . sprintf( __( 'Page %s', 'iva_theme_front' ), max( $paged, $page ) );
return $title;
}
add_filter( 'wp_title', 'iva_wp_title', 10, 2 );
}
add_filter('post_class', function($classes){
global $wp_query;
if(($wp_query->current_post + 1) == $wp_query->post_count)
$classes[] = 'last-post';
return $classes;
});