PluginProbe
Animated Headline / trunk
Animated Headline vtrunk
trunk 2.0 3.0 3.5 4.0 5.0
animated-headline / animated-headline.php

animated-headline.php in Animated Headline trunk, at animated-headline.php

68 lines 2.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /*
3 Plugin Name: Animated Headline
4 Plugin URI: https://wordpress.org/plugins/animated-headline/
5 Description: A simple wordpress plugin for animated headlines using shortcode. [animated-headline title="Hello my friend" animated_text="Anshul,Harshali,Asha,Rahul" animation="rotate-1"]
6 Version: 5.0
7 Author: Anshul G
8 Author URI: https://profiles.wordpress.org/anshuln90/
9 License: GPL2
10 License URI: https://www.gnu.org/licenses/gpl-2.0.html
11 Requires at least: 6.0
12 Requires PHP: 7.4
13 Text Domain: animated-headline
14 */
15
16 define('AH_VERSION', '5.0');
17 define('AH_FILE', basename(__FILE__));
18 define('AH_NAME', str_replace('.php', '', AH_FILE));
19 define('AH_PATH', plugin_dir_path(__FILE__));
20 define('AH_URL', plugin_dir_url(__FILE__));
21 define('AH_HOMEPAGE', 'https://wordpress.org/plugins/animated-headline/');
22
23 if ( ! defined( 'ABSPATH' ) ) {
24 exit;
25 }
26
27 if(!class_exists('animated_headlines'))
28 {
29 class animated_headlines
30 {
31 public function __construct()
32 {
33 require_once(sprintf("%s/settings.php", dirname(__FILE__)));
34 $animated_headlines_settings = new animated_headlines_settings();
35
36 $plugin = plugin_basename(__FILE__);
37 add_filter("plugin_action_links_$plugin", array($this, 'plugin_action_links'));
38 add_filter('plugin_row_meta', array($this, 'plugin_row_meta'), 10, 2);
39 }
40
41 public static function activate() {}
42 public static function deactivate() {}
43
44 public function plugin_action_links($links)
45 {
46 $new = array();
47 $new[] = '<a href="options-general.php?page=animated-headlines">Settings</a>';
48 $new[] = '<a href="https://www.paypal.me/anshulgangrade" target="_blank" style="color:#e06c00;font-weight:600;">&#9829; Donate</a>';
49 return array_merge($new, $links);
50 }
51
52 public function plugin_row_meta($links, $file)
53 {
54 if($file === plugin_basename(__FILE__)){
55 $links[] = '<a href="https://www.paypal.me/anshulgangrade" target="_blank">&#9829; Donate</a>';
56 }
57 return $links;
58 }
59 }
60 }
61
62 if(class_exists('animated_headlines'))
63 {
64 register_activation_hook(__FILE__, array('animated_headlines', 'activate'));
65 register_deactivation_hook(__FILE__, array('animated_headlines', 'deactivate'));
66 $animated_headlines = new animated_headlines();
67 }
68