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

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

84 lines 2.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: 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: 3.0
7 Author: Anshul Labs
8 Author URI: http://www.anshullabs.xyz
9 License: GPL2
10 License URI: http://www.gnu.org/licenses/gpl-2.0.html
11 */
12 /*
13 Copyright 2012 Anshul Labs (email : hello@anshullabs.xyz)
14
15 This program is free software; you can redistribute it and/or modify
16 it under the terms of the GNU General Public License, version 2, as
17 published by the Free Software Foundation.
18
19 This program is distributed in the hope that it will be useful,
20 but WITHOUT ANY WARRANTY; without even the implied warranty of
21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 GNU General Public License for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with this program; if not, write to the Free Software
26 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
27 */
28
29
30 define('AH_VERSION', '3.0');
31 define('AH_FILE', basename(__FILE__));
32 define('AH_NAME', str_replace('.php', '', AH_FILE));
33 define('AH_PATH', plugin_dir_path(__FILE__));
34 define('AH_URL', plugin_dir_url(__FILE__));
35 define('AH_HOMEPAGE', 'https://wordpress.org/plugins/animated-headline/');
36
37 if(!class_exists('animated_headlines'))
38 {
39 class animated_headlines
40 {
41 /* Construct the plugin object */
42 public function __construct()
43 {
44 // Initialize Settings
45 require_once(sprintf("%s/settings.php", dirname(__FILE__)));
46 $animated_headlines_settings = new animated_headlines_settings();
47
48 //Add the settings link to the plugins page.
49 $plugin = plugin_basename(__FILE__);
50 add_filter("plugin_action_links_$plugin", array( $this, 'plugin_detail_link' ));
51 } // END public function __construct
52
53 /* Activate the plugin */
54 public static function activate()
55 {
56 // Do nothing
57 } // END public static function activate
58
59 /* Deactivate the plugin */
60 public static function deactivate()
61 {
62 // Do nothing
63 } // END public static function deactivate
64
65 // Add the settings link to the plugins page
66 function plugin_detail_link($links)
67 {
68 $detail_link = '<a href="options-general.php?page=animated-headlines">Detail</a>';
69 array_unshift($links, $detail_link);
70 return $links;
71 }
72 } // END class animated_headlines
73 } // END if(!class_exists('animated_headlines'))
74
75 if(class_exists('animated_headlines'))
76 {
77 // Installation and uninstallation hooks
78 register_activation_hook(__FILE__, array('animated_headlines', 'activate'));
79 register_deactivation_hook(__FILE__, array('animated_headlines', 'deactivate'));
80
81 // instantiate the plugin class
82 $animated_headlines = new animated_headlines();
83 }
84