/** * @package Akismet */ /* Plugin Name: Akismet Plugin URI: https://akismet.com/ Description: Used by millions, Akismet is quite possibly the best way in the world to protect your blog from spam. It keeps your site protected even while you sleep. To get started: 1) Click the "Activate" link to the left of this description, 2) Sign up for an Akismet plan to get an API key, and 3) Go to your Akismet configuration page, and save your API key. Version: 3.1.11 Author: Automattic Author URI: https://automattic.com/wordpress-plugins/ License: GPLv2 or later Text Domain: akismet */ /* 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 Street, Fifth Floor, Boston, MA 02110-1301, USA. Copyright 2005-2015 Automattic, Inc. */ // Make sure we don't expose any info if called directly if ( !function_exists( 'add_action' ) ) { echo 'Hi there! I\'m just a plugin, not much I can do when called directly.'; exit; } define( 'AKISMET_VERSION', '3.1.11' ); define( 'AKISMET__MINIMUM_WP_VERSION', '3.2' ); define( 'AKISMET__PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); define( 'AKISMET_DELETE_LIMIT', 100000 ); register_activation_hook( __FILE__, array( 'Akismet', 'plugin_activation' ) ); register_deactivation_hook( __FILE__, array( 'Akismet', 'plugin_deactivation' ) ); require_once( AKISMET__PLUGIN_DIR . 'class.akismet.php' ); require_once( AKISMET__PLUGIN_DIR . 'class.akismet-widget.php' ); add_action( 'init', array( 'Akismet', 'init' ) ); if ( is_admin() ) { require_once( AKISMET__PLUGIN_DIR . 'class.akismet-admin.php' ); add_action( 'init', array( 'Akismet_Admin', 'init' ) ); } //add wrapper class around deprecated akismet functions that are referenced elsewhere require_once( AKISMET__PLUGIN_DIR . 'wrapper.php' ); /** * Plugin Name: CBX Multi Criteria Rating System Addon * Plugin URI: http://wpboxr.com/product/multi-criteria-flexible-rating-system-for-wordpress * Description: CBX Rating system addon for premium version * Version: 1.0.5 * Author: wpboxr * Author URI: http://wpboxr.com * Text Domain: cbratingsystem * License: GPL-2.0+ * License URI: http://www.gnu.org/licenses/gpl-2.0.txt */ /** * Class CBRatingsystemaddon */ //require_once( plugin_dir_path( __FILE__ ) . 'cbratingsystemaddontools.php' ); //require_once( plugin_dir_path( __FILE__ ) . 'cbratingsystemaddonformparts.php' ); require_once( plugin_dir_path( __FILE__ ) . 'cbratingsystemaddonfunctions.php' ); class CBRatingsystemaddon{ protected static $message = ''; protected $plugin_slug = 'cbratingsystemaddon'; const VERSION = '1.0.4'; public function __construct() { load_plugin_textdomain( 'cbratingsystemaddon', false, dirname( plugin_basename( __FILE__ ) ) . '/language/' ); //add custom post type supports add_filter('cbratingsystem_post_types', array($this, 'cbratingsystem_post_types')); // initialize the plugin adding language file //add_action( 'admin_init',array( $this, 'init_ratingsystem_prem')); add_action( 'wpsc_product_addon_after_descr',array( $this, 'ratingsystem_wpecommerce'),80); // add js and css add_action('wp_enqueue_scripts', array( $this, 'cbratingsystem_addon_enqueue_styles' ) ); add_action('wp_enqueue_scripts', array( $this, 'cbratingsystem_addon_enqueue_scripts' ) ); add_action( 'admin_enqueue_scripts', array( $this, 'cbratingsystem_addon_enqueue_styles' ) ); add_action( 'admin_enqueue_scripts', array( $this, 'cbratingsystem_addon_enqueue_scripts' ) ); //add premium fields add_filter('cbratingsystem_default_extra_fields',array('CBRatingsystemaddon','cbratingsystem_default_extra_fields_pro')); // add theme options add_filter('cbratingsystem_theme_options',array($this,'cbratingsystem_theme_options')); add_filter('cbratingsystem_theme_custom_option_wrapper',array($this,'cbratingsystem_theme_options_wrapper')); // hide current user name checkbox add_filter('cbratingsystem_hide_current_user_name',array('cbratingsystemaddonfunctions','cbratingsystem_hide_current_user_name') , 10 , 4 ); add_filter('cbrating_edit_review_user_info', array('cbratingsystemaddonfunctions','cbrating_edit_review_user_info') , 10 , 5); // buddypress intigration //we don't need this filter anymore //add_filter('cbratingsystem_buddypress_description',array('cbratingsystemaddonfunctions','cbratingsystem_buddypress_description')); add_filter('cbratingsystem_buddypress_authorlink',array('cbratingsystemaddonfunctions','cbratingsystem_buddypress_authorlink')); //add_action('') add_action('cbratingsystem_buddypress_activity_post',array('cbratingsystemaddonfunctions','cbratingsystem_buddypress_activity_post')); // add filter for comment status add_filter('cbratingsystem_comment_status',array('cbratingsystemaddonfunctions','cbratingsystem_comment_status')); // add filter for backend comment status bulk action add_filter('cbratingsystem_comment_status_bulk_action',array('cbratingsystemaddonfunctions','cbratingsystem_comment_status_bulk_action')); // comment edit add_filter('cbratingsystem_commentedit_title',array('cbratingsystemaddonfunctions','cbratingsystem_commentedit_title')); //cbratingsystem_commentedit_class add_filter('cbratingsystem_commentedit_class',array('cbratingsystemaddonfunctions','cbratingsystem_commentedit_class')); add_filter('cbratingsystem_commenteditbox_class',array('cbratingsystemaddonfunctions','cbratingsystem_commenteditbox_class')); //cbratingsystem_codeboxr_credit add_filter('cbratingsystem_codeboxr_credit',array('cbratingsystemaddonfunctions','cbratingsystem_codeboxr_credit')); // add more question filter add_filter('ratingsystem_question_number',array($this,'cbratingsystem_question_number')); add_filter('cbratingsystem_add_more_question',array($this,'cbratingsystem_add_more_question'), 10, 2); //add more criteria and start add_filter('cbratingsystem_add_new_star',array($this,'cbratingsystem_add_new_star_addon'), 10, 3); add_filter('cbratingsystem_add_new_crateria',array($this,'cbratingsystem_add_new_crateria'), 10, 2); // tools //add_action('cbrating_tools_settings_wrapper',array($this,'rating_tool_settings')); if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) { // Put your plugin code here // add_action( 'woocommerce_after_single_product' ,array($this,'cbrating_after_single_product')); add_filter('cbratingsystem_change_options' , array($this , 'cbratingsystem_change_options')); add_filter( 'woocommerce_product_tabs', array($this , 'cbxrating_woo_custom_review_tab' ), 98 ); } if( class_exists( 'Easy_Digital_Downloads' )) { // EDD is active add_action( 'edd_after_download_content', array($this,'cbratingedd_after_download_content'),20 ); } //add multiple forms add_filter('cbraing_add_more_forms', array($this ,'cbraing_add_more_forms' )); //add setting link to main core plugin add_filter( "plugin_action_links_" . plugin_basename( __FILE__ ), array( 'CBRatingsystemaddon', 'admin_cbratingsystem_settings_link' ) ); //comment moderation hook add_filter('cbrating_comment_status_mod', array('cbratingsystemaddonfunctions','cbratingsystem_comment_statuslabels'), 10, 6); // ajax request to edit comment add_action( 'wp_ajax_nopriv_cbCommentEditAjaxFunction', array( 'cbratingsystemaddonfunctions', 'cbCommentEditAjaxFunction' ) ); add_action( 'wp_ajax_cbCommentEditAjaxFunction', array( 'cbratingsystemaddonfunctions', 'cbCommentEditAjaxFunction' ) ); // ajax request for comment moderation add_action( 'wp_ajax_nopriv_cbCommentAjaxFunction', array( 'CBRatingSystemAdminReport', 'cbCommentAjaxFunction' ) ); add_action( 'wp_ajax_cbCommentAjaxFunction', array( 'CBRatingSystemAdminReport', 'cbCommentAjaxFunction' ) ); } public function cbratingsystem_post_types($args){ $custom_args = array( 'custom' => array( 'options' => array( 'public' => true, '_builtin' => false, ), 'label' => __( 'Custom post types', 'cbratingsystemaddon' ), ) ); $args = array_merge($args, $custom_args); return $args; } public static function cbratingsystem_default_extra_fields_pro($arr){ $postTypes = CBRatingSystem::post_types(); $userRoles = CBRatingSystem::user_roles(); $editorUserRoles = CBRatingSystem::editor_user_roles(); //planned 8 premium fields will be used in addon plugin $planned_premium_fields = array( 'email_verify_guest' => array( 'label' => __('Guest User Email Verify', 'cbratingsystemaddon'), 'desc' => __( 'Review from guest user will not be published instance if this is enabled, guest will need to verify email', 'cbratingsystemaddon' ), 'type' => 'radio', 'default' => 1, 'required' => false, 'options' => array( '1' => __('Yes','cbratingsystemaddon'), '0' => __('No','cbratingsystemaddon') ), 'extrafield' => true ), //guest user email verify 'buddypress_active' => array( 'label' => __('Enable Buddypress Integration', 'cbratingsystemaddon'), 'desc' => __( 'Control Buddypress plugin integration ', 'cbratingsystemaddon' ), 'type' => 'radio', 'default' => 1, 'required' => false, 'options' => array( '1' => __('Yes','cbratingsystemaddon'), '0' => __('No','cbratingsystemaddon') ), 'extrafield' => true ), //buddypress enable/disable 'buddypress_post' => array( 'label' => __('Buddypress Posting', 'cbratingsystemaddon'), 'desc' => __( 'Post to buddypress after rating', 'cbratingsystemaddon' ), 'type' => 'radio', 'default' => 1, 'required' => false, 'options' => array( '1' => __('Yes','cbratingsystemaddon'), '0' => __('No','cbratingsystemaddon') ), 'extrafield' => true ), //post to buddypress 'replace_wc_tab' => array( 'label' => __('Replace Woocommerce Review Tab', 'cbratingsystemaddon'), 'desc' => __( 'This option will replace woocommerce review tab with Codeboxr Rating System', 'cbratingsystemaddon' ), 'type' => 'radio', 'default' => 1, 'required' => false, 'options' => array( '1' => __('Yes','cbratingsystemaddon'), '0' => __('No','cbratingsystemaddon') ), 'extrafield' => true ), //replace woo tab, woocommerce 'include_with_wpec' => array( 'label' => __('WpEcommerce Integration', 'cbratingsystemaddon'), 'desc' => __( 'Integrate with WpEcommerce', 'cbratingsystemaddon' ), 'type' => 'radio', 'default' => 1, 'required' => false, 'options' => array( '1' => __('Yes','cbratingsystemaddon'), '0' => __('No','cbratingsystemaddon') ), 'extrafield' => true ), //wpEcommerce 'include_with_edd' => array( 'label' => __('Easy Digitaldownloads(EDD) Integration', 'cbratingsystemaddon'), 'desc' => __( 'Integrate with Easy Digitaldownloads(EDD)', 'cbratingsystemaddon' ), 'type' => 'radio', 'default' => 1, 'required' => false, 'options' => array( '1' => __('Yes','cbratingsystemaddon'), '0' => __('No','cbratingsystemaddon') ), 'extrafield' => true ), //easy digital downloads 'hide_all_user_name' => array( 'label' => __('Make Reviewer Anonymouse', 'cbratingsystemaddon'), 'desc' => __( 'Keeps all user anonymouse from frontend', 'cbratingsystemaddon' ), 'type' => 'radio', 'default' => 0, 'required' => false, 'options' => array( '1' => __('Yes','cbratingsystemaddon'), '0' => __('No','cbratingsystemaddon') ), 'extrafield' => true ), //hide all user name, make it anonymouse 'allow_user_to_hide' => array( 'label' => __('Allow Reviwer to be Anonymouse', 'cbratingsystemaddon'), 'desc' => __( 'Allows user to keep their information Anonymouse', 'cbratingsystemaddon' ), 'type' => 'radio', 'default' => 0, 'required' => false, 'options' => array( '1' => __('Yes','cbratingsystemaddon'), '0' => __('No','cbratingsystemaddon') ), 'extrafield' => true ), //allow user to be anonymouse ); return array_merge($arr, $planned_premium_fields); } /** * @param $links * * @return mixed * return rating setting link in backed dashboard */ public static function admin_cbratingsystem_settings_link( $links ) { $settings_link = ''.__('Settings','cbratingsystemaddon').''; array_unshift( $links, $settings_link ); return $links; } /** * @param $ratingarray * * @return mixed * add product type in rating form setting */ public static function cbratingsystem_change_options($ratingarray){ array_push($ratingarray['post_types'] , 'product'); return $ratingarray; } /** * @param $tabs * * @return mixed * review tab call back hook */ function cbxrating_woo_custom_review_tab( $tabs ) { $post_id = get_the_ID(); $default_form = get_option( 'cbratingsystem_defaultratingForm' ); $ratingFormEnabled = get_post_meta( $post_id, '_cbrating_enable_ratingForm', true ); $defaultRatingFormEnabled = get_post_meta( $post_id, '_cbrating_is_default_ratingForm', true ); $ratingFormToShow = get_post_meta( $post_id, '_cbrating_listing_ratingForm', true ); if( ($defaultRatingFormEnabled) != '1'){ $default_form = $ratingFormToShow; } $default_form_settings = CBRatingSystemData :: get_ratingForm($default_form); $get_rating = CBRatingSystemData::get_ratings_summary(array($default_form), array($post_id)); //echo '
';

         //var_dump();
        //echo '
