Version Description
(2022-02-16) = - Changed how premium settings areas are previewed. - Removed unused packaging files.
Download this release
Release Info
Developer | Rustaurius |
Plugin | Business Profile |
Version | 2.2.0 |
Comparing to | |
See all releases |
Code changes from version 2.1.10 to 2.2.0
- Gruntfile.js +0 -72
- assets/.esformatter +0 -14
- assets/.jscsrc +0 -165
- assets/.jshintrc +0 -25
- assets/css/admin.css +50 -0
- assets/img/premium-screenshots/premium.png +0 -0
- assets/js/admin.js +7 -0
- business-profile.php +16 -5
- includes/class-settings.php +82 -110
- package.json +0 -26
- readme.txt +6 -2
- webpack.config.js +0 -31
Gruntfile.js
DELETED
@@ -1,72 +0,0 @@
|
|
1 |
-
'use strict';
|
2 |
-
|
3 |
-
module.exports = function(grunt) {
|
4 |
-
|
5 |
-
// Project configuration.
|
6 |
-
grunt.initConfig({
|
7 |
-
|
8 |
-
// Load grunt project configuration
|
9 |
-
pkg: grunt.file.readJSON('package.json'),
|
10 |
-
|
11 |
-
// Configure JSHint
|
12 |
-
jshint: {
|
13 |
-
test: {
|
14 |
-
src: 'assets/js/**/*.js'
|
15 |
-
}
|
16 |
-
},
|
17 |
-
|
18 |
-
// Watch for changes on some files and auto-compile them
|
19 |
-
watch: {
|
20 |
-
js: {
|
21 |
-
files: ['assets/js/**/*.js'],
|
22 |
-
tasks: ['jshint']
|
23 |
-
},
|
24 |
-
},
|
25 |
-
|
26 |
-
// Create a .pot file
|
27 |
-
makepot: {
|
28 |
-
target: {
|
29 |
-
options: {
|
30 |
-
domainPath: 'languages',
|
31 |
-
processPot: function( pot, options ) {
|
32 |
-
pot.headers['report-msgid-bugs-to'] = 'https://themeofthecrop.com';
|
33 |
-
return pot;
|
34 |
-
},
|
35 |
-
type: 'wp-plugin',
|
36 |
-
}
|
37 |
-
}
|
38 |
-
},
|
39 |
-
|
40 |
-
// Build a package for distribution
|
41 |
-
compress: {
|
42 |
-
main: {
|
43 |
-
options: {
|
44 |
-
archive: 'business-profile-<%= pkg.version %>.zip'
|
45 |
-
},
|
46 |
-
files: [
|
47 |
-
{
|
48 |
-
src: [
|
49 |
-
'*', '**/*',
|
50 |
-
'!business-profile-<%= pkg.version %>.zip',
|
51 |
-
'!.*', '!Gruntfile.js', '!package.json', '!node_modules', '!node_modules/**/*',
|
52 |
-
'!**/.*', '!**/Gruntfile.js', '!**/package.json', '!**/node_modules', '!**/node_modules/**/*',
|
53 |
-
],
|
54 |
-
dest: 'business-profile/',
|
55 |
-
}
|
56 |
-
]
|
57 |
-
}
|
58 |
-
}
|
59 |
-
|
60 |
-
});
|
61 |
-
|
62 |
-
// Load tasks
|
63 |
-
grunt.loadNpmTasks('grunt-contrib-compress');
|
64 |
-
grunt.loadNpmTasks('grunt-contrib-jshint');
|
65 |
-
grunt.loadNpmTasks('grunt-contrib-watch');
|
66 |
-
grunt.loadNpmTasks('grunt-wp-i18n');
|
67 |
-
|
68 |
-
// Default task(s).
|
69 |
-
grunt.registerTask('default', ['watch']);
|
70 |
-
grunt.registerTask('package', ['makepot', 'compress']);
|
71 |
-
|
72 |
-
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/.esformatter
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"plugins": [
|
3 |
-
"esformatter-wordpress"
|
4 |
-
],
|
5 |
-
"whiteSpace": {
|
6 |
-
"before": {
|
7 |
-
"AssignmentOperator": -1,
|
8 |
-
"PropertyValue": -1
|
9 |
-
},
|
10 |
-
"after": {
|
11 |
-
"VariableName": -1
|
12 |
-
}
|
13 |
-
}
|
14 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/.jscsrc
DELETED
@@ -1,165 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"requireSpacesInConditionalExpression": {
|
3 |
-
"afterTest": true,
|
4 |
-
"beforeConsequent": true,
|
5 |
-
"afterConsequent": true,
|
6 |
-
"beforeAlternate": true
|
7 |
-
},
|
8 |
-
"requireSpacesInFunction": {
|
9 |
-
"beforeOpeningCurlyBrace": true
|
10 |
-
},
|
11 |
-
"disallowSpacesInAnonymousFunctionExpression": {
|
12 |
-
"beforeOpeningRoundBrace": true
|
13 |
-
},
|
14 |
-
"requireMultipleVarDecl": "onevar",
|
15 |
-
"requireSpacesInsideObjectBrackets": "all",
|
16 |
-
"disallowSpaceAfterObjectKeys": true,
|
17 |
-
"requireSpaceAfterBinaryOperators": [
|
18 |
-
"=", "+=", "-=", "*=", "/=", "%=", "<<=", ">>=", ">>>=",
|
19 |
-
"&=", "|=", "^=", "+=",
|
20 |
-
|
21 |
-
"+", "-", "*", "/", "%", "<<", ">>", ">>>", "&",
|
22 |
-
"|", "^", "&&", "||", "===", "==", ">=",
|
23 |
-
"<=", "<", ">", "!=", "!=="
|
24 |
-
],
|
25 |
-
"requireSpaceBeforeBinaryOperators": [
|
26 |
-
"=", "+=", "-=", "*=", "/=", "%=", "<<=", ">>=", ">>>=",
|
27 |
-
"&=", "|=", "^=", "+=",
|
28 |
-
|
29 |
-
"+", "-", "*", "/", "%", "<<", ">>", ">>>", "&",
|
30 |
-
"|", "^", "&&", "||", "===", "==", ">=",
|
31 |
-
"<=", "<", ">", "!=", "!=="
|
32 |
-
],
|
33 |
-
"disallowKeywords": ["with"],
|
34 |
-
"disallowMultipleLineBreaks": true,
|
35 |
-
"validateLineBreaks": "LF",
|
36 |
-
"disallowMixedSpacesAndTabs": "smart",
|
37 |
-
"disallowTrailingWhitespace": true,
|
38 |
-
"requireCurlyBraces": [
|
39 |
-
"if",
|
40 |
-
"else",
|
41 |
-
"for",
|
42 |
-
"while",
|
43 |
-
"do",
|
44 |
-
"try",
|
45 |
-
"catch"
|
46 |
-
],
|
47 |
-
"requireSpaceBeforeBlockStatements": true,
|
48 |
-
"requireParenthesesAroundIIFE": true,
|
49 |
-
"requireBlocksOnNewline": true,
|
50 |
-
"requireOperatorBeforeLineBreak": [
|
51 |
-
"?",
|
52 |
-
"=",
|
53 |
-
"+",
|
54 |
-
"-",
|
55 |
-
"/",
|
56 |
-
"*",
|
57 |
-
"==",
|
58 |
-
"===",
|
59 |
-
"!=",
|
60 |
-
"!==",
|
61 |
-
">",
|
62 |
-
">=",
|
63 |
-
"<",
|
64 |
-
"<="
|
65 |
-
],
|
66 |
-
"requireSpaceBeforeBinaryOperators": [
|
67 |
-
"?",
|
68 |
-
"=",
|
69 |
-
"+",
|
70 |
-
"-",
|
71 |
-
"/",
|
72 |
-
"*",
|
73 |
-
"==",
|
74 |
-
"===",
|
75 |
-
"!=",
|
76 |
-
"!==",
|
77 |
-
">",
|
78 |
-
">=",
|
79 |
-
"<",
|
80 |
-
"<="
|
81 |
-
],
|
82 |
-
"requireSpaceAfterBinaryOperators": [
|
83 |
-
"?",
|
84 |
-
"=",
|
85 |
-
"+",
|
86 |
-
"/",
|
87 |
-
"*",
|
88 |
-
":",
|
89 |
-
"==",
|
90 |
-
"===",
|
91 |
-
"!=",
|
92 |
-
"!==",
|
93 |
-
">",
|
94 |
-
">=",
|
95 |
-
"<",
|
96 |
-
"<="
|
97 |
-
],
|
98 |
-
"disallowSpaceBeforeBinaryOperators": [","],
|
99 |
-
"disallowSpaceAfterBinaryOperators": [],
|
100 |
-
"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~"],
|
101 |
-
"requireSpaceAfterPrefixUnaryOperators": ["!"],
|
102 |
-
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
|
103 |
-
"requireCamelCaseOrUpperCaseIdentifiers": true,
|
104 |
-
"disallowMultipleLineStrings": true,
|
105 |
-
"validateQuoteMarks": "'",
|
106 |
-
"validateIndentation": "\t",
|
107 |
-
"requireLineFeedAtFileEnd": true,
|
108 |
-
"requireDotNotation": true,
|
109 |
-
"disallowNewlineBeforeBlockStatements": true,
|
110 |
-
"requireSpaceAfterKeywords": [
|
111 |
-
"do",
|
112 |
-
"for",
|
113 |
-
"if",
|
114 |
-
"else",
|
115 |
-
"switch",
|
116 |
-
"case",
|
117 |
-
"try",
|
118 |
-
"catch",
|
119 |
-
"void",
|
120 |
-
"while",
|
121 |
-
"with",
|
122 |
-
"return",
|
123 |
-
"typeof"
|
124 |
-
],
|
125 |
-
"requireSpaceAfterLineComment": true,
|
126 |
-
"requireSpaceBeforeKeywords": [
|
127 |
-
"else",
|
128 |
-
"while",
|
129 |
-
"catch"
|
130 |
-
],
|
131 |
-
"requireSpaceBeforeObjectValues": true,
|
132 |
-
"requireSpaceBetweenArguments": true,
|
133 |
-
"requireSpacesInAnonymousFunctionExpression": {
|
134 |
-
"beforeOpeningCurlyBrace": true
|
135 |
-
},
|
136 |
-
"requireSpacesInForStatement": true,
|
137 |
-
"requireSpacesInsideArrayBrackets": "all",
|
138 |
-
"requireSpacesInsideParentheses": {
|
139 |
-
"all": true,
|
140 |
-
"except": [
|
141 |
-
"{",
|
142 |
-
"}",
|
143 |
-
"[",
|
144 |
-
"]",
|
145 |
-
"function"
|
146 |
-
]
|
147 |
-
},
|
148 |
-
"requireYodaConditions": true,
|
149 |
-
"validateParameterSeparator": ", ",
|
150 |
-
|
151 |
-
"disallowTrailingComma": true,
|
152 |
-
"disallowPaddingNewlinesInBlocks": true,
|
153 |
-
"disallowEmptyBlocks": true,
|
154 |
-
"disallowQuotedKeysInObjects": "allButReserved",
|
155 |
-
"disallowDanglingUnderscores": true,
|
156 |
-
"requireCommaBeforeLineBreak": true,
|
157 |
-
"disallowKeywordsOnNewLine": ["else"],
|
158 |
-
"requireCapitalizedConstructors": true,
|
159 |
-
"safeContextKeyword": [ "that" ],
|
160 |
-
"jsDoc": {
|
161 |
-
"checkParamNames": true,
|
162 |
-
"checkRedundantParams": true,
|
163 |
-
"requireParamTypes": true
|
164 |
-
}
|
165 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/.jshintrc
DELETED
@@ -1,25 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"boss": true,
|
3 |
-
"curly": true,
|
4 |
-
"eqeqeq": true,
|
5 |
-
"eqnull": true,
|
6 |
-
"es3": true,
|
7 |
-
"expr": true,
|
8 |
-
"immed": true,
|
9 |
-
"noarg": true,
|
10 |
-
"onevar": true,
|
11 |
-
"quotmark": "single",
|
12 |
-
"trailing": true,
|
13 |
-
"undef": true,
|
14 |
-
"unused": true,
|
15 |
-
|
16 |
-
"browser": true,
|
17 |
-
|
18 |
-
"globals": {
|
19 |
-
"_": false,
|
20 |
-
"Backbone": false,
|
21 |
-
"jQuery": false,
|
22 |
-
"JSON": false,
|
23 |
-
"wp": false
|
24 |
-
}
|
25 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/css/admin.css
CHANGED
@@ -1866,3 +1866,53 @@ NEW
|
|
1866 |
vertical-align: text-bottom;
|
1867 |
min-width: none;
|
1868 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1866 |
vertical-align: text-bottom;
|
1867 |
min-width: none;
|
1868 |
}
|
1869 |
+
|
1870 |
+
/*************************
|
1871 |
+
SETTINGS PREVIEW SCREENS
|
1872 |
+
*************************/
|
1873 |
+
.bpfwp-settings-preview h2 {
|
1874 |
+
font-size: 24px !important;
|
1875 |
+
}
|
1876 |
+
.bpfwp-settings-preview h2 span {
|
1877 |
+
position: absolute;
|
1878 |
+
margin-left: 16px;
|
1879 |
+
font-size: .45em;
|
1880 |
+
color: #fff;
|
1881 |
+
background: #aaa;
|
1882 |
+
border-radius: 50px;
|
1883 |
+
padding: 2px 8px;
|
1884 |
+
text-transform: uppercase;
|
1885 |
+
}
|
1886 |
+
|
1887 |
+
.bpfwp-settings-preview-images {
|
1888 |
+
position: relative;
|
1889 |
+
float: left;
|
1890 |
+
width: 100%;
|
1891 |
+
margin: 36px 0 48px;
|
1892 |
+
}
|
1893 |
+
.bpfwp-settings-preview img {
|
1894 |
+
position: relative;
|
1895 |
+
float: left;
|
1896 |
+
box-sizing: border-box;
|
1897 |
+
width: 35%;
|
1898 |
+
height: auto;
|
1899 |
+
border: 8px solid #ddd;
|
1900 |
+
margin-right: 40px;
|
1901 |
+
}
|
1902 |
+
|
1903 |
+
.bpfwp-settings-preview .bpfwp-dashboard-new-footer-one-benefits {
|
1904 |
+
margin-top: 24px;
|
1905 |
+
}
|
1906 |
+
|
1907 |
+
.bpfwp-settings-preview .bpfwp-dashboard-new-footer-one-buttons {
|
1908 |
+
float: left;
|
1909 |
+
margin-top: 32px;
|
1910 |
+
}
|
1911 |
+
|
1912 |
+
@media screen and (max-width: 568px) {
|
1913 |
+
.bpfwp-settings-preview img {
|
1914 |
+
width: 100%;
|
1915 |
+
margin-right: 0;
|
1916 |
+
margin-top: 12px;
|
1917 |
+
}
|
1918 |
+
}
|
assets/img/premium-screenshots/premium.png
ADDED
Binary file
|
assets/js/admin.js
CHANGED
@@ -66,3 +66,10 @@ jQuery(document).ready(function($){
|
|
66 |
}
|
67 |
});
|
68 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
}
|
67 |
});
|
68 |
});
|
69 |
+
|
70 |
+
//SETTINGS PREVIEW SCREENS
|
71 |
+
|
72 |
+
jQuery( document ).ready( function() {
|
73 |
+
|
74 |
+
jQuery( '.bpfwp-settings-preview' ).prev( 'h2' ).hide();
|
75 |
+
});
|
business-profile.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Five Star Business Profile and Schema
|
4 |
* Plugin URI: https://www.fivestarplugins.com/plugins/business-profile/
|
5 |
* Description: Add schema structured data to any page or post type. Create an SEO friendly contact card with your business info and associated schema. Supports Google Map, opening hours and more.
|
6 |
-
* Version: 2.
|
7 |
* Author: Five Star Plugins
|
8 |
* Author URI: https://www.fivestarplugins.com
|
9 |
* License: GPLv3
|
@@ -123,7 +123,7 @@ if ( ! class_exists( 'bpfwpInit', false ) ) :
|
|
123 |
define( 'BPFWP_PLUGIN_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
|
124 |
define( 'BPFWP_PLUGIN_URL', untrailingslashit( plugin_dir_url( __FILE__ ) ) );
|
125 |
define( 'BPFWP_PLUGIN_FNAME', plugin_basename( __FILE__ ) );
|
126 |
-
define( 'BPFWP_VERSION', '2.
|
127 |
}
|
128 |
|
129 |
/**
|
@@ -184,6 +184,7 @@ if ( ! class_exists( 'bpfwpInit', false ) ) :
|
|
184 |
* @return void
|
185 |
*/
|
186 |
protected function wp_hooks() {
|
|
|
187 |
add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) );
|
188 |
add_action( 'admin_notices', array( $this, 'display_header_area') );
|
189 |
add_action( 'admin_notices', array( $this, 'maybe_display_helper_notice' ) );
|
@@ -196,6 +197,18 @@ if ( ! class_exists( 'bpfwpInit', false ) ) :
|
|
196 |
add_action( 'wp_ajax_bpfwp_hide_helper_notice', array( $this, 'hide_helper_notice' ) );
|
197 |
}
|
198 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
199 |
/**
|
200 |
* Load the plugin textdomain for localistion.
|
201 |
*
|
@@ -459,6 +472,4 @@ if ( ! class_exists( 'bpfwpInit', false ) ) :
|
|
459 |
}
|
460 |
endif;
|
461 |
|
462 |
-
$bpfwp_controller = bpfwpInit::instance();
|
463 |
-
|
464 |
-
do_action( 'bpfwp_initialized' );
|
3 |
* Plugin Name: Five Star Business Profile and Schema
|
4 |
* Plugin URI: https://www.fivestarplugins.com/plugins/business-profile/
|
5 |
* Description: Add schema structured data to any page or post type. Create an SEO friendly contact card with your business info and associated schema. Supports Google Map, opening hours and more.
|
6 |
+
* Version: 2.2.0
|
7 |
* Author: Five Star Plugins
|
8 |
* Author URI: https://www.fivestarplugins.com
|
9 |
* License: GPLv3
|
123 |
define( 'BPFWP_PLUGIN_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
|
124 |
define( 'BPFWP_PLUGIN_URL', untrailingslashit( plugin_dir_url( __FILE__ ) ) );
|
125 |
define( 'BPFWP_PLUGIN_FNAME', plugin_basename( __FILE__ ) );
|
126 |
+
define( 'BPFWP_VERSION', '2.2.0' );
|
127 |
}
|
128 |
|
129 |
/**
|
184 |
* @return void
|
185 |
*/
|
186 |
protected function wp_hooks() {
|
187 |
+
add_action( 'plugins_loaded', array( $this, 'plugin_loaded_action_hook' ) );
|
188 |
add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) );
|
189 |
add_action( 'admin_notices', array( $this, 'display_header_area') );
|
190 |
add_action( 'admin_notices', array( $this, 'maybe_display_helper_notice' ) );
|
197 |
add_action( 'wp_ajax_bpfwp_hide_helper_notice', array( $this, 'hide_helper_notice' ) );
|
198 |
}
|
199 |
|
200 |
+
/**
|
201 |
+
* Allow third-party plugins to interact with the plugin, if necessary
|
202 |
+
*
|
203 |
+
* @since 2.2.0
|
204 |
+
* @access public
|
205 |
+
* @return void
|
206 |
+
*/
|
207 |
+
public function plugin_loaded_action_hook() {
|
208 |
+
|
209 |
+
do_action( 'bpfwp_initialized' );
|
210 |
+
}
|
211 |
+
|
212 |
/**
|
213 |
* Load the plugin textdomain for localistion.
|
214 |
*
|
472 |
}
|
473 |
endif;
|
474 |
|
475 |
+
$bpfwp_controller = bpfwpInit::instance();
|
|
|
|
includes/class-settings.php
CHANGED
@@ -77,7 +77,7 @@ if ( ! class_exists( 'bpfwpSettings' ) ) :
|
|
77 |
'name' => get_bloginfo( 'name' ),
|
78 |
);
|
79 |
|
80 |
-
$this->defaults = apply_filters( 'bpfwp_defaults', $this->defaults );
|
81 |
}
|
82 |
|
83 |
/**
|
@@ -682,120 +682,92 @@ if ( ! class_exists( 'bpfwpSettings' ) ) :
|
|
682 |
// )
|
683 |
// );
|
684 |
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
'disabled' => true,
|
706 |
-
'disabled_image'=> '#',
|
707 |
-
'purchase_link' => 'https://www.fivestarplugins.com/plugins/business-profile/'
|
708 |
-
);
|
709 |
-
}
|
710 |
-
else { $locations_permissions = array(); }
|
711 |
-
|
712 |
-
$sap->add_section(
|
713 |
-
'bpfwp-settings',
|
714 |
-
array(
|
715 |
-
'id' => 'bpfwp-premium',
|
716 |
-
'title' => __( 'Premium', 'business-profile' ),
|
717 |
-
'is_tab' => true,
|
718 |
-
)
|
719 |
-
);
|
720 |
-
|
721 |
-
$sap->add_section(
|
722 |
-
'bpfwp-settings',
|
723 |
-
array_merge(
|
724 |
-
array(
|
725 |
-
'id' => 'bpfwp-premium-general',
|
726 |
-
'title' => __( 'General', 'business-profile' ),
|
727 |
-
'tab' => 'bpfwp-premium'
|
728 |
-
),
|
729 |
-
$premium_permissions
|
730 |
-
)
|
731 |
-
);
|
732 |
-
|
733 |
-
$sap->add_setting(
|
734 |
-
'bpfwp-settings',
|
735 |
-
'bpfwp-premium-general',
|
736 |
-
'toggle',
|
737 |
-
array(
|
738 |
-
'id' => 'article-rich-snippets',
|
739 |
-
'title' => __( 'Post Rich Snippets', 'business-profile' ),
|
740 |
-
'description' => __( 'Automatically enable article \'Rich Snippets\' for Google for all regular posts on the site.', 'business-profile' ),
|
741 |
-
'args' => array(
|
742 |
-
'label_for' => 'bpfwp-settings[article-rich-snippets]',
|
743 |
-
'class' => 'bpfwp-article-rich-snippets'
|
744 |
-
)
|
745 |
-
|
746 |
-
)
|
747 |
-
);
|
748 |
-
|
749 |
-
$sap->add_setting(
|
750 |
-
'bpfwp-settings',
|
751 |
-
'bpfwp-premium-general',
|
752 |
-
'toggle',
|
753 |
-
array(
|
754 |
-
'id' => 'schema-default-helpers',
|
755 |
-
'title' => __( 'Schema Default Helpers', 'business-profile' ),
|
756 |
-
'description' => __( 'Adds a helper pop-up that can be accessed on click on the Schema edit screen that list the available default options, functions and metas', 'business-profile' ),
|
757 |
-
'args' => array(
|
758 |
-
'label_for' => 'bpfwp-settings[schema-default-helpers]',
|
759 |
-
'class' => 'bpfwp-schema-default-helpers'
|
760 |
-
)
|
761 |
-
|
762 |
-
)
|
763 |
-
);
|
764 |
-
|
765 |
-
$sap->add_section(
|
766 |
-
'bpfwp-settings',
|
767 |
-
array_merge(
|
768 |
-
array(
|
769 |
-
'id' => 'bpfwp-integrations',
|
770 |
-
'title' => __( 'Plugin Integrations', 'business-profile' ),
|
771 |
-
'tab' => 'bpfwp-premium'
|
772 |
-
),
|
773 |
-
$integrations_permissions
|
774 |
-
)
|
775 |
-
);
|
776 |
-
|
777 |
-
$sap->add_setting(
|
778 |
-
'bpfwp-settings',
|
779 |
-
'bpfwp-integrations',
|
780 |
-
'toggle',
|
781 |
-
array(
|
782 |
-
'id' => 'woocommerce-integration',
|
783 |
-
'title' => __( 'WooCommerce Integration', 'business-profile' ),
|
784 |
-
'description' => __( 'Automatically enable product \'Rich Snippets\' for Google.', 'business-profile' ),
|
785 |
-
'args' => array(
|
786 |
-
'label_for' => 'bpfwp-settings[woocommerce-integration]',
|
787 |
-
'class' => 'bpfwp-woocommerce-integration'
|
788 |
-
)
|
789 |
-
|
790 |
-
)
|
791 |
-
);
|
792 |
-
|
793 |
-
$sap = apply_filters( 'bpfwp_settings_page', $sap );
|
794 |
|
795 |
$sap->add_admin_menus();
|
796 |
|
797 |
}
|
798 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
799 |
/**
|
800 |
* Sort the schedule exceptions and remove past exceptions before saving
|
801 |
*
|
77 |
'name' => get_bloginfo( 'name' ),
|
78 |
);
|
79 |
|
80 |
+
$this->defaults = apply_filters( 'bpfwp_defaults', $this->defaults, $this );
|
81 |
}
|
82 |
|
83 |
/**
|
682 |
// )
|
683 |
// );
|
684 |
|
685 |
+
// "Premium" Tab
|
686 |
+
$sap->add_section(
|
687 |
+
'bpfwp-settings',
|
688 |
+
array(
|
689 |
+
'id' => 'bpfwp-premium-tab',
|
690 |
+
'title' => __( 'Premium', 'business-profile' ),
|
691 |
+
'is_tab' => true,
|
692 |
+
'show_submit_button' => $this->show_submit_button( 'premium' )
|
693 |
+
)
|
694 |
+
);
|
695 |
+
$sap->add_section(
|
696 |
+
'bpfwp-settings',
|
697 |
+
array(
|
698 |
+
'id' => 'bpfwp-premium-tab-body',
|
699 |
+
'tab' => 'bpfwp-premium-tab',
|
700 |
+
'callback' => $this->premium_info( 'premium' )
|
701 |
+
)
|
702 |
+
);
|
703 |
+
|
704 |
+
$sap = apply_filters( 'bpfwp_settings_page', $sap, $this );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
705 |
|
706 |
$sap->add_admin_menus();
|
707 |
|
708 |
}
|
709 |
|
710 |
+
public function show_submit_button( $permission_type = '' ) {
|
711 |
+
global $bpfwp_controller;
|
712 |
+
|
713 |
+
if ( $bpfwp_controller->permissions->check_permission( $permission_type ) ) {
|
714 |
+
return true;
|
715 |
+
}
|
716 |
+
|
717 |
+
return false;
|
718 |
+
}
|
719 |
+
|
720 |
+
public function premium_info( $section_and_perm_type ) {
|
721 |
+
global $bpfwp_controller;
|
722 |
+
|
723 |
+
$is_premium_user = $bpfwp_controller->permissions->check_permission( $section_and_perm_type );
|
724 |
+
$is_helper_installed = defined( 'FSPPH_PLUGIN_FNAME' ) && is_plugin_active( FSPPH_PLUGIN_FNAME );
|
725 |
+
|
726 |
+
if ( $is_premium_user || $is_helper_installed ) {
|
727 |
+
return false;
|
728 |
+
}
|
729 |
+
|
730 |
+
$content = '';
|
731 |
+
|
732 |
+
$premium_features = '
|
733 |
+
<p><strong>' . __( 'The premium version also gives you access to the following features:', 'business-profile' ) . '</strong></p>
|
734 |
+
<ul class="bpfwp-dashboard-new-footer-one-benefits">
|
735 |
+
<li>' . __( 'WooCommerce Integration', 'business-profile' ) . '</li>
|
736 |
+
<li>' . __( 'Full Product Schema Automatically Applied', 'business-profile' ) . '</li>
|
737 |
+
<li>' . __( 'Automatically-integrated schema for posts', 'business-profile' ) . '</li>
|
738 |
+
<li>' . __( 'Default Schema Helpers', 'business-profile' ) . '</li>
|
739 |
+
<li>' . __( 'Quickly add schema for any page/element using our custom list of defaults', 'business-profile' ) . '</li>
|
740 |
+
<li>' . __( 'Email Support', 'business-profile' ) . '</li>
|
741 |
+
</ul>
|
742 |
+
<div class="bpfwp-dashboard-new-footer-one-buttons">
|
743 |
+
<a class="bpfwp-dashboard-new-upgrade-button" href="https://www.fivestarplugins.com/license-payment/?Selected=BPFWP&Quantity=1" target="_blank">' . __( 'UPGRADE NOW', 'business-profile' ) . '</a>
|
744 |
+
</div>
|
745 |
+
';
|
746 |
+
|
747 |
+
switch ( $section_and_perm_type ) {
|
748 |
+
|
749 |
+
case 'premium':
|
750 |
+
|
751 |
+
$content = '
|
752 |
+
<div class="bpfwp-settings-preview">
|
753 |
+
<h2>' . __( 'Premium', 'business-profile' ) . '<span>' . __( 'Premium', 'business-profile' ) . '</span></h2>
|
754 |
+
<p>' . __( 'The premium options let you enable WooCommerce integration, which automatically adds schema to your products, enable automatic schema for the posts on your site and add default options for all the schema fields available in the plugin.', 'business-profile' ) . '</p>
|
755 |
+
<div class="bpfwp-settings-preview-images">
|
756 |
+
<img src="' . BPFWP_PLUGIN_URL . '/assets/img/premium-screenshots/premium.png" alt="BPFWP premium screenshot">
|
757 |
+
</div>
|
758 |
+
' . $premium_features . '
|
759 |
+
</div>
|
760 |
+
';
|
761 |
+
|
762 |
+
break;
|
763 |
+
}
|
764 |
+
|
765 |
+
return function() use ( $content ) {
|
766 |
+
|
767 |
+
echo wp_kses_post( $content );
|
768 |
+
};
|
769 |
+
}
|
770 |
+
|
771 |
/**
|
772 |
* Sort the schedule exceptions and remove past exceptions before saving
|
773 |
*
|
package.json
DELETED
@@ -1,26 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"name": "business-profile",
|
3 |
-
"description": "Contact information, Google Maps and opening hours made easy for businesses.",
|
4 |
-
"version": "1.2.6",
|
5 |
-
"author": {
|
6 |
-
"name": "Theme of the Crop",
|
7 |
-
"url": "https://themeofthecrop.com"
|
8 |
-
},
|
9 |
-
"scripts": {
|
10 |
-
"build": "cross-env BABEL_ENV=default NODE_ENV=production webpack",
|
11 |
-
"dev": "cross-env BABEL_ENV=default webpack --watch"
|
12 |
-
},
|
13 |
-
"devDependencies": {
|
14 |
-
"babel-core": "^6.25.0",
|
15 |
-
"babel-loader": "^7.1.1",
|
16 |
-
"babel-plugin-transform-react-jsx": "^6.24.1",
|
17 |
-
"babel-preset-env": "^1.6.0",
|
18 |
-
"cross-env": "^5.0.1",
|
19 |
-
"grunt": "~1.0.0",
|
20 |
-
"grunt-contrib-compress": "~1.3.0",
|
21 |
-
"grunt-contrib-jshint": "~1.0.0",
|
22 |
-
"grunt-contrib-watch": "~1.0.0",
|
23 |
-
"grunt-wp-i18n": "~0.5.4",
|
24 |
-
"webpack": "^3.1.0"
|
25 |
-
}
|
26 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -3,9 +3,9 @@ Contributors: FiveStarPlugins
|
|
3 |
Author URI: https://www.fivestarplugins.com/
|
4 |
Plugin URL: https://www.fivestarplugins.com/plugins/business-profile/
|
5 |
Requires at Least: 5.3
|
6 |
-
Tested Up To: 5.
|
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 |
-
Stable tag: 2.
|
9 |
License: GPLv3
|
10 |
License URI:http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
@@ -192,6 +192,10 @@ You'll find more help in the [User Guide](http://doc.themeofthecrop.com/plugins/
|
|
192 |
|
193 |
== Changelog ==
|
194 |
|
|
|
|
|
|
|
|
|
195 |
= 2.1.10 (2022-01-31) =
|
196 |
- Fixed an issue in which, in certain instances, the plugin wouldn't reactivate after having been deactivated.
|
197 |
|
3 |
Author URI: https://www.fivestarplugins.com/
|
4 |
Plugin URL: https://www.fivestarplugins.com/plugins/business-profile/
|
5 |
Requires at Least: 5.3
|
6 |
+
Tested Up To: 5.9
|
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 |
+
Stable tag: 2.2.0
|
9 |
License: GPLv3
|
10 |
License URI:http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
192 |
|
193 |
== Changelog ==
|
194 |
|
195 |
+
= 2.2.0 (2022-02-16) =
|
196 |
+
- Changed how premium settings areas are previewed.
|
197 |
+
- Removed unused packaging files.
|
198 |
+
|
199 |
= 2.1.10 (2022-01-31) =
|
200 |
- Fixed an issue in which, in certain instances, the plugin wouldn't reactivate after having been deactivated.
|
201 |
|
webpack.config.js
DELETED
@@ -1,31 +0,0 @@
|
|
1 |
-
let webpack = require( 'webpack' ),
|
2 |
-
NODE_ENV = process.env.NODE_ENV || 'development',
|
3 |
-
webpackConfig = {
|
4 |
-
entry: [
|
5 |
-
'./assets/js/block-contact-card.js',
|
6 |
-
],
|
7 |
-
output: {
|
8 |
-
path: __dirname,
|
9 |
-
filename: './assets/js/blocks.build.js',
|
10 |
-
},
|
11 |
-
module: {
|
12 |
-
loaders: [
|
13 |
-
{
|
14 |
-
test: /.js$/,
|
15 |
-
loader: 'babel-loader',
|
16 |
-
exclude: /node_modules/,
|
17 |
-
},
|
18 |
-
],
|
19 |
-
},
|
20 |
-
plugins: [
|
21 |
-
new webpack.DefinePlugin( {
|
22 |
-
'process.env.NODE_ENV': JSON.stringify( NODE_ENV ),
|
23 |
-
} ),
|
24 |
-
],
|
25 |
-
};
|
26 |
-
|
27 |
-
if ( 'production' === NODE_ENV ) {
|
28 |
-
webpackConfig.plugins.push( new webpack.optimize.UglifyJsPlugin() );
|
29 |
-
}
|
30 |
-
|
31 |
-
module.exports = webpackConfig;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|