PluginProbe
Hover Effects – easily create any hover effect / 2.1.2
Hover Effects – easily create any hover effect v2.1.2
trunk 2.1.1 2.1.2 2.1.3
hover-effects / hover-effects.php

hover-effects.php in Hover Effects – easily create any hover effect 2.1.2, at hover-effects.php

121 lines 3.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: Hover Effects
4 * Plugin URI: https://wordpress.org/plugins/hover-effects/
5 * Description: Hover Effect is easily applied to your own elements, modified or just used for inspiration.
6 * Version: 2.1.2
7 * Author: Wow-Company
8 * Author URI: http://wow-company.com
9 * License: GPL-2.0+
10 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
11 */
12 if ( ! defined( 'WPINC' ) ) {
13 die;
14 }
15 // Declaration Wow-Company class
16 if ( ! class_exists( 'Wow_Company' ) ) {
17 require_once plugin_dir_path( __FILE__ ) . 'asset/class-wow-company.php';
18 }
19 if ( ! class_exists( 'WOW_DATA' ) ) {
20 require_once plugin_dir_path( __FILE__ ) . 'include/class/data.php';
21 }
22 if ( ! class_exists( 'JavaScriptPacker' ) ) {
23 require_once plugin_dir_path( __FILE__ ) . 'include/class/packer.php';
24 }
25 // Declaration of the plugin class
26 if ( ! class_exists( 'Hover_Effects_Class' ) ) {
27 class Hover_Effects_Class {
28 /**
29 * @var string
30 */
31 private $name;
32 /**
33 * @var string
34 */
35 private $version;
36 /**
37 * @var string
38 */
39 private $pluginname;
40 /**
41 * @var string
42 */
43 private $plugindir;
44 /**
45 * @var string
46 */
47 private $pluginurl;
48
49 function __construct() {
50 $this->name = 'Hover Effects';
51 $this->version = '2.1.2';
52 $this->pluginname = dirname( plugin_basename( __FILE__ ) );
53 $this->plugindir = plugin_dir_path( __FILE__ );
54 $this->pluginurl = plugin_dir_url( __FILE__ );
55 // admin pages
56 add_action( 'admin_menu', array( $this, 'add_menu_page' ) );
57
58 // add general style
59 add_action( 'wp_enqueue_scripts', array( $this, 'plugin_scripts' ) );
60 // admin links
61 add_filter( 'plugin_row_meta', array( $this, 'row_meta' ), 10, 4 );
62 add_filter( 'plugin_action_links', array( $this, 'action_links' ), 10, 2 );
63
64 }
65
66 // AdminPanel
67 function add_menu_page() {
68 add_submenu_page( 'wow-company', $this->name, $this->name, 'manage_options', $this->pluginname, array(
69 $this,
70 'plugin_admin'
71 ) );
72 }
73
74 function plugin_admin() {
75 $name = $this->name;
76 $pluginname = $this->pluginname;
77 $version = $this->version;
78 global $wow_company_plugin;
79 $wow_company_plugin = true;
80 include_once( 'admin/partials/main.php' );
81 self:: plugin_admin_style_script();
82 }
83
84 function plugin_admin_style_script() {
85 // plugin sctyle & script
86 wp_enqueue_style( $this->pluginname . '-style', $this->pluginurl . 'admin/css/style.css', false, $this->version );
87 wp_enqueue_script( $this->pluginname . '-script', $this->pluginurl . 'admin/js/script.js', array( 'jquery' ), $this->version );
88 // icon style
89 wp_enqueue_style( $this->pluginname . '-icon', $this->pluginurl . 'asset/font-awesome/css/font-awesome.min.css', array(), '4.7.0' );
90 wp_enqueue_style( $this->pluginname, plugin_dir_url( __FILE__ ) . 'asset/css/hover.css', array(), $this->version );
91 }
92
93 // General plugin styles & scripts
94 function plugin_scripts() {
95 wp_enqueue_style( $this->pluginname, plugin_dir_url( __FILE__ ) . 'asset/css/hover.css', array(), $this->version );
96 }
97
98 // Admin links
99 function row_meta( $meta, $plugin_file ) {
100 if ( false === strpos( $plugin_file, basename( __FILE__ ) ) ) {
101 return $meta;
102 }
103 $meta[] = '<a href="https://wordpress.org/support/plugin/hover-effects/" target="_blank">Support </a> ';
104
105 return $meta;
106 }
107
108 function action_links( $actions, $plugin_file ) {
109 if ( false === strpos( $plugin_file, basename( __FILE__ ) ) ) {
110 return $actions;
111 }
112 $settings_link = '<a href="admin.php?page=' . $this->pluginname . '">Settings</a>';
113 array_unshift( $actions, $settings_link );
114
115 return $actions;
116 }
117
118 }
119
120 $plugin = new Hover_Effects_Class();
121 }