/home/arranoyd/magicraft/wp-content/plugins/the-loading-bar/class-plugin.php
<?php
/**
Plugin Name: The Loading Bar
Description: Adds a loading bar for your website to ensure that your visitors see your site once it's fully loaded in all its glory
Author: Benjamin Intal - Gambit Technologies
Version: 1.6
Author URI: http://gambit.ph
Plugin URI: http://codecanyon.net/item/the-loading-bar-wordpress-plugin/8732899
Text Domain: gambit-loading-bar
Domain Path: /languages
SKU: LOADINGBAR
*
* The main plugin file
*
* @package The Loading Bar
*/
defined( 'VERSION_GAMBIT_LOADING_BAR' ) or define( 'VERSION_GAMBIT_LOADING_BAR', '1.6' );
if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly.
}
defined( 'GAMBIT_LOADING_BAR' ) or define( 'GAMBIT_LOADING_BAR', 'gambit-loading-bar' );
defined( 'GAMBIT_LOADING_BAR_PATH' ) or define( 'GAMBIT_LOADING_BAR_PATH', __FILE__ );
require_once( 'class-admin-license.php' );
require_once( 'class-loading-bar.php' );
if ( ! class_exists( 'TheGambitLoadingBar' ) ) {
/**
* Initializes core plugin that is readable by WordPress.
*
* @return void
* @since 1.0
*/
class TheGambitLoadingBar {
/**
* Hook into WordPress.
*
* @return void
* @since 1.0
*/
function __construct() {
// Admin pointer reminders for automatic updates.
require_once( 'class-admin-pointers.php' );
if ( class_exists( 'GambitAdminPointers' ) ) {
new GambitAdminPointers( array(
'pointer_name' => 'gambitloadingbar', // This should also be placed in uninstall.php.
'header' => __( 'Automatic Updates', GAMBIT_LOADING_BAR ),
'body' => __( 'Keep The Loading Bar plugin updated by entering your purchase code here.', GAMBIT_LOADING_BAR ),
) );
}
add_action( 'plugins_loaded', array( $this, 'load_text_domain' ), 1 );
add_filter( 'plugin_row_meta', array( $this, 'plugin_links' ), 10, 2 );
}
/**
* Loads the translations.
*
* @return void
* @since 1.0
*/
public function load_text_domain() {
load_plugin_textdomain( GAMBIT_LOADING_BAR, false, basename( dirname( __FILE__ ) ) . '/languages/' );
}
/**
* Adds plugin links.
*
* @access public
* @param array $plugin_meta - The current array of links.
* @param string $plugin_file - The plugin file.
* @return array - The current array of links together with our additions.
* @since 1.0
**/
public function plugin_links( $plugin_meta, $plugin_file ) {
if ( plugin_basename( __FILE__ ) === $plugin_file ) {
$pluginData = get_plugin_data( __FILE__ );
$plugin_meta[] = sprintf( "<a href='%s' target='_blank'>%s</a>",
'http://support.gambit.ph?utm_source=' . urlencode( $pluginData['Name'] ) . '&utm_medium=plugin_link',
__( 'Get Customer Support', GAMBIT_LOADING_BAR )
);
$plugin_meta[] = sprintf( "<a href='%s' target='_blank'>%s</a>",
'https://gambit.ph/plugins?utm_source=' . urlencode( $pluginData['Name'] ) . '&utm_medium=plugin_link',
__( 'Get More Plugins', GAMBIT_LOADING_BAR )
);
}
return $plugin_meta;
}
}
new TheGambitLoadingBar();
}