| @@ -1,13 +1,13 @@ | ||
| 1 | 1 | <?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?> |
| 2 | 2 | <?php |
| 3 | 3 | /* |
| 4 | 4 | Plugin Name: YYDevelopment - Phone Button |
| 5 | -Plugin URI: https://www.yydevelopment.com/ | |
| 5 | +Plugin URI: https://www.yydevelopment.com/yydevelopment-wordpress-plugins/ | |
| 6 | 6 | Description: Simple plugin that allow you add phone button to your site |
| 7 | -Version: 1.0.3 | |
| 7 | +Version: 2.1.2 | |
| 8 | 8 | Author: YYDevelopment |
| 9 | -Author URI: https://www.yydevelopment.co.il/ | |
| 9 | +Author URI: https://www.yydevelopment.com/ | |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | 12 | include_once('include/settings.php'); |
| 13 | 13 | require_once('include/functions.php'); |
| @@ -66,8 +66,31 @@ | ||
| 66 | 66 | return $actions; |
| 67 | 67 | } //function yydev_phone_btn_add_settings_link( $actions, $plugin_file ) { |
| 68 | 68 | |
| 69 | 69 | add_filter( 'plugin_action_links', 'yydev_phone_btn_add_settings_link', 10, 5 ); |
| 70 | + | |
| 71 | +// ================================================ | |
| 72 | +// Add donate page to the plugin menu info | |
| 73 | +// ================================================ | |
| 74 | + | |
| 75 | +add_filter( 'plugin_action_links', function($actions, $plugin_file) { | |
| 76 | + | |
| 77 | + static $plugin; | |
| 78 | + | |
| 79 | + if (!isset($plugin)) { $plugin = plugin_basename(__FILE__); } | |
| 80 | + | |
| 81 | + if ($plugin == $plugin_file) { | |
| 82 | + | |
| 83 | + $admin_page_url = esc_url( menu_page_url( 'phone-button', false ) ); | |
| 84 | + $donate = array('donate' => '<a target="_blank" href="https://www.yydevelopment.com/coffee-break/?plugin=phone-button">Donate</a>'); | |
| 85 | + | |
| 86 | + $actions = array_merge($donate, $actions); | |
| 87 | + | |
| 88 | + } // if ($plugin == $plugin_file) { | |
| 89 | + | |
| 90 | + return $actions; | |
| 91 | + | |
| 92 | +}, 10, 5 ); | |
| 70 | 93 | |
| 71 | 94 | // ================================================ |
| 72 | 95 | // output the data into the page front end |
| 73 | 96 | // ================================================ |