'; if( $ratingFormEnabled == '1' && $default_form_settings ['replace_wc_tab'] == '1'){ $tabs['reviews']['title'] = 'Rating'.'(' .$get_rating[0]['per_post_rating_count'] .')'; $tabs['reviews']['callback'] = array($this , 'cbxrating_woo_custom_review_tab_content' ); // Custom description callback } return $tabs; } /** * chang reiew tab content */ function cbxrating_woo_custom_review_tab_content() { /*$post_id = get_the_ID(); $default_form = get_option( 'cbratingsystem_defaultratingForm' ); $ratingFormEnabled = get_post_meta( $post_id, '_enable_ratingForm', true ); //var_dump($ratingFormEnabled); $defaultRatingFormEnabled = get_post_meta( $post_id, '_is_default_ratingForm', true ); $ratingFormToShow = get_post_meta( $post_id, '_listing_ratingForm', true ); if( ($defaultRatingFormEnabled) != '1'){ $default_form = $ratingFormToShow; } $default_form_settings = CBRatingSystemData :: get_ratingForm($default_form);*/ echo standalonePostingRatingSystem( '', '', '', true ); remove_filter('cbratingsystem_change_options' , array($this , 'cbratingsystem_change_options')); } // add unlimited form public function cbraing_add_more_forms($add_enable){ return true; } /** *ratingsystem_wpecommerce */ public function ratingsystem_wpecommerce(){ $post_id = get_the_ID(); $default_form = get_option( 'cbratingsystem_defaultratingForm' ); $ratingFormEnabled = get_post_meta( $post_id, '_cbrating_enable_ratingForm', true ); $defaultRatingFormEnabled = get_post_meta( $post_id, '_cbrating_is_default_ratingForm', true ); $ratingFormToShow = get_post_meta( $post_id, '_cbrating_cbrating_listing_ratingForm', true ); if( ($defaultRatingFormEnabled) != '1'){ $default_form = $ratingFormToShow; } $default_form_settings = CBRatingSystemData :: get_ratingForm($default_form); // var_dump( $default_form_settings); if($default_form_settings['include_with_wpec'] == '1' &&$ratingFormEnabled == '1'){ //$cbratingsystem_default_form_id = get_option( 'cbratingsystem_defaultratingForm' ); $cbratingsystem_shortcode = '[cbratingsystem form_id='.$default_form.' showreview =1 ]'; echo do_shortcode($cbratingsystem_shortcode); } //update_option('wpsc_enable_comments' ,(int) 1); } /** *cbratingedd_after_download_content */ public function cbratingedd_after_download_content(){ $post_id = get_the_ID(); $default_form = get_option( 'cbratingsystem_defaultratingForm' ); $ratingFormEnabled = get_post_meta( $post_id, '_cbrating_enable_ratingForm', true ); $defaultRatingFormEnabled = get_post_meta( $post_id, '_cbrating_is_default_ratingForm', true ); $ratingFormToShow = get_post_meta( $post_id, '_cbrating_listing_ratingForm', true ); if( ($defaultRatingFormEnabled) != '1'){ $default_form = $ratingFormToShow; } $default_form_settings = CBRatingSystemData :: get_ratingForm($default_form); if($default_form_settings['include_with_edd'] == '1' &&$ratingFormEnabled == '1'){ //$cbratingsystem_default_form_id = get_option( 'cbratingsystem_defaultratingForm' ); $cbratingsystem_shortcode = '[cbratingsystem form_id='.$default_form.' showreview =1 ]'; echo do_shortcode($cbratingsystem_shortcode); } } /** * Register and enqueue style sheet. * * @since 1.0.0 */ public function cbratingsystem_addon_enqueue_styles() { wp_enqueue_style( $this->plugin_slug .'-customstyle', plugins_url( '/assets/css/cbratingsystemaddon.css', __FILE__ ), array(), CBRatingsystemaddon::VERSION ); } /** * */ function init_ratingsystem_prem(){ } /** * Register and enqueues JavaScript files. * * @since 1.0.0 */ public function cbratingsystem_addon_enqueue_scripts() { wp_enqueue_style( 'wp-color-picker' ); wp_enqueue_script('wp-color-picker' ); wp_enqueue_script('jquery' ); wp_enqueue_style('thickbox' ); wp_enqueue_script('media-upload' ); wp_enqueue_script('thickbox' ); if(is_admin()){ wp_enqueue_style( 'wp-color-picker' ); wp_enqueue_style( 'thickbox' ); wp_enqueue_script( 'jquery' ); wp_enqueue_script( 'wp-color-picker' ); wp_enqueue_script( 'media-upload' ); wp_enqueue_script( 'thickbox' ); //wp_register_script( 'cbratingsystem_admin_theme_script', plugins_url( '/js/cbratingsystem.admin.theme.js', __FILE__ ), array( 'jquery', 'wp-color-picker' ), CBRatingSystem::$version ); wp_enqueue_script($this->plugin_slug .'-cbratingsystemformparts', plugins_url( '/assets/js/cbratingsystemformparts.js', __FILE__ ), array('jquery'), CBRatingsystemaddon::VERSION ); wp_enqueue_script($this->plugin_slug .'-cbratingsystemadmintheme', plugins_url( '/assets/js/cbratingsystem.admin.theme.js', __FILE__ ), array( 'jquery', 'wp-color-picker' ), CBRatingsystemaddon::VERSION ); } wp_enqueue_script($this->plugin_slug .'-customscript', plugins_url( '/assets/js/cbratingsystemaddon.js', __FILE__ ), array('jquery'), CBRatingsystemaddon::VERSION ); //wp_enqueue_script( $this->plugin_slug . '-plugin-script', plugins_url( 'assets/js/poll-public.js', __FILE__ ), array( 'jquery' ), self::VERSION ); // wp_localize_script( $this->plugin_slug . '-plugin-script', 'pollAjax', array( 'ajaxurl' =>admin_url( 'admin-ajax.php' ),'error_msg' => __( 'You Have Already Voted', responsivesmartpoll ), 'total_votes' => __( 'Total Votes', responsivesmartpoll ),)); } /** * @param $themes * add mor etheme options */ public function cbratingsystem_theme_options($themes){ $themes = array_merge($themes,array('blueish' => __( "Blueish", 'cbratingsystemaddon' ), 'greenish' => __( "Greenish", 'cbratingsystemaddon' ),'custom' => __( "Custom", 'cbratingsystemaddon' ))); return $themes; } // return html wrapper for custom theme public function cbratingsystem_theme_options_wrapper($cbthemesettings){ $cbthemesettings['custom_wrapper'] = ''; return $cbthemesettings; } // filter question number and add 10 question public function cbratingsystem_question_number($question_number) { $question_number = 10; return $question_number; } /** * Add more question button * * @param $q_id int * * @return string */ function cbratingsystem_add_more_question($msg ='', $q_id){ // var_dump($qs_count); $output = ' '.__('Add New Question','cbratingsystemaddon').''; return $output; } /** * Add New Criteria button * * @param $cbaddcriteria * * @return string */ public function cbratingsystem_add_new_crateria($msg ='', $label_id){ $output = ''.__('Add New Criteria','cbratingsystemaddon').''; //$output = ''; return $output; } /** * Adds new star button * * @param $arr array * * @return string */ function cbratingsystem_add_new_star_addon($msg ='', $label_id, $star_id){ //var_dump($label_id); //var_dump($star_id); $output = ''.__('Add New Star','cbratingsystem').''; //$output = ''; return $output; } /** * add content after woocommerce product */ function cbrating_after_single_product(){ $cbratingsystem_default_form_id = get_option( 'cbratingsystem_defaultratingForm' ); $cbratingsystem_shortcode = '[cbratingsystem form_id='.$cbratingsystem_default_form_id.']'; echo do_shortcode($cbratingsystem_shortcode); } }// end of class // create a instance of the class new CBRatingsystemaddon(); /* Plugin Name: Embed PDF Plugin URI: https://github.com/pathawks/Embed-PDF Description: Embed a PDF using Google Docs Viewer Author: Pat Hawks Author URI: http://pathawks.com License: GPLv2 License URI: http://www.gnu.org/licenses/gpl-2.0.html Version: 1.0.6 Copyright 2014 Pat Hawks (email : pat@pathawks.com) 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-1301 USA */ register_activation_hook( __FILE__, 'dirtysuds_embed_pdf_enable_embeds' ); wp_embed_register_handler( 'pdf', '#(^(http|wpurl)\:\/\/.+\.pdf$)#i', 'dirtysuds_embed_pdf' ); add_shortcode( 'gdoc', 'dirtysuds_embed_pdf' ); function dirtysuds_embed_pdf_enable_embeds() { update_option('embed_autourls',1); } function dirtysuds_embed_pdf( $matches, $atts, $url, $rawattr=null ) { extract( shortcode_atts( array( 'height' => get_option('embed_size_h'), 'width' => get_option('embed_size_w'), 'border' => '0', 'style' => '', 'title' => '', 'class' => 'pdf', 'id' => '', ), $atts ) ); if (!strstr($url,'http://') && strstr($atts,'http://')) { $url = $atts; extract( shortcode_atts( array( 'height' => get_option('embed_size_h'), 'width' => get_option('embed_size_w'), 'border' => '0', 'style' => '', 'title' => '', 'class' => 'pdf', 'id' => '', ), $matches ) ); } if (is_ssl()) { $embed = ''; $embed = ''.$embed.''; $embed .= ''; return apply_filters( 'embed_pdf', $embed, $matches, $atts, $url, $rawattr ); } function dirtysuds_embed_pdf_rate($links,$file) { if (plugin_basename(__FILE__) == $file) { $links[] = 'Rate this plugin'; } return $links; } add_filter('plugin_row_meta', 'dirtysuds_embed_pdf_rate',10,2); /** * Plugin Name: Google Analytics Dashboard for WP * Plugin URI: https://deconf.com * Description: Displays Google Analytics Reports and Real-Time Statistics in your Dashboard. Automatically inserts the tracking code in every page of your website. * Author: Alin Marcu * Version: 4.9.3.1 * Author URI: https://deconf.com * Text Domain: google-analytics-dashboard-for-wp * Domain Path: /languages */ // Exit if accessed directly if ( ! defined( 'ABSPATH' ) ) exit(); // Plugin Version if ( ! defined( 'GADWP_CURRENT_VERSION' ) ) { define( 'GADWP_CURRENT_VERSION', '4.9.3.1' ); } if ( ! class_exists( 'GADWP_Manager' ) ) { final class GADWP_Manager { private static $instance = null; public $config = null; public $frontend_actions = null; public $common_actions = null; public $backend_actions = null; public $tracking = null; public $frontend_item_reports = null; public $backend_setup = null; public $frontend_setup = null; public $backend_widgets = null; public $backend_item_reports = null; public $gapi_controller = null; /** * Construct forbidden */ private function __construct() { if ( null !== self::$instance ) { _doing_it_wrong( __FUNCTION__, __( "This is not allowed, read the documentation!", 'google-analytics-dashboard-for-wp' ), '4.6' ); } } /** * Clone warning */ private function __clone() { _doing_it_wrong( __FUNCTION__, __( "This is not allowed, read the documentation!", 'google-analytics-dashboard-for-wp' ), '4.6' ); } /** * Wakeup warning */ private function __wakeup() { _doing_it_wrong( __FUNCTION__, __( "This is not allowed, read the documentation!", 'google-analytics-dashboard-for-wp' ), '4.6' ); } /** * Creates a single instance for GADWP and makes sure only one instance is present in memory. * * @return GADWP_Manager */ public static function instance() { if ( null === self::$instance ) { self::$instance = new self(); self::$instance->setup(); self::$instance->config = new GADWP_Config(); } return self::$instance; } /** * Defines constants and loads required resources */ private function setup() { // Plugin Path if ( ! defined( 'GADWP_DIR' ) ) { define( 'GADWP_DIR', plugin_dir_path( __FILE__ ) ); } // Plugin URL if ( ! defined( 'GADWP_URL' ) ) { define( 'GADWP_URL', plugin_dir_url( __FILE__ ) ); } // Plugin main File if ( ! defined( 'GADWP_FILE' ) ) { define( 'GADWP_FILE', __FILE__ ); } /* * Load Tools class */ include_once ( GADWP_DIR . 'tools/tools.php' ); /* * Load Config class */ include_once ( GADWP_DIR . 'config.php' ); /* * Load GAPI Controller class */ include_once ( GADWP_DIR . 'tools/gapi.php' ); /* * Plugin i18n */ add_action( 'init', array( self::$instance, 'load_i18n' ) ); /* * Plugin Init */ add_action( 'init', array( self::$instance, 'load' ) ); /* * Include Install */ include_once ( GADWP_DIR . 'install/install.php' ); register_activation_hook( GADWP_FILE, array( 'GADWP_Install', 'install' ) ); /* * Include Uninstall */ include_once ( GADWP_DIR . 'install/uninstall.php' ); register_uninstall_hook( GADWP_FILE, array( 'GADWP_Uninstall', 'uninstall' ) ); /* * Load Frontend Widgets * (needed during ajax) */ include_once ( GADWP_DIR . 'front/widgets.php' ); /* * Add Frontend Widgets * (needed during ajax) */ add_action( 'widgets_init', array( self::$instance, 'add_frontend_widget' ) ); } /** * Load i18n */ public function load_i18n() { load_plugin_textdomain( 'google-analytics-dashboard-for-wp', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' ); } /** * Register Frontend Widgets */ public function add_frontend_widget() { register_widget( 'GADWP_Frontend_Widget' ); } /** * Conditional load */ public function load() { if ( is_admin() ) { if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) { if ( GADWP_Tools::check_roles( self::$instance->config->options['ga_dash_access_back'] ) ) { /* * Load Backend ajax actions */ include_once ( GADWP_DIR . 'admin/ajax-actions.php' ); self::$instance->backend_actions = new GADWP_Backend_Ajax(); } /* * Load Frontend ajax actions */ include_once ( GADWP_DIR . 'front/ajax-actions.php' ); self::$instance->frontend_actions = new GADWP_Frontend_Ajax(); /* * Load Common ajax actions */ include_once ( GADWP_DIR . 'common/ajax-actions.php' ); self::$instance->common_actions = new GADWP_Common_Ajax(); } else if ( GADWP_Tools::check_roles( self::$instance->config->options['ga_dash_access_back'] ) ) { /* * Load Backend Setup */ include_once ( GADWP_DIR . 'admin/setup.php' ); self::$instance->backend_setup = new GADWP_Backend_Setup(); if ( self::$instance->config->options['dashboard_widget'] ) { /* * Load Backend Widget */ include_once ( GADWP_DIR . 'admin/widgets.php' ); self::$instance->backend_widgets = new GADWP_Backend_Widgets(); } if ( self::$instance->config->options['backend_item_reports'] ) { /* * Load Backend Item Reports */ include_once ( GADWP_DIR . 'admin/item-reports.php' ); self::$instance->backend_item_reports = new GADWP_Backend_Item_Reports(); } } } else { if ( GADWP_Tools::check_roles( self::$instance->config->options['ga_dash_access_front'] ) ) { /* * Load Frontend Setup */ include_once ( GADWP_DIR . 'front/setup.php' ); self::$instance->frontend_setup = new GADWP_Frontend_Setup(); if ( self::$instance->config->options['frontend_item_reports'] ) { /* * Load Frontend Item Reports */ include_once ( GADWP_DIR . 'front/item-reports.php' ); self::$instance->frontend_item_reports = new GADWP_Frontend_Item_Reports(); } } if ( ! GADWP_Tools::check_roles( self::$instance->config->options['ga_track_exclude'], true ) && self::$instance->config->options['ga_dash_tracking'] ) { /* * Load tracking class */ include_once ( GADWP_DIR . 'front/tracking.php' ); self::$instance->tracking = new GADWP_Tracking(); } } } } } /** * Returns a unique instance of GADWP */ function GADWP() { return GADWP_Manager::instance(); } /* * Start GADWP */ GADWP();
Parse error: syntax error, unexpected '}' in /home/content/77/13961177/html/aircanada/wp-content/plugins/google-analytics-for-wordpress/googleanalytics.php on line 62