Completed
Push — master ( 5896e2...47e6ad )
by Devin
16:24
created
includes/admin/class-gmb-settings.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -18,13 +18,13 @@  discard block
 block discarded – undo
18 18
 	 */
19 19
 	public function __construct() {
20 20
 		parent::__construct();
21
-		$this->page_name = __( 'Google Maps Builder Settings', 'google-maps-builder' );
21
+		$this->page_name = __('Google Maps Builder Settings', 'google-maps-builder');
22 22
 
23
-		add_action( 'cmb2_render_lat_lng_default', array( $this, 'cmb2_render_lat_lng_default' ), 10, 2 );
23
+		add_action('cmb2_render_lat_lng_default', array($this, 'cmb2_render_lat_lng_default'), 10, 2);
24 24
 
25 25
 		//upsell markup
26
-		add_action( 'gmb_settings_page_after_logo', array( $this, 'settings_upsell' ) );
27
-		add_action( 'gmb_social_media_after_logo', array( $this, 'settings_social_media_upsell' ) );
26
+		add_action('gmb_settings_page_after_logo', array($this, 'settings_upsell'));
27
+		add_action('gmb_social_media_after_logo', array($this, 'settings_social_media_upsell'));
28 28
 	}
29 29
 
30 30
 
@@ -35,13 +35,13 @@  discard block
 block discarded – undo
35 35
 	 *
36 36
 	 * @return mixed
37 37
 	 */
