Business Profile - Version 1.2.8

Version Description

(2019-12-03) = * Moving screenshots out of main plugin folder and into assets. * Updating plugin icon and banner.

Download this release

Release Info

Developer Rustaurius
Plugin Icon 128x128 Business Profile
Version 1.2.8
Comparing to
See all releases

Code changes from version 1.2.7 to 1.2.8

business-profile.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Five Star Business Profile
4
  * Plugin URI: https://www.fivestarplugins.com/plugins/business-profile/
5
  * Description: Create and display an SEO friendly contact card with schema structured data. Supports a Google Map, opening hours and more.
6
- * Version: 1.2.7
7
  * Author: Five Star Plugins
8
  * Author URI: https://www.fivestarplugins.com
9
  * License: GPLv3
@@ -61,6 +61,29 @@ if ( ! class_exists( 'bpfwpInit', false ) ) :
61
  if ( $this->settings->get_setting( 'multiple-locations' ) ) {
62
  register_activation_hook( __FILE__, array( $this->cpts, 'flush_rewrite_rules' ) );
63
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
  }
65
 
66
  /**
@@ -74,7 +97,7 @@ if ( ! class_exists( 'bpfwpInit', false ) ) :
74
  define( 'BPFWP_PLUGIN_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
75
  define( 'BPFWP_PLUGIN_URL', untrailingslashit( plugin_dir_url( __FILE__ ) ) );
76
  define( 'BPFWP_PLUGIN_FNAME', plugin_basename( __FILE__ ) );
77
- define( 'BPFWP_VERSION', '1.2.6' );
78
  }
79
 
80
  /**
@@ -89,6 +112,9 @@ if ( ! class_exists( 'bpfwpInit', false ) ) :
89
  require_once BPFWP_PLUGIN_DIR . '/includes/class-compatibility.php';
90
  require_once BPFWP_PLUGIN_DIR . '/includes/class-custom-post-types.php';
91
  require_once BPFWP_PLUGIN_DIR . '/includes/deprecated/class-integrations.php';
 
 
 
92
  require_once BPFWP_PLUGIN_DIR . '/includes/class-settings.php';
93
  require_once BPFWP_PLUGIN_DIR . '/includes/class-template-loader.php';
94
  require_once BPFWP_PLUGIN_DIR . '/includes/template-functions.php';
@@ -104,6 +130,8 @@ if ( ! class_exists( 'bpfwpInit', false ) ) :
104
  protected function instantiate() {
105
  new bpfwpCompatibility();
106
  new bpfwpIntegrations(); // Deprecated in v1.1.
 
 
107
  $this->settings = new bpfwpSettings();
108
  $this->cpts = new bpfwpCustomPostTypes();
109
  $this->blocks = new bpfwpBlocks();
@@ -123,6 +151,7 @@ if ( ! class_exists( 'bpfwpInit', false ) ) :
123
  */
124
  protected function wp_hooks() {
125
  add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) );
 
126
  add_action( 'wp_enqueue_scripts', array( $this, 'register_assets' ) );
127
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_assets' ) );
128
  add_action( 'widgets_init', array( $this, 'register_widgets' ) );
@@ -179,6 +208,33 @@ if ( ! class_exists( 'bpfwpInit', false ) ) :
179
  register_widget( 'bpfwpContactCardWidget' );
180
  }
