Ngiler SH3LL 360
Home
Information
Create File
Create Folder
:
/
home
/
tbf
/
public_html_old
/
wp-content
/
plugins
/
monsterinsights-ads
/
Information Server
MySQL :
OFF
Perl :
OFF
CURL :
ON
WGET :
OFF
PKEXEC :
OFF
Directive
Local Value
IP Address
89.40.16.97
System
Linux server.atelieruldeit.ro 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64
User
tbf
PHP Version
7.3.33
Software
Apache
Doc root
Writable
close
Edit File :
monsterinsights-ads.php
| Size :
5.87
KB
Copy
<?php /** * Plugin Name: MonsterInsights - Ads Addon * Plugin URI: https://www.monsterinsights.com * Description: Adds ad tracking options to MonsterInsights * Author: MonsterInsights Team * Author URI: https://www.monsterinsights.com * Version: 1.1.3 * Text Domain: monsterinsights-ads * Domain Path: languages */ // Exit if accessed directly. if ( ! defined( 'ABSPATH' ) ) { exit; } /** * Main plugin class. * * @since 1.0.0 * * @package MonsterInsights_Ads * @author Chris Christoff */ class MonsterInsights_Ads { /** * Holds the class object. * * @since 1.0.0 * * @var object */ public static $instance; /** * Plugin version, used for cache-busting of style and script file references. * * @since 1.0.0 * * @var string */ public $version = '1.1.3'; /** * The name of the plugin. * * @since 1.0.0 * * @var string */ public $plugin_name = 'MonsterInsights Ads'; /** * Unique plugin slug identifier. * * @since 1.0.0 * * @var string */ public $plugin_slug = 'monsterinsights-ads'; /** * Plugin file. * * @since 1.0.0 * * @var string */ public $file; /** * Primary class constructor. * * @since 1.0.0 */ public function __construct() { $this->file = __FILE__; // Load the plugin textdomain. add_action( 'plugins_loaded', array( $this, 'load_plugin_textdomain' ) ); // Load the updater add_action( 'monsterinsights_updater', array( $this, 'updater' ) ); // Load the plugin. add_action( 'monsterinsights_load_plugins', array( $this, 'init' ), 99 ); if ( ! defined( 'MONSTERINSIGHTS_PRO_VERSION' ) ) { // Make sure plugin is listed in Auto-update Disabled view add_filter( 'auto_update_plugin', array( $this, 'disable_auto_update' ), 10, 2 ); // Display call-to-action to get Pro in order to enable auto-update add_filter( 'plugin_auto_update_setting_html', array( $this, 'modify_autoupdater_setting_html' ), 11, 2 ); } } /** * Loads the plugin textdomain for translation. * * @since 1.0.0 */ public function load_plugin_textdomain() { load_plugin_textdomain( $this->plugin_slug, false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' ); } /** * Loads the plugin into WordPress. * * @since 1.0.0 */ public function init() { if ( ! defined( 'MONSTERINSIGHTS_PRO_VERSION' ) ) { // admin notice, MI not installed add_action( 'admin_notices', array( self::$instance, 'requires_monsterinsights' ) ); return; } if ( version_compare( MONSTERINSIGHTS_VERSION, '7.0', '<' ) ) { // MonsterInsights version not supported add_action( 'admin_notices', array( self::$instance, 'requires_monsterinsights_version' ) ); return; } // Load frontend components. $this->require_frontend(); } /** * Initializes the addon updater. * * @since 1.0.0 * * @param string $key The user license key. */ function updater( $key ) { $args = array( 'plugin_name' => $this->plugin_name, 'plugin_slug' => $this->plugin_slug, 'plugin_path' => plugin_basename( __FILE__ ), 'plugin_url' => trailingslashit( WP_PLUGIN_URL ) . $this->plugin_slug, 'remote_url' => 'https://www.monsterinsights.com/', 'version' => $this->version, 'key' => $key ); $updater = new MonsterInsights_Updater( $args ); } /** * Disable auto-update. * * @param bool $update * @param object $item * * @return bool */ public function disable_auto_update( $update, $item ) { // If this is multisite and is not on the main site, return early. if ( is_multisite() && ! is_main_site() ) { return $update; } if ( isset( $item->id ) && plugin_basename( __FILE__ ) === $item->id ) { return false; } return $update; } /** * Display MonsterInsights Pro CTA on Plugins -> autoupdater setting column * * @param string $html * @param string $plugin_file * * @return string */ public function modify_autoupdater_setting_html( $html, $plugin_file ) { if ( plugin_basename( __FILE__ ) === $plugin_file && // If main plugin (free) happens to be enabled and already takes care of this, then bail ! apply_filters( "monsterinsights_is_autoupdate_setting_html_filtered_${plugin_file}", false ) ) { $html = sprintf( '<a href="%s">%s</a>', 'https://www.monsterinsights.com/docs/go-lite-pro/?utm_source=liteplugin&utm_medium=plugins-autoupdate&utm_campaign=upgrade-to-autoupdate&utm_content=monsterinsights-ads', __( 'Enable the MonsterInsights PRO plugin to manage auto-updates', 'monsterinsights-ads' ) ); } return $html; } /** * Loads all frontend files into scope. * * @since 1.0.0 */ public function require_frontend() { require plugin_dir_path( __FILE__ ) . 'includes/frontend/tracking.php'; } /** * Output a nag notice if the user does not have MI installed * * @access public * @since 1.0.0 * * @return void */ public function requires_monsterinsights() { ?> <div class="error"> <p><?php esc_html_e( 'Please install MonsterInsights Pro to use the MonsterInsights Ads addon', 'monsterinsights-ads' ); ?></p> </div> <?php } /** * Output a nag notice if the user does not have MI version installed * * @access public * @since 1.0.0 * * @return void */ public function requires_monsterinsights_version() { ?> <div class="error"> <p><?php esc_html_e( 'Please install or update MonsterInsights Pro with version 7.4 or newer to use the MonsterInsights Ads addon', 'monsterinsights-ads' ); ?></p> </div> <?php } /** * Returns the singleton instance of the class. * * @since 1.0.0 * * @return object The MonsterInsights_Ads object. */ public static function get_instance() { if ( ! isset( self::$instance ) && ! ( self::$instance instanceof MonsterInsights_Ads ) ) { self::$instance = new MonsterInsights_Ads(); } return self::$instance; } } // Load the main plugin class. $monsterinsights_ads = MonsterInsights_Ads::get_instance();
Back