| 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: 4.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', '4.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 |
$detail_link1 = '<a href="http://www.paypal.me/anshulgangrade" rel="nofollow">Donate Me</a>'; |
| 71 |
array_unshift($links, $detail_link1); |
| 72 |
return $links; |
| 73 |
} |
| 74 |
} // END class animated_headlines |
| 75 |
} // END if(!class_exists('animated_headlines')) |
| 76 |
|
| 77 |
if(class_exists('animated_headlines')) |
| 78 |
{ |
| 79 |
// Installation and uninstallation hooks |
| 80 |
register_activation_hook(__FILE__, array('animated_headlines', 'activate')); |
| 81 |
register_deactivation_hook(__FILE__, array('animated_headlines', 'deactivate')); |
| 82 |
|
| 83 |
// instantiate the plugin class |
| 84 |
$animated_headlines = new animated_headlines(); |
| 85 |
} |
| 86 |
|