181
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
182
  /**
183
  * Enqueue the admin CSS for locations
184
  *
@@ -191,11 +247,14 @@ if ( ! class_exists( 'bpfwpInit', false ) ) :
191
  public function enqueue_admin_assets( $hook_suffix ) {
192
 
193
  global $post;
 
 
194
 
195
- if ( 'post-new.php' === $hook_suffix || 'post.php' === $hook_suffix ) {
196
- if ( $this->settings->get_setting( 'multiple-locations' ) && $this->cpts->location_cpt_slug === $post->post_type ) {
197
- wp_enqueue_style( 'bpfwp-admin-location', BPFWP_PLUGIN_URL . '/assets/css/admin.css' );
198
- }
 
199
  }
200
  }
201
 
@@ -264,3 +323,4 @@ if ( ! class_exists( 'bpfwpInit', false ) ) :
264
  endif;
265
 
266
  $bpfwp_controller = bpfwpInit::instance();
 
3
  * Plugin Name: Five Star Business Profile
4
  * Plugin URI: https://www.fivestarplugins.com/plugins/business-profile/
5
  * Description: Create and display an SEO friendly contact card with schema structured data. Supports a Google Map, opening hours and more.
6
+ * Version: 1.2.8
7
  * Author: Five Star Plugins
8
  * Author URI: https://www.fivestarplugins.com
9
  * License: GPLv3
61
  if ( $this->settings->get_setting( 'multiple-locations' ) ) {
62
  register_activation_hook( __FILE__, array( $this->cpts, 'flush_rewrite_rules' ) );
63
  }
64
+
65
+ // Add the admin menu
66
+ add_action( 'admin_menu', array( $this, 'add_menu_page' ) );
67
+
68
+ // Load plugin dashboard
69
+ require_once( BPFWP_PLUGIN_DIR . '/includes/class-dashboard.php' );
70
+ new bpfwpDashboard();
71
+
72
+ // Load permissions and handle combination
73
+ require_once( BPFWP_PLUGIN_DIR . '/includes/class-permissions.php' );
74
+ $this->permissions = new bpfwpPermissions();
75
+
76
+ }
77
+
78
+ public function add_menu_page() {
79
+ add_menu_page(
80
+ __( 'Business Profile', 'business-profile' ),
81
+ __( 'Business Profile', 'business-profile' ),
82
+ 'manage_options',
83
+ 'bpfwp-business-profile',
84
+ '',
85
+ 'dashicons-businessperson'
86
+ );
87
  }
88
 
89
  /**
97
  define( 'BPFWP_PLUGIN_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
98
  define( 'BPFWP_PLUGIN_URL', untrailingslashit( plugin_dir_url( __FILE__ ) ) );
99
  define( 'BPFWP_PLUGIN_FNAME', plugin_basename( __FILE__ ) );
100
+ define( 'BPFWP_VERSION', '1.2.7' );
101
  }
102
 
103
  /**
112
  require_once BPFWP_PLUGIN_DIR . '/includes/class-compatibility.php';
113
  require_once BPFWP_PLUGIN_DIR . '/includes/class-custom-post-types.php';
114
  require_once BPFWP_PLUGIN_DIR . '/includes/deprecated/class-integrations.php';
115
+ //require_once BPFWP_PLUGIN_DIR . '/includes/class-permissions.php';
116
+ require_once BPFWP_PLUGIN_DIR . '/includes/class-schemas-manager.php';
117
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema.php';
118
  require_once BPFWP_PLUGIN_DIR . '/includes/class-settings.php';
119
  require_once BPFWP_PLUGIN_DIR . '/includes/class-template-loader.php';
120
  require_once BPFWP_PLUGIN_DIR . '/includes/template-functions.php';
130
  protected function instantiate() {
131
  new bpfwpCompatibility();
132
  new bpfwpIntegrations(); // Deprecated in v1.1.
133
+ //$this->permissions = new bpfwpPermissions();
134
+ $this->schemas = new bpfwpSchemasManager();
135
  $this->settings = new bpfwpSettings();
136
  $this->cpts = new bpfwpCustomPostTypes();
137
  $this->blocks = new bpfwpBlocks();
151
  */
152
  protected function wp_hooks() {
153
  add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) );
154
+ add_action( 'admin_notices', array( $this, 'display_header_area') );
155
  add_action( 'wp_enqueue_scripts', array( $this, 'register_assets' ) );
156
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_assets' ) );
157
  add_action( 'widgets_init', array( $this, 'register_widgets' ) );
208
  register_widget( 'bpfwpContactCardWidget' );
209
  }
210
 