38
-	function add_plugin_page_links( $links, $file ) {
38
+	function add_plugin_page_links($links, $file) {
39 39
 
40
-		if ( $file == GMB_PLUGIN_BASE ) {
40
+		if ($file == GMB_PLUGIN_BASE) {
41 41
 
42 42
 			// Add Widget Page link to our plugin
43
-			$settings_link = '<a href="edit.php?post_type=google_maps&page=' . self::$key . '" title="' . __( 'Visit the Google Maps Builder plugin settings page', 'google-maps-builder' ) . '">' . __( 'Settings', 'google-maps-builder' ) . '</a>';
44
-			array_unshift( $links, $settings_link );
43
+			$settings_link = '<a href="edit.php?post_type=google_maps&page='.self::$key.'" title="'.__('Visit the Google Maps Builder plugin settings page', 'google-maps-builder').'">'.__('Settings', 'google-maps-builder').'</a>';
44
+			array_unshift($links, $settings_link);
45 45
 		}
46 46
 
47 47
 		return $links;
@@ -57,14 +57,14 @@  discard block
 block discarded – undo
57 57
 	 *
58 58
 	 * @return array
59 59
 	 */
60
-	function add_plugin_meta_links( $meta, $file ) {
60
+	function add_plugin_meta_links($meta, $file) {
61 61
 
62
-		if ( $file == GMB_PLUGIN_BASE ) {
63
-			$meta[] = "<a href='http://wordpress.org/support/view/plugin-reviews/google-maps-builder' target='_blank' title='" . __( 'Rate Google Maps Builder on WordPress.org', 'google-maps-builder' ) . "'>" . __( 'Rate Plugin', 'google-maps-builder' ) . "</a>";
64
-			$meta[] = "<a href='https://wordimpress.com/documentation/maps-builder-pro/' target='_blank' title='" . __( 'View the plugin documentation', 'google-maps-builder' ) . "'>" . __( 'Documentation', 'google-maps-builder' ) . "</a>";
65
-			$meta[] = '<a href="http://wordpress.org/support/plugin/google-maps-builder/" target="_blank" title="' . __( 'Get plugin support via the WordPress community', 'google-maps-builder' ) . '">' . __( 'Support', 'google-maps-builder' ) . '</a>';
62
+		if ($file == GMB_PLUGIN_BASE) {
63
+			$meta[] = "<a href='http://wordpress.org/support/view/plugin-reviews/google-maps-builder' target='_blank' title='".__('Rate Google Maps Builder on WordPress.org', 'google-maps-builder')."'>".__('Rate Plugin', 'google-maps-builder')."</a>";
64
+			$meta[] = "<a href='https://wordimpress.com/documentation/maps-builder-pro/' target='_blank' title='".__('View the plugin documentation', 'google-maps-builder')."'>".__('Documentation', 'google-maps-builder')."</a>";
65
+			$meta[] = '<a href="http://wordpress.org/support/plugin/google-maps-builder/" target="_blank" title="'.__('Get plugin support via the WordPress community', 'google-maps-builder').'">'.__('Support', 'google-maps-builder').'</a>';
66 66
 			$meta[] = '<a href="
67
-https://wordimpress.com/plugins/maps-builder-pro?utm_source=MBF&utm_medium=BANNER&utm_content=LISTING&utm_campaign=MBF%20LISTING" title="' . __( 'Upgrade to Maps Builder Pro', 'google-maps-builder' ) . '" target="_blank">' . __( 'Upgrade to Pro', 'google-maps-builder' ) . ' &raquo;</a>';
67
+https://wordimpress.com/plugins/maps-builder-pro?utm_source=MBF&utm_medium=BANNER&utm_content=LISTING&utm_campaign=MBF%20LISTING" title="' . __('Upgrade to Maps Builder Pro', 'google-maps-builder').'" target="_blank">'.__('Upgrade to Pro', 'google-maps-builder').' &raquo;</a>';
68 68
 		}
69 69
 
70 70
 		return $meta;
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 	 */
80 80
 	public function settings_upsell() { ?>
81 81
 		<a href="https://wordimpress.com/plugins/maps-builder-pro?utm_source=MBF&utm_medium=BANNER&utm_content=SETTINGS&utm_campaign=MBF%20Settings" target="_blank" class="button gmb-settings-header-btn">
82
-			<?php _e( 'Upgrade to Pro', 'google-maps-builder' ); ?>
82
+			<?php _e('Upgrade to Pro', 'google-maps-builder'); ?>
83 83
 		</a>
84 84
 		<?php
85 85
 	}
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 		?>
96 96
 		<div class="go-pro">
97 97
 			<a href="https://wordimpress.com/plugins/maps-builder-pro?utm_source=MBF&amp;utm_medium=BANNER&amp;utm_content=SETTINGS&amp;utm_campaign=MBF%20Settings" target="_blank" class="button button-primary button-small gmb-settings-header-btn">
98
-				<?php esc_html_e( 'Upgrade to Pro', 'google-maps-builder' ); ?>
98
+				<?php esc_html_e('Upgrade to Pro', 'google-maps-builder'); ?>
99 99
 			</a>
100 100
 		</div>
101 101
 		<?php
@@ -111,11 +111,11 @@  discard block
 block discarded – undo
111 111
 	protected function settings_page_data() {
112 112
 		//place holder
113 113
 		$data = array(
114
-			'welcome'     => sprintf( '%1s Maps Builder %s', __( 'Welcome to', 'maps-builder-pro' ), Google_Maps_Builder()->meta['Version'] ),
114
+			'welcome'     => sprintf('%1s Maps Builder %s', __('Welcome to', 'maps-builder-pro'), Google_Maps_Builder()->meta['Version']),
115 115
 			'sub_heading' => $this->sub_heading()
116 116
 		);
117 117
 
118
-		return $this->view_data( $data, true );
118
+		return $this->view_data($data, true);
119 119
 	}
120 120
 
121 121
 	/**
@@ -126,8 +126,8 @@  discard block
 block discarded – undo
126 126
 	 * @return string
127 127
 	 */
128 128
 	protected function sub_heading() {
129
-		$out = __( 'Thanks for using Maps Builder. ', 'google-maps-pro' );
130
-		$out .= sprintf( __( 'To get started, read over the %1$sdocumentation%2$s, take a gander at the settings, and build yourself some maps! If you enjoy this plugin please consider telling a friend, rating it %3$s5-stars%2$s, or purchasing the %4$sPro%2$s edition.', 'google-maps-builder' ), '<a href="https://wordimpress.com/documentation/maps-builder-pro/" target="_blank">', '</a>', '<a href="https://wordpress.org/support/view/plugin-reviews/google-maps-builder?filter=5#postform" target="_blank">', '<a href="https://wordimpress.com/plugins/maps-builder-pro?utm_source=MBF&amp;utm_medium=BANNER&amp;utm_content=SETTINGS&amp;utm_campaign=MBF%20Settings" target="_blank">' );
129
+		$out = __('Thanks for using Maps Builder. ', 'google-maps-pro');
130
+		$out .= sprintf(__('To get started, read over the %1$sdocumentation%2$s, take a gander at the settings, and build yourself some maps! If you enjoy this plugin please consider telling a friend, rating it %3$s5-stars%2$s, or purchasing the %4$sPro%2$s edition.', 'google-maps-builder'), '<a href="https://wordimpress.com/documentation/maps-builder-pro/" target="_blank">', '</a>', '<a href="https://wordpress.org/support/view/plugin-reviews/google-maps-builder?filter=5#postform" target="_blank">', '<a href="https://wordimpress.com/plugins/maps-builder-pro?utm_source=MBF&amp;utm_medium=BANNER&amp;utm_content=SETTINGS&amp;utm_campaign=MBF%20Settings" target="_blank">');
131 131
 
132 132
 		return $out;
133 133
 
Please login to merge, or discard this patch.
includes/class-gmb-html-elements.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
  */
13 13
 
14 14
 // Exit if accessed directly
15
-if ( ! defined( 'ABSPATH' ) ) {
15
+if ( ! defined('ABSPATH')) {
16 16
 	exit;
17 17
 }
18 18
 
Please login to merge, or discard this patch.
google-maps-builder.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
  */
16 16
 
17 17
 // If this file is called directly, abort.
18
-if ( ! defined( 'ABSPATH' ) ) {
18
+if ( ! defined('ABSPATH')) {
19 19
 	exit;
20 20
 }
21 21
 
@@ -23,34 +23,34 @@  discard block
 block discarded – undo
23 23
  * Define Constants
24 24
  */
25 25
 // Plugin Folder Path
26
-if ( ! defined( 'GMB_PLUGIN_PATH' ) ) {
27
-	define( 'GMB_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
26
+if ( ! defined('GMB_PLUGIN_PATH')) {
27
+	define('GMB_PLUGIN_PATH', plugin_dir_path(__FILE__));
28 28
 }
29 29
 // Plugin Folder URL
30
-if ( ! defined( 'GMB_PLUGIN_URL' ) ) {
31
-	define( 'GMB_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
30
+if ( ! defined('GMB_PLUGIN_URL')) {
31
+	define('GMB_PLUGIN_URL', plugin_dir_url(__FILE__));
32 32
 }
33 33
 // Plugin base
34
-if ( ! defined( 'GMB_PLUGIN_BASE' ) ) {
35
-	define( 'GMB_PLUGIN_BASE', plugin_basename( __FILE__ ) );
34
+if ( ! defined('GMB_PLUGIN_BASE')) {
35
+	define('GMB_PLUGIN_BASE', plugin_basename(__FILE__));
36 36
 }
37 37
 // Plugin version
38
-if ( ! defined( 'GMB_VERSION' ) ) {
39
-	define( 'GMB_VERSION', '2.1.2' );
38
+if ( ! defined('GMB_VERSION')) {
39
+	define('GMB_VERSION', '2.1.2');
40 40
 }
41 41
 // Plugin Root File
42
-if ( ! defined( 'GMB_PLUGIN_FILE' ) ) {
43
-	define( 'GMB_PLUGIN_FILE', __FILE__ );
42
+if ( ! defined('GMB_PLUGIN_FILE')) {
43
+	define('GMB_PLUGIN_FILE', __FILE__);
44 44
 }
45 45
 
46 46
 
47
-if ( ! class_exists( 'Google_Maps_Builder' ) ) :
47
+if ( ! class_exists('Google_Maps_Builder')) :
48 48
 
49 49
 	/**
50 50
 	 * Load plugin if core lib is present
51 51
 	 */
52
-	if ( ! file_exists( GMB_PLUGIN_PATH . 'vendor/wordimpress/maps-builder-core/core.php' ) ) {
53
-		add_action( 'admin_notices', 'gmb_no_core_lib' );
52
+	if ( ! file_exists(GMB_PLUGIN_PATH.'vendor/wordimpress/maps-builder-core/core.php')) {
53
+		add_action('admin_notices', 'gmb_no_core_lib');
54 54
 
55 55
 		/**
56 56
 		 * Print admin notice if no dependencies
@@ -58,10 +58,10 @@  discard block
 block discarded – undo
58 58
 		 * @uses "admin_notice" hook
59 59
 		 */
60 60
 		function gmb_no_core_lib() {
61
-			printf( '<div class="notice notice-error"><p>%s</p></div>', esc_html__( 'Your install of Maps Builder is missing its Composer dependencies and can not load.', 'maps-builder-pro' ) );
61
+			printf('<div class="notice notice-error"><p>%s</p></div>', esc_html__('Your install of Maps Builder is missing its Composer dependencies and can not load.', 'maps-builder-pro'));
62 62
 		}
63 63
 	} else {
64
-		require_once GMB_PLUGIN_PATH . 'vendor/wordimpress/maps-builder-core/core.php';
64
+		require_once GMB_PLUGIN_PATH.'vendor/wordimpress/maps-builder-core/core.php';
65 65
 
66 66
 		/**
67 67
 		 * Main Maps Builder Class
@@ -109,11 +109,11 @@  discard block
 block discarded – undo
109 109
 			 * @return    Google_Maps_Builder
110 110
 			 */
111 111
 			public static function instance() {
112
-				if ( ! isset( self::$instance ) && ! ( self::$instance instanceof Google_Maps_Builder ) ) {
112
+				if ( ! isset(self::$instance) && ! (self::$instance instanceof Google_Maps_Builder)) {
113 113
 
114 114
 					self::$instance = new Google_Maps_Builder();
115 115
 
116
-					add_action( 'plugins_loaded', array( self::$instance, 'load_textdomain' ) );
116
+					add_action('plugins_loaded', array(self::$instance, 'load_textdomain'));
117 117
 
118 118
 					self::$instance->includes();
119 119
 					self::$instance->activate = new Google_Maps_Builder_Activate();
@@ -124,10 +124,10 @@  discard block
 block discarded – undo
124 124
 
125 125
 					// Read plugin meta
126 126
 					// Check that function get_plugin_data exists
127
-					if ( ! function_exists( 'get_plugin_data' ) ) {
128
-						require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
127
+					if ( ! function_exists('get_plugin_data')) {
128
+						require_once(ABSPATH.'wp-admin/includes/plugin.php');
129 129
 					}
130
-					self::$instance->meta = get_plugin_data( GMB_PLUGIN_FILE, false );
130
+					self::$instance->meta = get_plugin_data(GMB_PLUGIN_FILE, false);
131 131
 
132 132
 				}
133 133
 
@@ -148,10 +148,10 @@  discard block
 block discarded – undo
148 148
 
149 149
 				$this->cmb2_load();
150 150
 				$this->load_files();
151
-				require_once GMB_PLUGIN_PATH . 'includes/class-gmb-scripts.php';
152
-				require_once GMB_PLUGIN_PATH . 'includes/class-gmb-html-elements.php';
151
+				require_once GMB_PLUGIN_PATH.'includes/class-gmb-scripts.php';
152
+				require_once GMB_PLUGIN_PATH.'includes/class-gmb-html-elements.php';
153 153
 
154
-				if ( is_admin() || ( defined( 'WP_CLI' ) && WP_CLI ) ) {
154
+				if (is_admin() || (defined('WP_CLI') && WP_CLI)) {
155 155
 
156 156
 					$this->load_admin();
157 157
 					//Admin
Please login to merge, or discard this patch.