PluginProbe
Preloader / trunk
Preloader vtrunk
trunk 2.0.0 2.0.1 2.0.2
the-preloader / preloader.php

preloader.php in Preloader trunk, at preloader.php

59 lines 2.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: Preloader
4 * Version: 2.0.2
5 * Description: The ultimate Preloader plugin for WordPress. Smart, flexible, and made for easy control. Add a preloader to your website easily in only 3 steps.
6 * Author: Alobaidi
7 * Author URI: https://wp-plugins.in/PreloaderPlugin
8 * Plugin URI: https://wp-plugins.in/PreloaderPlugin
9 * Text Domain: the-preloader
10 * Requires at least: 5.8
11 * Requires PHP: 7.4
12 * License: GPLv2 or later
13 * License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
14 *
15 * This program is free software; you can redistribute it and/or modify it under the terms of the GNU
16 * General Public License version 2, as published by the Free Software Foundation. You may NOT assume
17 * that you can use any other version of the GPL.
18 *
19 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
20 * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
21 */
22
23 if ( !defined('ABSPATH') ) {
24 exit; // Exit if accessed directly
25 }
26
27 // Define plugin constants
28 define('THE_PRELOADER_PLUGIN_ID', 'the_preloader');
29 define('THE_PRELOADER_PLUGIN_VERSION', '2.0.2');
30 define('THE_PRELOADER_PLUGIN_PATH', plugin_dir_path(__FILE__));
31 define('THE_PRELOADER_PLUGIN_URL', plugin_dir_url(__FILE__));
32 define('THE_PRELOADER_PLUGIN_BASENAME', plugin_basename(__FILE__));
33
34
35 // Add custom link to plugin meta row.
36 function the_preloader_plugin_row_meta($links, $file) {
37 $plugin_file = THE_PRELOADER_PLUGIN_BASENAME;
38
39 if ( $file == $plugin_file ) {
40
41 $custom_link = array(
42 '<a style="font-weight:bold;" href="https://wp-plugins.in/PreloaderPlugin" target="_blank">' . esc_html__('Plugin Reference', 'the-preloader') . '</a>',
43 '<a style="font-weight:bold;" href="https://wp-time.com/video-popup-plugin-for-wordpress/#live-demo" target="_blank">' . esc_html__('Video Popup Plugin', 'the-preloader') . '</a>'
44 );
45
46 $links = array_merge($links, $custom_link);
47 }
48
49 return $links;
50 }
51 add_filter('plugin_row_meta', 'the_preloader_plugin_row_meta', 10, 2);
52
53
54 // Plugin initialization
55 if ( !class_exists('The_Preloader_Core') ) {
56 require_once THE_PRELOADER_PLUGIN_PATH . 'includes/class-core.php';
57 $The_Preloader_Main = The_Preloader_Core::get_instance();
58 $The_Preloader_Main->initialize();
59 }