211
+ public function display_header_area() {
212
+ global $bpfwp_controller, $post;
213
+
214
+ $screen = get_current_screen();
215
+ $screenID = $screen->id;
216
+ $screenPostType = $screen->post_type;
217
+ $settings = get_option( 'bpfwp-settings' );
218
+
219
+ if ( $screenID != 'business-profile_page_bpfwp-settings' && $screenID != 'business-profile_page_bpfwp-dashboard' && $screenPostType != 'location' && $screenPostType != 'schema' ) {return;}
220
+
221
+ if ( ! $bpfwp_controller->permissions->check_permission( 'styling' ) || get_option("BPFWP_Trial_Happening") == "Yes" ) {
222
+ echo "<a href='https://www.fivestarplugins.com/license-payment/?Selected=BPFWP&Quantity=1' class='bpfwp-temp-upgrade-banner' target='_blank'>Upgrade to the Premium Version!</a>";
223
+ }
224
+
225
+ ?>
226
+ <div class="bpfwp-admin-header-menu">
227
+ <h2 class="nav-tab-wrapper">
228
+ <a id="bpfwp-dash-mobile-menu-open" href="#" class="menu-tab nav-tab"><?php _e("MENU", 'business-profile'); ?><span id="bpfwp-dash-mobile-menu-down-caret">&nbsp;&nbsp;&#9660;</span><span id="bpfwp-dash-mobile-menu-up-caret">&nbsp;&nbsp;&#9650;</span></a>
229
+ <a id="dashboard-menu" href='admin.php?page=bpfwp-dashboard' class="menu-tab nav-tab <?php if ($screenID == 'profile_page_bpfwp-dashboard') {echo 'nav-tab-active';}?>"><?php _e("Dashboard", 'business-profile'); ?></a>
230
+ <?php if($settings['multiple-locations'] == 1){ ?><a id="locations-menu" href='edit.php?post_type=location' class="menu-tab nav-tab <?php if ($screenID == 'post-type-location') {echo 'nav-tab-active';}?>"><?php _e("Locations", 'business-profile'); ?></a><?php } ?>
231
+ <a id="schemas-menu" href='edit.php?post_type=schema' class="menu-tab nav-tab <?php if ($screenID == 'post-type-schema') {echo 'nav-tab-active';}?>"><?php _e("Schemas", 'business-profile'); ?></a>
232
+ <a id="options-menu" href='admin.php?page=bpfwp-settings' class="menu-tab nav-tab <?php if ($screenID == 'profile_page_bpfwp-settings') {echo 'nav-tab-active';}?>"><?php _e("Settings", 'business-profile'); ?></a>
233
+ </h2>
234
+ </div>
235
+ <?php
236
+ }
237
+
238
  /**
239
  * Enqueue the admin CSS for locations
240
  *
247
  public function enqueue_admin_assets( $hook_suffix ) {
248
 
249
  global $post;
250
+ $screen = get_current_screen();
251
+ $screenPostType = $screen->post_type;
252
 
253
+ if ( ('post-new.php' === $hook_suffix || 'post.php' === $hook_suffix) || $screenPostType == 'location' || $screenPostType == 'schema' ) {
254
+ //if ( $this->settings->get_setting( 'multiple-locations' ) && $this->cpts->location_cpt_slug === $post->post_type ) {
255
+ wp_enqueue_style( 'bpfwp-admin-location', BPFWP_PLUGIN_URL . '/assets/css/admin.css', array(), BPFWP_VERSION );
256
+ wp_enqueue_script( 'bpfwp-admin-js', BPFWP_PLUGIN_URL . '/assets/js/admin.js', array( 'jquery' ), BPFWP_VERSION, true );
257
+ //}
258
  }
259
  }
260
 
323
  endif;
324
 
325
  $bpfwp_controller = bpfwpInit::instance();
326
+
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
- === Business Profile ===
2
  Contributors: FiveStarPlugins
3
  Author URI: https://www.fivestarplugins.com/
4
  Plugin URL: https://www.fivestarplugins.com/plugins/business-profile/
5
  Requires at Least: 4.4
6
- Tested Up To: 5.2
7
  Tags: business profile, seo, local seo, schema, address, google map, contact, phone, contact card, vcard, contact info, business location, business address, business map, business schema, organization schema, corporation schema, contact schema, address schema, location schema, map schema, business structured data, business microdata, address microdata, location structured data, location microdata, contact shortcode, location shortcode, address shortcode, schema shortcode, gutenberg schema, gutenberg address
8
  License: GPLv3
9
  License URI:http://www.gnu.org/licenses/gpl-3.0.html
@@ -149,6 +149,10 @@ You'll find more help in the [User Guide](http://doc.themeofthecrop.com/plugins/
149
 
150
  == Changelog ==
151
 
 
 
 
 
152
  = 1.2.7 (2019-10-29) =
153
  * Name change and new icon
154
 
1
+ === Five Star Business Profile ===
2
  Contributors: FiveStarPlugins
3
  Author URI: https://www.fivestarplugins.com/
4
  Plugin URL: https://www.fivestarplugins.com/plugins/business-profile/
5
  Requires at Least: 4.4
6
+ Tested Up To: 5.3
7
  Tags: business profile, seo, local seo, schema, address, google map, contact, phone, contact card, vcard, contact info, business location, business address, business map, business schema, organization schema, corporation schema, contact schema, address schema, location schema, map schema, business structured data, business microdata, address microdata, location structured data, location microdata, contact shortcode, location shortcode, address shortcode, schema shortcode, gutenberg schema, gutenberg address
8
  License: GPLv3
9
  License URI:http://www.gnu.org/licenses/gpl-3.0.html
149
 
150
  == Changelog ==
151
 
152
+ = 1.2.8 (2019-12-03) =
153
+ * Moving screenshots out of main plugin folder and into assets.
154
+ * Updating plugin icon and banner.
155
+
156
  = 1.2.7 (2019-10-29) =
157
  * Name change and new icon
158
 
screenshot-1.png DELETED
Binary file
screenshot-2.png DELETED
Binary file
screenshot-3.png DELETED
Binary file
screenshot-4.png DELETED
Binary file
screenshot-5.png DELETED
Binary file