widget-google-reviews
Last commit date
assets
3 years ago
includes
3 years ago
languages
3 years ago
autoloader.php
4 years ago
grw.php
3 years ago
index.php
4 years ago
readme.txt
3 years ago
grw.php
72 lines
| 1 | <?php |
| 2 | /* |
| 3 | Plugin Name: Plugin for Google Reviews |
| 4 | Plugin URI: https://richplugins.com/business-reviews-bundle-wordpress-plugin |
| 5 | Description: Instantly Google Places Reviews on your website to increase user confidence and SEO. |
| 6 | Version: 2.3 |
| 7 | Author: RichPlugins <support@richplugins.com> |
| 8 | Author URI: https://richplugins.com |
| 9 | Text Domain: widget-google-reviews |
| 10 | Domain Path: /languages |
| 11 | */ |
| 12 | |
| 13 | namespace WP_Rplg_Google_Reviews; |
| 14 | |
| 15 | if (!defined('ABSPATH')) { |
| 16 | exit; |
| 17 | } |
| 18 | |
| 19 | require(ABSPATH . 'wp-includes/version.php'); |
| 20 | |
| 21 | define('GRW_VERSION' , '2.3'); |
| 22 | define('GRW_PLUGIN_FILE' , __FILE__); |
| 23 | define('GRW_PLUGIN_URL' , plugins_url(basename(plugin_dir_path(__FILE__ )), basename(__FILE__))); |
| 24 | define('GRW_ASSETS_URL' , GRW_PLUGIN_URL . '/assets/'); |
| 25 | |
| 26 | define('GRW_GOOGLE_PLACE_API' , 'https://maps.googleapis.com/maps/api/place/'); |
| 27 | |
| 28 | require_once __DIR__ . '/autoloader.php'; |
| 29 | |
| 30 | /*-------------------------------- Links --------------------------------*/ |
| 31 | function grw_plugin_action_links($links, $file) { |
| 32 | $plugin_file = basename(__FILE__); |
| 33 | if (basename($file) == $plugin_file) { |
| 34 | $settings_link = '<a href="' . admin_url('admin.php?page=grw-builder') . '">' . |
| 35 | '<span style="background-color:#fb8e28;color:#fff;font-weight:bold;padding:0px 8px 2px">' . |
| 36 | 'Connect Reviews' . |
| 37 | '</span>' . |
| 38 | '</a>'; |
| 39 | array_unshift($links, $settings_link); |
| 40 | } |
| 41 | return $links; |
| 42 | } |
| 43 | add_filter('plugin_action_links', 'WP_Rplg_Google_Reviews\\grw_plugin_action_links', 10, 2); |
| 44 | |
| 45 | /*-------------------------------- Row Meta --------------------------------*/ |
| 46 | function grw_plugin_row_meta($input, $file) { |
| 47 | if ($file != plugin_basename( __FILE__ )) { |
| 48 | return $input; |
| 49 | } |
| 50 | |
| 51 | $links = array( |
| 52 | //'<a href="' . admin_url('admin.php?page=grw-support') . '" target="_blank">' . __('View Documentation', 'widget-google-reviews') . '</a>', |
| 53 | |
| 54 | '<a href="' . esc_url('https://richplugins.com/business-reviews-bundle-wordpress-plugin') . '" target="_blank">' . __('Upgrade to Business', 'widget-google-reviews') . ' »</a>', |
| 55 | |
| 56 | '<a href="' . esc_url('https://wordpress.org/support/plugin/widget-google-reviews/reviews/#new-post') . '" target="_blank">' . __('Rate plugin', 'widget-google-reviews') . ' <span style="color:#ffb900;font-size:1.5em;position:relative;top:0.1em;">� |
| 57 | � |
| 58 | � |
| 59 | � |
| 60 | � |
| 61 | </span></a>', |
| 62 | ); |
| 63 | $input = array_merge($input, $links); |
| 64 | return $input; |
| 65 | } |
| 66 | add_filter('plugin_row_meta', 'WP_Rplg_Google_Reviews\\grw_plugin_row_meta', 10, 2); |
| 67 | |
| 68 | /*-------------------------------- Plugin init --------------------------------*/ |
| 69 | $grw = new Includes\Plugin(); |
| 70 | $grw->register(); |
| 71 | |
| 72 | ?> |