WP Review - Version 5.0.0

Version Description

Download this release

Release Info

Developer MyThemeShop
Plugin Icon 128x128 WP Review
Version 5.0.0
Comparing to
See all releases

Code changes from version 4.0.17 to 5.0.0

Files changed (131) hide show
  1. admin/activation.php +1 -1
  2. admin/admin.php +572 -87
  3. admin/assets/css/admin.css +343 -0
  4. admin/assets/css/jquery-ui.min.css +360 -0
  5. admin/assets/css/select2.min.css +1 -0
  6. admin/assets/images/loading.svg +17 -0
  7. admin/assets/images/wp-review-pro.jpg +0 -0
  8. admin/assets/js/admin.import.js +33 -0
  9. admin/assets/js/admin.js +799 -0
  10. admin/assets/js/editor-plugin.js +372 -0
  11. admin/assets/js/rating-inputs.js +234 -0
  12. admin/assets/js/review-items.js +235 -0
  13. admin/assets/js/select2.min.js +1 -0
  14. {assets → admin/assets}/js/wp-review-tab-widget-admin.js +39 -34
  15. admin/class-wp-review-form-field.php +53 -0
  16. admin/class-wp-review-options.php +200 -0
  17. admin/demo-importer.php +52 -0
  18. admin/demo-importer/class-wp-import.php +1198 -0
  19. admin/demo-importer/class-wp-review-demo-importer.php +35 -0
  20. admin/demo-importer/parsers.php +698 -0
  21. admin/font-awesome-icons.php +685 -0
  22. admin/import.php +46 -0
  23. admin/metaboxes.php +1220 -499
  24. admin/options.php +0 -348
  25. admin/options/facebook.php +45 -0
  26. admin/options/google.php +30 -0
  27. admin/options/hello-bar.php +227 -0
  28. admin/options/help.php +31 -0
  29. admin/options/import.php +79 -0
  30. admin/options/multisite.php +313 -0
  31. admin/options/popup.php +270 -0
  32. admin/options/review.php +962 -0
  33. admin/options/role-manager.php +42 -0
  34. admin/options/yelp.php +31 -0
  35. admin/review-options-meta-box.php +230 -0
  36. assets/css/admin.css +0 -208
  37. assets/css/wp-review-ie7.css +0 -14
  38. assets/css/wp-review-tab-widget.css +0 -191
  39. assets/css/wp-review.css +0 -605
  40. assets/images/largethumb.png +0 -0
  41. assets/images/smallthumb.png +0 -0
  42. assets/images/wp-review-pro.jpg +0 -0
  43. assets/js/admin.js +0 -325
  44. assets/js/main.js +0 -101
  45. box-templates/aqua.php +471 -0
  46. box-templates/default.php +234 -153
  47. box-templates/global/partials/review-links.php +26 -0
  48. box-templates/global/partials/review-schema.php +69 -0
  49. box-templates/global/partials/schema-link.php +8 -0
  50. box-templates/global/review-items.php +48 -0
  51. box-templates/shortcodes/comparison-table.php +83 -0
  52. comments/comments.php +69 -0
  53. filter-list.php +543 -132
  54. includes/ajax.php +408 -0
  55. includes/comments.php +1153 -0
  56. includes/demo/demo-content.xml +38572 -0
  57. includes/enqueue.php +74 -48
  58. includes/functions.php +3184 -1383
  59. includes/schemas.php +887 -0
  60. includes/shortcodes.php +176 -0
  61. includes/shortcodes/class-wp-review-comparison-table-shortcode.php +82 -0
  62. includes/shortcodes/class-wp-review-posts-shortcode.php +85 -0
  63. includes/widget.php +16 -516
  64. includes/widgets/class-wp-review-tab-widget.php +531 -0
  65. includes/woocommerce.php +164 -0
  66. languages/default.mo +0 -0
  67. languages/default.po +0 -716
  68. languages/wp-review.pot +2860 -0
  69. license.txt +0 -339
  70. public/css/comments.css +209 -0
  71. public/css/font-awesome.min.css +4 -0
  72. public/css/magnific-popup.css +347 -0
  73. public/css/wp-review.css +1 -0
  74. public/fonts/FontAwesome.otf +0 -0
  75. {assets → public}/fonts/font-icons.eot +0 -0
  76. {assets → public}/fonts/font-icons.svg +12 -12
  77. {assets → public}/fonts/font-icons.ttf +0 -0
  78. {assets → public}/fonts/font-icons.woff +0 -0
  79. public/fonts/fontawesome-webfont.eot +0 -0
  80. public/fonts/fontawesome-webfont.svg +2671 -0
  81. public/fonts/fontawesome-webfont.ttf +0 -0
  82. public/fonts/fontawesome-webfont.woff +0 -0
  83. public/fonts/fontawesome-webfont.woff2 +0 -0
  84. public/images/amazon.jpg +0 -0
  85. public/images/aqua.jpg +0 -0
  86. public/images/blue.jpg +0 -0
  87. public/images/darkside.jpg +0 -0
  88. public/images/dash.jpg +0 -0
  89. public/images/default.jpg +0 -0
  90. public/images/edge.jpg +0 -0
  91. public/images/enterprise.jpg +0 -0
  92. public/images/facebook.jpg +0 -0
  93. public/images/fizzy.jpg +0 -0
  94. public/images/gamer.jpg +0 -0
  95. public/images/gravity.jpg +0 -0
  96. public/images/largethumb.png +0 -0
  97. public/images/shell.jpg +0 -0
  98. public/images/smallthumb.png +0 -0
  99. public/images/tabbed.jpg +0 -0
  100. public/images/tabbed2.jpg +0 -0
  101. public/images/xiaomi.jpg +0 -0
  102. public/images/yelp-stars/small_0.png +0 -0
  103. public/images/yelp-stars/small_1.png +0 -0
  104. public/images/yelp-stars/small_1_half.png +0 -0
  105. public/images/yelp-stars/small_2.png +0 -0
  106. public/images/yelp-stars/small_2_half.png +0 -0
  107. public/images/yelp-stars/small_3.png +0 -0
  108. public/images/yelp-stars/small_3_half.png +0 -0
  109. public/images/yelp-stars/small_4.png +0 -0
  110. public/images/yelp-stars/small_4_half.png +0 -0
  111. public/images/yelp-stars/small_5.png +0 -0
  112. public/images/zine.jpg +0 -0
  113. public/js/jquery.exitIntent.js +56 -0
  114. public/js/jquery.knob.min.js +805 -0
  115. public/js/jquery.magnific-popup.min.js +4 -0
  116. public/js/js.cookie.min.js +2 -0
  117. public/js/main.js +260 -0
  118. public/js/stacktable.js +210 -0
  119. {assets → public}/js/wp-review-tab-widget.js +70 -70
  120. rating-types/percentage-input.js +93 -54
  121. rating-types/percentage-input.php +55 -34
  122. rating-types/percentage-output.php +35 -26
  123. rating-types/point-input.js +97 -56
  124. rating-types/point-input.php +52 -32
  125. rating-types/point-output.php +33 -26
  126. rating-types/star-input.js +31 -13
  127. rating-types/star-input.php +108 -54
  128. rating-types/star-output.php +54 -34
  129. readme.txt +287 -300
  130. template-list.php +203 -0
  131. wp-review.php +182 -131
admin/activation.php CHANGED
@@ -1 +1 @@
1
- <?php // SILENCE IS GOLDEN.
1
+ <?php // SILENCE IS GOLDEN.
admin/admin.php CHANGED
@@ -1,87 +1,572 @@
1
- <?php
2
- /**
3
- * Admin functions for this plugin.
4
- *
5
- * @since 1.0
6
- * @copyright Copyright (c) 2013, MyThemesShop
7
- * @author MyThemesShop
8
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
9
- */
10
-
11
- /* Register admin.css file. */
12
- add_action( 'admin_enqueue_scripts', 'wp_review_admin_style' );
13
-
14
- add_action( 'wp_ajax_wpreview_rated', 'wp_review_rated_ajax', 10 );
15
- add_filter( 'admin_footer_text', 'wp_review_admin_footer_text', 10 );
16
-
17
- /**
18
- * Register custom style for the meta box.
19
- *
20
- * @since 1.0
21
- */
22
- function wp_review_admin_style( $hook_suffix ) {
23
- wp_enqueue_style( 'wp-review-admin-style', WP_REVIEW_ASSETS . 'css/admin.css', array( 'wp-color-picker' ) );
24
- wp_enqueue_script(
25
- 'wp-review-admin-script',
26
- WP_REVIEW_ASSETS . 'js/admin.js',
27
- array( 'wp-color-picker', 'jquery', 'jquery-ui-core', 'jquery-ui-slider', 'jquery-ui-sortable' ),
28
- false,
29
- true
30
- );
31
-
32
- wp_localize_script(
33
- 'wp-review-admin-script',
34
- 'wprVars',
35
- array(
36
- 'ratingPermissionsCommentOnly' => WP_REVIEW_REVIEW_COMMENT_ONLY,
37
- 'ratingPermissionsBoth' => WP_REVIEW_REVIEW_ALLOW_BOTH,
38
- )
39
- );
40
-
41
- wp_enqueue_style(
42
- 'wp-review-admin-ui-css',
43
- '//ajax.googleapis.com/ajax/libs/jqueryui/1.8.21/themes/smoothness/jquery-ui.css',
44
- false,
45
- null,
46
- false
47
- );
48
-
49
- // Load frontend css but not on the post editor screen
50
- if ( stripos('post.php', $hook_suffix) === false ) {
51
- wp_enqueue_style( 'wp_review-style', trailingslashit( WP_REVIEW_ASSETS ) . 'css/wp-review.css', array(), WP_REVIEW_PLUGIN_VERSION, 'all' );
52
- }
53
- }
54
-
55
- function wp_review_admin_footer_text( $footer_text ) {
56
- $current_screen = get_current_screen();
57
-
58
- $post_types = get_post_types( array('public' => true), 'names' );
59
- $excluded_post_types = apply_filters('wp_review_excluded_post_types', array('attachment'));
60
- $allowed_post_types = array_diff($post_types, $excluded_post_types);
61
-
62
- // Check to make sure we're on a Review Editing page
63
- if ( ( isset( $current_screen->id ) && strpos($current_screen->id, 'wp-review') !== false ) ||
64
- ( isset( $current_screen->action ) && $current_screen->action == 'add' && in_array( $current_screen->id, $allowed_post_types ) ) ||
65
- ( isset( $_GET['action'] ) && $_GET['action'] == 'edit' && in_array( $current_screen->id, $allowed_post_types ) ) ) {
66
- // Change the footer text
67
- if ( ! get_option( 'wpreview_admin_footer_text_rated' ) ) {
68
- $footer_text = sprintf( __( 'If you like <strong>WP Review</strong> please leave us a %s rating. A huge thank you from MyThemeShop in advance!', 'woocommerce' ), '<a href="https://wordpress.org/support/view/plugin-reviews/wp-review?filter=5" target="_blank" class="wpreview-rating-link" data-rated="' . esc_attr__( 'Thanks :)', 'wp-review' ) . '"><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span></a>' );
69
- $footer_text .= "
70
- <script type=\"text/javascript\">
71
- jQuery( 'a.wpreview-rating-link' ).click( function() {
72
- jQuery.post( ajaxurl, { action: 'wpreview_rated' } );
73
- jQuery( this ).parent().text( jQuery( this ).data( 'rated' ) );
74
- });
75
- </script>
76
- ";
77
- } else {
78
- //$footer_text = __( 'Thank you for using WP Review.', 'wp-review' );
79
- }
80
- }
81
-
82
- return $footer_text;
83
- }
84
-
85
- function wp_review_rated_ajax() {
86
- update_option( 'wpreview_admin_footer_text_rated', '1' );
87
- }
1
+ <?php
2
+ /**
3
+ * Admin functions for this plugin.
4
+ *
5
+ * @since 1.0
6
+ * @copyright Copyright (c) 2013, MyThemesShop
7
+ * @author MyThemesShop
8
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
9
+ * @package WP_Review
10
+ */
11
+
12
+ /**
13
+ * Register custom style for the meta box.
14
+ *
15
+ * @since 1.0
16
+ * @since 3.0.0 Add select2
17
+ *
18
+ * @param string $hook_suffix Admin page hook suffix.
19
+ */
20
+ function wp_review_admin_style( $hook_suffix ) {
21
+ if ( ! in_array( $hook_suffix, array( 'post-new.php', 'edit-comments.php', 'post.php', 'edit.php', 'widgets.php', 'settings_page_wp-review/admin/options' ) ) ) {
22
+ return;
23
+ }
24
+
25
+ wp_enqueue_style( 'fontawesome', WP_REVIEW_ASSETS . 'css/font-awesome.min.css', array(), '4.7.0' );
26
+
27
+ wp_register_script( 'jquery-knob', trailingslashit( WP_REVIEW_ASSETS ) . 'js/jquery.knob.min.js', array( 'jquery' ), '1.1', true );
28
+
29
+ wp_enqueue_script( 'select2', WP_REVIEW_URI . 'admin/assets/js/select2.min.js', array( 'jquery' ), '4.0.4', true );
30
+ wp_enqueue_style( 'select2', WP_REVIEW_URI . 'admin/assets/css/select2.min.css', array(), '4.0.4' );
31
+
32
+ wp_enqueue_style( 'wp_review-style', trailingslashit( WP_REVIEW_ASSETS ) . 'css/wp-review.css', array(), WP_REVIEW_PLUGIN_VERSION, 'all' );
33
+
34
+ wp_enqueue_style( 'wp-review-admin-style', WP_REVIEW_URI . 'admin/assets/css/admin.css', array( 'wp-color-picker' ) );
35
+
36
+ wp_enqueue_style( 'magnificPopup', WP_REVIEW_ASSETS . 'css/magnific-popup.css', array(), '1.1.0' );
37
+ wp_enqueue_script( 'magnificPopup', WP_REVIEW_ASSETS . 'js/jquery.magnific-popup.min.js', array( 'jquery' ), '1.1.0', true );
38
+
39
+ wp_enqueue_media();
40
+ add_thickbox();
41
+
42
+ wp_enqueue_script( 'jquery-knob', WP_REVIEW_ASSETS . 'js/jquery.knob.min.js', array( 'jquery' ), '1.2.12', true );
43
+
44
+ wp_register_script( 'js-cookie', WP_REVIEW_ASSETS . 'js/js.cookie.min.js', array(), '2.1.4', true );
45
+
46
+ wp_enqueue_script(
47
+ 'wp-review-rating-inputs',
48
+ WP_REVIEW_URI . 'admin/assets/js/rating-inputs.js',
49
+ array( 'jquery-knob', 'jquery-ui-slider' ),
50
+ '3.0.0',
51
+ true
52
+ );
53
+
54
+ wp_enqueue_script(
55
+ 'wp-review-admin-script',
56
+ WP_REVIEW_URI . 'admin/assets/js/admin.js',
57
+ array(
58
+ 'wp-color-picker',
59
+ 'jquery',
60
+ 'jquery-ui-core',
61
+ 'jquery-ui-slider',
62
+ 'jquery-ui-sortable',
63
+ 'jquery-ui-datepicker',
64
+ 'wp-util',
65
+ 'wp-review-rating-inputs',
66
+ 'js-cookie',
67
+ 'magnificPopup',
68
+ 'imagesloaded',
69
+ ),
70
+ '3.0.0',
71
+ true
72
+ );
73
+
74
+ wp_enqueue_script(
75
+ 'wp-review-admin-import',
76
+ WP_REVIEW_URI . 'admin/assets/js/admin.import.js',
77
+ array( 'jquery', 'wp-util' ),
78
+ '3.0.0',
79
+ true
80
+ );
81
+
82
+ wp_enqueue_script(
83
+ 'wp-review-review-items',
84
+ WP_REVIEW_URI . 'admin/assets/js/review-items.js',
85
+ array( 'backbone', 'wp-review-admin-script', 'jquery-ui-sortable' ),
86
+ '3.0.6',
87
+ true
88
+ );
89
+
90
+ wp_localize_script(
91
+ 'wp-review-admin-script',
92
+ 'wprVars',
93
+ array(
94
+ 'ratingPermissionsCommentOnly' => WP_REVIEW_REVIEW_COMMENT_ONLY,
95
+ 'ratingPermissionsBoth' => WP_REVIEW_REVIEW_ALLOW_BOTH,
96
+ 'imgframe_title' => __( 'Select Image', 'wp-review' ),
97
+ 'imgbutton_title' => __( 'Insert Image', 'wp-review' ),
98
+ 'imgremove_title' => __( 'Remove Image', 'wp-review' ),
99
+ 'title' => __( 'Title', 'wp-review' ),
100
+ 'searchTerm' => __( 'Search term', 'wp-review' ),
101
+ 'searchLocation' => __( 'Search location', 'wp-review' ),
102
+ 'limit' => __( 'Limit', 'wp-review' ),
103
+ 'searchRadius' => __( 'Radius', 'wp-review' ),
104
+ 'searchCategories' => __( 'Categories', 'wp-review' ),
105
+ 'searchLocale' => __( 'Locale', 'wp-review' ),
106
+ 'searchOffset' => __( 'Offset', 'wp-review' ),
107
+ 'sort_by' => __( 'SortBy', 'wp-review' ),
108
+ 'searchPrice' => __( 'Price range', 'wp-review' ),
109
+ 'open_now' => __( 'Open now', 'wp-review' ),
110
+ 'attributes' => __( 'Attributes', 'wp-review' ),
111
+ 'businessId' => __( 'Business ID', 'wp-review' ),
112
+ 'locationLookup' => __( 'Location lookup', 'wp-review' ),
113
+ 'placeId' => __( 'Place ID', 'wp-review' ),
114
+ 'placeType' => __( 'Place type', 'wp-review' ),
115
+ 'all' => __( 'All', 'wp-review' ),
116
+ 'establishments' => __( 'Establishments', 'wp-review' ),
117
+ 'addresses' => __( 'Addresses', 'wp-review' ),
118
+ 'geocodes' => __( 'Geocodes', 'wp-review' ),
119
+ 'pageId' => __( 'Page ID', 'wp-review' ),
120
+ 'generateToken' => __( 'Generate token', 'wp-review' ),
121
+ 'comparisonTable' => __( 'Comparison table', 'wp-review' ),
122
+ 'reviewIds' => __( 'Review IDs (separate by commas)', 'wp-review' ),
123
+ 'reviewPosts' => __( 'Review posts', 'wp-review' ),
124
+ 'queryType' => __( 'Query type', 'wp-review' ),
125
+ 'recentReviews' => __( 'Recent reviews', 'wp-review' ),
126
+ 'topRated' => __( 'Top rated', 'wp-review' ),
127
+ 'mostVoted' => __( 'Most voted', 'wp-review' ),
128
+ 'categoryReviews' => __( 'Category reviews', 'wp-review' ),
129
+ 'reviewTypesText' => __( 'Review types', 'wp-review' ),
130
+ 'separateByCommas' => __( 'separate by commas', 'wp-review' ),
131
+ 'categoryIds' => __( 'Category IDs', 'wp-review' ),
132
+ 'allowPagination' => __( 'Allow pagination', 'wp-review' ),
133
+ 'numberOfReviews' => __( 'Number of reviews', 'wp-review' ),
134
+ 'titleLength' => __( 'Title length (words)', 'wp-review' ),
135
+ 'thumbSize' => __( 'Thumb size', 'wp-review' ),
136
+ 'small' => __( 'Small', 'wp-review' ),
137
+ 'large' => __( 'Large', 'wp-review' ),
138
+ 'showDate' => __( 'Show date', 'wp-review' ),
139
+ 'reviewBox' => __( 'Review box', 'wp-review' ),
140
+ 'reviewTotal' => __( 'Review total', 'wp-review' ),
141
+ 'visitorRating' => __( 'Visitor rating', 'wp-review' ),
142
+ 'commentsRating' => __( 'Comments rating', 'wp-review' ),
143
+ 'reviewId' => __( 'Review ID', 'wp-review' ),
144
+ 'leaveReviewIdEmpty' => __( 'Leave empty to use current review ID', 'wp-review' ),
145
+ 'insert' => __( 'Insert', 'wp-review' ),
146
+ 'cancel' => __( 'Cancel', 'wp-review' ),
147
+ 'reviewTypes' => wp_review_get_rating_types(),
148
+ 'globalReviewType' => wp_review_option( 'review_type', 'none' ),
149
+ 'assetsUrl' => WP_REVIEW_ASSETS,
150
+ 'boxTemplates' => wp_review_get_box_templates(),
151
+ 'purgeRatingsNonce' => wp_create_nonce( 'wpr_purge_ratings' ),
152
+ 'confirmPurgeRatings' => esc_html__( 'Are you sure you want to do this?', 'wp-review' ),
153
+ 'importDemoConfirm' => __( 'Are you sure you want to import demo?', 'wp-review' ),
154
+ 'importDemoDone' => __( 'Importing proccess finished!', 'wp-review' ),
155
+ )
156
+ );
157
+
158
+ wp_localize_script(
159
+ 'wp-review-admin-import',
160
+ 'wprImportVars',
161
+ array(
162
+ 'confirm' => __( 'Are you sure you want to import from %s?', 'wp-review' ),
163
+ 'server_error' => __( 'The server responded with an error. Try again.', 'wp-review' ),
164
+ 'confirmOptionsImport' => __( 'Are you sure you want to import options? All current options will be lost.', 'wp-review' ),
165
+ 'importOptionsNonce' => wp_create_nonce( 'wp-review-import-options' ),
166
+ )
167
+ );
168
+
169
+ wp_enqueue_style(
170
+ 'jquery-ui',
171
+ WP_REVIEW_URI . 'admin/assets/css/jquery-ui.min.css',
172
+ array(),
173
+ '1.12.1'
174
+ );
175
+
176
+ // Load frontend css but not on the post editor screen.
177
+ if ( stripos( 'post.php', $hook_suffix ) === false ) {
178
+ wp_enqueue_style( 'wp_review-style', trailingslashit( WP_REVIEW_ASSETS ) . 'css/wp-review.css', array(), WP_REVIEW_PLUGIN_VERSION, 'all' );
179
+ }
180
+ }
181
+
182
+ add_action( 'admin_enqueue_scripts', 'wp_review_admin_style' );
183
+
184
+
185
+ /**
186
+ * Gets list of icons.
187
+ *
188
+ * @since 3.0.0
189
+ *
190
+ * @return array
191
+ */
192
+ function wp_review_get_icons() {
193
+ $icons = include WP_REVIEW_ADMIN . 'font-awesome-icons.php';
194
+ /**
195
+ * Filters list of font icons.
196
+ *
197
+ * @since 3.0.0
198
+ *
199
+ * @param array $icons List of icons. View file `wp-review/admin/font-awesome-icons.php
200
+ */
201
+ return apply_filters( 'wp_review_icons', $icons );
202
+ }
203
+
204
+
205
+ /**
206
+ * Gets list of animations in.
207
+ *
208
+ * @since 3.0.0
209
+ *
210
+ * @return array
211
+ */
212
+ function wp_review_get_animations_in() {
213
+ return array(
214
+ __( 'Attention Seekers', 'wp-review' ) => array(
215
+ 'bounce' => __( 'bounce', 'wp-review' ),
216
+ 'flash' => __( 'flash', 'wp-review' ),
217
+ 'pulse' => __( 'pulse', 'wp-review' ),
218
+ 'rubberBand' => __( 'rubberBand', 'wp-review' ),
219
+ 'shake' => __( 'shake', 'wp-review' ),
220
+ 'swing' => __( 'swing', 'wp-review' ),
221
+ 'tada' => __( 'tada', 'wp-review' ),
222
+ 'wobble' => __( 'wobble', 'wp-review' ),
223
+ 'jello' => __( 'jello', 'wp-review' ),
224
+ ),
225
+ __( 'Bouncing Entrances', 'wp-review' ) => array(
226
+ 'bounceIn' => __( 'bounceIn', 'wp-review' ),
227
+ 'bounceInDown' => __( 'bounceInDown', 'wp-review' ),
228
+ 'bounceInLeft' => __( 'bounceInLeft', 'wp-review' ),
229
+ 'bounceInRight' => __( 'bounceInRight', 'wp-review' ),
230
+ 'bounceInUp' => __( 'bounceInUp', 'wp-review' ),
231
+ ),
232
+ __( 'Fading Entrances', 'wp-review' ) => array(
233
+ 'fadeIn' => __( 'fadeIn', 'wp-review' ),
234
+ 'fadeInDown' => __( 'fadeInDown', 'wp-review' ),
235
+ 'fadeInDownBig' => __( 'fadeInDownBig', 'wp-review' ),
236
+ 'fadeInLeft' => __( 'fadeInLeft', 'wp-review' ),
237
+ 'fadeInLeftBig' => __( 'fadeInLeftBig', 'wp-review' ),
238
+ 'fadeInRight' => __( 'fadeInRight', 'wp-review' ),
239
+ 'fadeInRightBig' => __( 'fadeInRightBig', 'wp-review' ),
240
+ 'fadeInUp' => __( 'fadeInUp', 'wp-review' ),
241
+ 'fadeInUpBig' => __( 'fadeInUpBig', 'wp-review' ),
242
+ ),
243
+ __( 'Flippers', 'wp-review' ) => array(
244
+ 'flip' => __( 'flip', 'wp-review' ),
245
+ 'flipInX' => __( 'flipInX', 'wp-review' ),
246
+ 'flipInY' => __( 'flipInY', 'wp-review' ),
247
+ 'flipOutX' => __( 'flipOutX', 'wp-review' ),
248
+ 'flipOutY' => __( 'flipOutY', 'wp-review' ),
249
+ ),
250
+ __( 'Lightspeed', 'wp-review' ) => array(
251
+ 'lightSpeedIn' => __( 'lightSpeedIn', 'wp-review' ),
252
+ 'lightSpeedOut' => __( 'lightSpeedOut', 'wp-review' ),
253
+ ),
254
+ __( 'Rotating Entrances', 'wp-review' ) => array(
255
+ 'rotateIn' => __( 'rotateIn', 'wp-review' ),
256
+ 'rotateInDownLeft' => __( 'rotateInDownLeft', 'wp-review' ),
257
+ 'rotateInDownRight' => __( 'rotateInDownRight', 'wp-review' ),
258
+ 'rotateInUpLeft' => __( 'rotateInUpLeft', 'wp-review' ),
259
+ 'rotateInUpRight' => __( 'rotateInUpRight', 'wp-review' ),
260
+ ),
261
+ __( 'Sliding Entrances', 'wp-review' ) => array(
262
+ 'slideInUp' => __( 'slideInUp', 'wp-review' ),
263
+ 'slideInDown' => __( 'slideInDown', 'wp-review' ),
264
+ 'slideInLeft' => __( 'slideInLeft', 'wp-review' ),
265
+ 'slideInRight' => __( 'slideInRight', 'wp-review' ),
266
+ ),
267
+ __( 'Zoom Entrances', 'wp-review' ) => array(
268
+ 'zoomIn' => __( 'zoomIn', 'wp-review' ),
269
+ 'zoomInDown' => __( 'zoomInDown', 'wp-review' ),
270
+ 'zoomInLeft' => __( 'zoomInLeft', 'wp-review' ),
271
+ 'zoomInRight' => __( 'zoomInRight', 'wp-review' ),
272
+ 'zoomInUp' => __( 'zoomInUp', 'wp-review' ),
273
+ ),
274
+ __( 'Specials', 'wp-review' ) => array(
275
+ 'hinge' => __( 'hinge', 'wp-review' ),
276
+ 'jackInTheBox' => __( 'jackInTheBox', 'wp-review' ),
277
+ 'rollIn' => __( 'rollIn', 'wp-review' ),
278
+ 'rollOut' => __( 'rollOut', 'wp-review' ),
279
+ ),
280
+ );
281
+ }
282
+
283
+
284
+ /**
285
+ * Gets list of animations out.
286
+ *
287
+ * @since 3.0.0
288
+ *
289
+ * @return array
290
+ */
291
+ function wp_review_get_animations_out() {
292
+ return array(
293
+ __( 'Attention Seekers', 'wp-review' ) => array(
294
+ 'bounce' => __( 'bounce', 'wp-review' ),
295
+ 'flash' => __( 'flash', 'wp-review' ),
296
+ 'pulse' => __( 'pulse', 'wp-review' ),
297
+ 'rubberBand' => __( 'rubberBand', 'wp-review' ),
298
+ 'shake' => __( 'shake', 'wp-review' ),
299
+ 'swing' => __( 'swing', 'wp-review' ),
300
+ 'tada' => __( 'tada', 'wp-review' ),
301
+ 'wobble' => __( 'wobble', 'wp-review' ),
302
+ 'jello' => __( 'jello', 'wp-review' ),
303
+ ),
304
+ __( 'Bouncing Exits', 'wp-review' ) => array(
305
+ 'bounceOut' => __( 'bounceOut', 'wp-review' ),
306
+ 'bounceOutDown' => __( 'bounceOutDown', 'wp-review' ),
307
+ 'bounceOutLeft' => __( 'bounceOutLeft', 'wp-review' ),
308
+ 'bounceOutRight' => __( 'bounceOutRight', 'wp-review' ),
309
+ 'bounceOutUp' => __( 'bounceOutUp', 'wp-review' ),
310
+ ),
311
+ __( 'Fading Exits', 'wp-review' ) => array(
312
+ 'fadeOut' => __( 'fadeOut', 'wp-review' ),
313
+ 'fadeOutDown' => __( 'fadeOutDown', 'wp-review' ),
314
+ 'fadeOutDownBig' => __( 'fadeOutDownBig', 'wp-review' ),
315
+ 'fadeOutLeft' => __( 'fadeOutLeft', 'wp-review' ),
316
+ 'fadeOutLeftBig' => __( 'fadeOutLeftBig', 'wp-review' ),
317
+ 'fadeOutRight' => __( 'fadeOutRight', 'wp-review' ),
318
+ 'fadeOutRightBig' => __( 'fadeOutRightBig', 'wp-review' ),
319
+ 'fadeOutUp' => __( 'fadeOutUp', 'wp-review' ),
320
+ 'fadeOutUpBig' => __( 'fadeOutUpBig', 'wp-review' ),
321
+ ),
322
+ __( 'Flippers', 'wp-review' ) => array(
323
+ 'flip' => __( 'flip', 'wp-review' ),
324
+ 'flipInX' => __( 'flipInX', 'wp-review' ),
325
+ 'flipInY' => __( 'flipInY', 'wp-review' ),
326
+ 'flipOutX' => __( 'flipOutX', 'wp-review' ),
327
+ 'flipOutY' => __( 'flipOutY', 'wp-review' ),
328
+ ),
329
+ __( 'Lightspeed', 'wp-review' ) => array(
330
+ 'lightSpeedIn' => __( 'lightSpeedIn', 'wp-review' ),
331
+ 'lightSpeedOut' => __( 'lightSpeedOut', 'wp-review' ),
332
+ ),
333
+ __( 'Rotating Exits', 'wp-review' ) => array(
334
+ 'rotateOut' => __( 'rotateOut', 'wp-review' ),
335
+ 'rotateOutDownLeft' => __( 'rotateOutDownLeft', 'wp-review' ),
336
+ 'rotateOutDownRight' => __( 'rotateOutDownRight', 'wp-review' ),
337
+ 'rotateOutUpLeft' => __( 'rotateOutUpLeft', 'wp-review' ),
338
+ 'rotateOutUpRight' => __( 'rotateOutUpRight', 'wp-review' ),
339
+ ),
340
+ __( 'Sliding Exits', 'wp-review' ) => array(
341
+ 'slideOutUp' => __( 'slideOutUp', 'wp-review' ),
342
+ 'slideOutDown' => __( 'slideOutDown', 'wp-review' ),
343
+ 'slideOutLeft' => __( 'slideOutLeft', 'wp-review' ),
344
+ 'slideOutRight' => __( 'slideOutRight', 'wp-review' ),
345
+ ),
346
+ __( 'Zoom Exits', 'wp-review' ) => array(
347
+ 'zoomOut' => __( 'zoomOut', 'wp-review' ),
348
+ 'zoomOutDown' => __( 'zoomOutDown', 'wp-review' ),
349
+ 'zoomOutLeft' => __( 'zoomOutLeft', 'wp-review' ),
350
+ 'zoomOutRight' => __( 'zoomOutRight', 'wp-review' ),
351
+ 'zoomOutUp' => __( 'zoomOutUp', 'wp-review' ),
352
+ ),
353
+ __( 'Specials', 'wp-review' ) => array(
354
+ 'hinge' => __( 'hinge', 'wp-review' ),
355
+ 'jackInTheBox' => __( 'jackInTheBox', 'wp-review' ),
356
+ 'rollIn' => __( 'rollIn', 'wp-review' ),
357
+ 'rollOut' => __( 'rollOut', 'wp-review' ),
358
+ ),
359
+ );
360
+ }
361
+
362
+
363
+ /**
364
+ * Animation dropdown.
365
+ *
366
+ * @since 3.0.0
367
+ *
368
+ * @param string $id Element ID.
369
+ * @param string $name Element name.
370
+ * @param string $value Selected value.
371
+ * @param bool $exit Show only exit animations.
372
+ */
373
+ function wp_review_animations_dropdown( $id = '', $name = '', $value = '', $exit = false ) {
374
+ $animations = array( '' => esc_html__( 'No Animation', 'wp-review' ) );
375
+
376
+ if ( ! $exit ) {
377
+ $animations += wp_review_get_animations_in();
378
+ } else {
379
+ $animations += wp_review_get_animations_out();
380
+ }
381
+
382
+ printf( '<select id="%1$s" name="%2$s" class="js-select2">', esc_attr( $id ), esc_attr( $name ) );
383
+ wp_review_print_select_options( $animations, $value );
384
+ echo '</select>';
385
+ }
386
+
387
+
388
+ /**
389
+ * Prints select options.
390
+ *
391
+ * @since 3.0.0
392
+ *
393
+ * @param array $options Options.
394
+ * @param string $value Select value.
395
+ */
396
+ function wp_review_print_select_options( $options, $value ) {
397
+ foreach ( $options as $key => $text ) {
398
+ if ( is_array( $text ) ) {
399
+ printf( '<optgroup label="%s">', esc_attr( $key ) );
400
+ wp_review_print_select_options( $text, $value );
401
+ echo '</optgroup>';
402
+ } else {
403
+ printf(
404
+ '<option value="%1$s" %3$s>%2$s</option>',
405
+ esc_attr( $key ),
406
+ esc_html( $text ),
407
+ selected( $value, $key, false )
408
+ );
409
+ }
410
+ }
411
+ }
412
+
413
+
414
+ /**
415
+ * Add settings link on plugin page.
416
+ *
417
+ * @param array $links Plugins setting links.
418
+ * @return array
419
+ */
420
+ function wpreview_plugin_settings_link( $links ) {
421
+ $hide = wp_review_network_option( 'hide_global_options_' );
422
+ if ( ! $hide ) {
423
+ $dir = explode( '/', WP_REVIEW_PLUGIN_BASE );
424
+ $dir = $dir[0];
425
+ $settings_link = '<a href="options-general.php?page=wp-review/admin/options.php">' . __( 'Settings', 'wp-review' ) . '</a>';
426
+ array_unshift( $links, $settings_link );
427
+ }
428
+ return $links;
429
+ }
430
+ add_filter( 'plugin_action_links_' . WP_REVIEW_PLUGIN_BASE, 'wpreview_plugin_settings_link' );
431
+
432
+
433
+ /**
434
+ * Adds editor buttons.
435
+ *
436
+ * @param array $buttons Editor buttons.
437
+ * @return array
438
+ */
439
+ function wp_review_editor_buttons( $buttons ) {
440
+ array_push( $buttons, 'wpreviewpro' );
441
+ return $buttons;
442
+ }
443
+ add_filter( 'mce_buttons', 'wp_review_editor_buttons' );
444
+
445
+
446
+ /**
447
+ * Adds editor plugin.
448
+ *
449
+ * @param array $plugin_array Editor plugins.
450
+ * @return array
451
+ */
452
+ function wp_review_editor_js( $plugin_array ) {
453
+ $plugin_array['wp_review'] = WP_REVIEW_URI . 'admin/assets/js/editor-plugin.js';
454
+ return $plugin_array;
455
+ }
456
+ add_filter( 'mce_external_plugins', 'wp_review_editor_js' );
457
+
458
+
459
+ /**
460
+ * Normalizes option value
461
+ * Convert string as 'true' and 'false' to boolean value.
462
+ *
463
+ * @since 3.0.0
464
+ *
465
+ * @param mixed $value Option value.
466
+ * @return mixed
467
+ */
468
+ function wp_review_normalize_option_value( $value ) {
469
+ if ( 'true' === $value ) {
470
+ return true;
471
+ }
472
+ if ( 'false' === $value ) {
473
+ return false;
474
+ }
475
+ return $value;
476
+ }
477
+
478
+
479
+ /**
480
+ * Gets plugin options export code.
481
+ *
482
+ * @since 3.0.0
483
+ *
484
+ * @return string
485
+ */
486
+ function wp_review_get_options_export_code() {
487
+ $options = get_option( 'wp_review_options', array() );
488
+ return wp_json_encode( $options );
489
+ }
490
+
491
+
492
+ /**
493
+ * Imports plugin options.
494
+ *
495
+ * @since 3.0.0
496
+ *
497
+ * @param string $code Export code.
498
+ * @return bool
499
+ */
500
+ function wp_review_import_options( $code ) {
501
+ $options = json_decode( $code, true );
502
+ if ( ! $options ) {
503
+ return false;
504
+ }
505
+ update_option( 'wp_review_options', $options );
506
+ return true;
507
+ }
508
+
509
+
510
+ /**
511
+ * Prints pro text.
512
+ *
513
+ * @param bool $strip_br Strip `<br>` tag.
514
+ */
515
+ function wp_review_print_pro_text( $strip_br = false ) {
516
+ $br = ! $strip_br ? '<br>' : '';
517
+ echo $br . '<small class="wp-review-pro-text">' . esc_html__( 'Pro feature', 'wp-review' ) . '</small>'; // WPCS: xss ok.
518
+ }
519
+
520
+
521
+ /**
522
+ * Prints the Pro version popup.
523
+ */
524
+ function wp_review_print_pro_popup() {
525
+ ?>
526
+ <div id="wp-review-pro-popup-notice" class="mfp-hide">
527
+ <div class="pro-popup-title"><?php esc_html_e( 'Buy WP Review Pro', 'wp-review' ); ?></div>
528
+ <div class="pro-popup-content">
529
+ <img class="pro-popup-image" src="<?php echo esc_url( WP_REVIEW_URI . 'admin/assets/images/wp-review-pro.jpg' ); ?>" />
530
+ <h2 class="pro-notice-header"><?php esc_html_e( 'Like WP Review Plugin? You will LOVE WP Review Pro!', 'wp-review' ); ?></h2>
531
+ <p><?php esc_html_e( '15 new review box templates, 15 new Schema types, commment reviews, user can rate each feature, review popups, review notification bars, custom width, 9 new custom widgets, Google reviews, Facebook reviews, Yelp reviews and much more...', 'wp-review' ); ?></p>
532
+ <a class="button-primary" href="https://mythemeshop.com/plugins/wp-review-pro/?utm_source=WP+Review&utm_medium=Popup&utm_content=WP+Review+Pro+LP&utm_campaign=WordPressOrg" target="_blank"><?php esc_html_e( 'Buy WP Review Pro', 'wp-review' ); ?></a>
533
+ </div>
534
+ </div>
535
+
536
+ <style>
537
+ .mfp-hide { display: none !important; }
538
+ #wp-review-pro-popup-notice {
539
+ background: #FFF;
540
+ width: auto;
541
+ max-width: 630px;
542
+ margin: 20px auto;
543
+ position: relative;
544
+ }
545
+ #wp-review-pro-popup-notice .mfp-close { background-color: transparent; }
546
+ #wp-review-pro-popup-notice .pro-popup-title {
547
+ padding: 0 10px;
548
+ line-height: 29px;
549
+ font-weight: 600;
550
+ background: #fcfcfc;
551
+ border-bottom: 1px solid #ddd;
552
+ }
553
+ #wp-review-pro-popup-notice .pro-popup-content {
554
+ padding: 2px 15px 15px;
555
+ min-height: 195px;
556
+ }
557
+ #wp-review-pro-popup-notice .pro-popup-content:after {
558
+ content: " ";
559
+ display: block;
560
+ height: 0;
561
+ visibility: hidden;
562
+ clear: both;
563
+ }
564
+ #wp-review-pro-popup-notice .pro-popup-image {
565
+ width: 150px;
566
+ float: right;
567
+ margin: 10px;
568
+ }
569
+ </style>
570
+ <?php
571
+ }
572
+ add_action( 'admin_footer', 'wp_review_print_pro_popup' );
admin/assets/css/admin.css ADDED
@@ -0,0 +1,343 @@
1
+ .border-box, .wpr-box-template-images { box-sizing: border-box; }
2
+
3
+ .border-box *, .wpr-box-template-images * { box-sizing: border-box; }
4
+
5
+ .wpr-flex { display: flex; flex-wrap: wrap; }
6
+
7
+ .wpr-flex-wrap { flex-wrap: wrap; }
8
+
9
+ .wpr-col-1-2 { flex: 0 0 50%; }
10
+
11
+ .wpr-col-1-3 { flex: 0 0 33.33%; margin-bottom: 12px; padding-bottom: 12px; }
12
+
13
+ .wpr-col-1-3 label { position: relative; padding-left: 20px; }
14
+
15
+ .wpr-col-1-3 label input[type=checkbox] { position: absolute; top: 0; left: 0; box-shadow: none; overflow: hidden; border: 2px solid rgba(33, 38, 44, 0.6); border-radius: 2px; }
16
+
17
+ .wpr-col-1-3 label input[type=checkbox]:checked { border-color: #069de3; }
18
+
19
+ .wpr-col-1-3 label input[type=checkbox]:checked:before { line-height: 16px; width: 17px; height: 16px; margin: -2px 0 0 -5px; content: '\f147'; text-align: center; color: #fff; border-radius: 2px; background: #069de3; }
20
+
21
+ .wp-review * { box-sizing: border-box; }
22
+
23
+ .wp-review p.submit { text-align: right; }
24
+
25
+ .wp-review h1 { margin-bottom: 15px; }
26
+
27
+ .wpr-flex-wrap { justify-content: space-between; }
28
+
29
+ .wpr-flex-wrap .wpr-col-1-2 { flex: 0 0 49%; }
30
+
31
+ .wpr-flex-wrap .wpr-col-1-2:last-child { float: right; }
32
+
33
+ /*--------------------------- Fields --------------------------*/
34
+ .wp-review-field { padding: 15px 0; border-bottom: 1px dashed #ddd; margin-top: 1em; margin-bottom: 1em; border-bottom: 1px dashed #ddd; }
35
+
36
+ .wp-review-field, .wp-review-field * { box-sizing: border-box; }
37
+
38
+ .postbox .wp-review-field { padding: 0; border-bottom: 0; }
39
+
40
+ @media (min-width: 600px) { .wp-review-field:not(.vertical):not(.no-flex) { display: flex; flex-wrap: wrap; }
41
+ .wp-review-field:not(.vertical):not(.no-flex) .wp-review-field-label { flex: 0 0 25%; padding-right: 4%; }
42
+ .wp-review-field:not(.vertical):not(.no-flex) .wp-review-field-label.full-width { flex: 0 0 100%; padding-right: 0; }
43
+ .wp-review-field:not(.vertical):not(.no-flex) .wp-review-field-option { flex: 0 0 75%; }
44
+ .wp-review-field:not(.vertical):not(.no-flex).wp-review-rating-icon, .wp-review-field:not(.vertical):not(.no-flex).wp-review-rating-image { position: relative; }
45
+ .wp-review-field:not(.vertical):not(.no-flex).wp-review-rating-icon.hide, .wp-review-field:not(.vertical):not(.no-flex).wp-review-rating-image.hide { display: none; }
46
+ .wp-review-field:not(.vertical):not(.no-flex).wp-review-rating-icon a.wpr-toggle-rating, .wp-review-field:not(.vertical):not(.no-flex).wp-review-rating-image a.wpr-toggle-rating { position: absolute; top: 0; right: 0; }
47
+ .wp-review-field:not(.vertical):not(.no-flex).wp-review-rating-icon .img-wrapper, .wp-review-field:not(.vertical):not(.no-flex).wp-review-rating-image .img-wrapper { padding: 2px; width: 55px; height: 55px; border: 1px solid #ddd; position: relative; }
48
+ .wp-review-field:not(.vertical):not(.no-flex).wp-review-rating-icon .img-wrapper img, .wp-review-field:not(.vertical):not(.no-flex).wp-review-rating-image .img-wrapper img { max-width: 100%; }
49
+ .wp-review-field:not(.vertical):not(.no-flex).wp-review-rating-icon .img-wrapper i, .wp-review-field:not(.vertical):not(.no-flex).wp-review-rating-image .img-wrapper i { position: absolute; top: -6px; right: -6px; color: #444; cursor: pointer; }
50
+ .wp-review-field:not(.vertical):not(.no-flex).wp-review-rating-icon .img-wrapper.hide, .wp-review-field:not(.vertical):not(.no-flex).wp-review-rating-image .img-wrapper.hide { display: none; }
51
+ .wp-review-field:not(.vertical):not(.no-flex).wp-review-rating-icon .set_rating_image.hide, .wp-review-field:not(.vertical):not(.no-flex).wp-review-rating-image .set_rating_image.hide { display: none; }
52
+ .postbox .wp-review-field .wp-review-field-label { flex: 0 0 20%; }
53
+ .postbox .wp-review-field .wp-review-field-option { flex: 0 0 80%; } }
54
+
55
+ .wpr_image_upload_field .clear-image { margin-left: 10px; }
56
+
57
+ /*--------------------------- Review items --------------------------*/
58
+ .wpr-star-input-wrapper { position: relative; color: #c40000; overflow: hidden; display: inline-block; }
59
+
60
+ .wpr-star-input-wrapper .stars-bg { color: #ccc; white-space: nowrap; }
61
+
62
+ .wpr-star-input-wrapper .stars-result { white-space: nowrap; position: absolute; left: 0; top: 0; overflow: hidden; }
63
+
64
+ .wpr-input-wrapper.ui-slider .ui-slider-handle { background-color: #fff; box-shadow: 0 0px 3px rgba(0, 0, 0, 0.4); border-radius: 2px; cursor: pointer; }
65
+
66
+ /*--------------------------- Options page --------------------------*/
67
+ .wpr-vertical-tabs { max-width: 880px; position: relative; }
68
+
69
+ .wpr-vertical-tabs__titles { width: 200px; float: left; border-right: 0; margin: 0; z-index: 10; position: absolute; left: 0; top: 0; }
70
+
71
+ .wpr-vertical-tabs__titles.active { background-color: #fff; }
72
+
73
+ .wpr-vertical-tabs__title { margin: 0; padding: 0; position: relative; }
74
+
75
+ .wpr-vertical-tabs__title:first-child a { border-top: 1px solid #ccc; }
76
+
77
+ .wpr-vertical-tabs__title.active a { background-color: #fff; }
78
+
79
+ .wpr-vertical-tabs__title.active a:after { content: ""; width: 1px; height: 40px; position: absolute; right: -1px; top: 1px; background: #fff; z-index: 10; }
80
+
81
+ .wpr-vertical-tabs__title i { font-size: 18px; min-width: 20px; margin-right: 10px; text-align: center; color: #444; }
82
+
83
+ .wpr-vertical-tabs__title a { font-size: 16px; display: block; box-sizing: border-box; padding: 11px 15px; white-space: nowrap; text-decoration: none; color: #555; border: 1px solid #ccc; border-top: 0; border-right: 0; outline: none; background: #e5e5e5; box-shadow: none; }
84
+
85
+ .wpr-vertical-tabs__contents { padding-left: 200px; }
86
+
87
+ .wpr-vertical-tabs__content { padding: 15px; min-height: 400px; background: #fff; border: 1px solid #ccc; }
88
+
89
+ .wpr-vertical-tabs__content > h2 { margin-top: 0; }
90
+
91
+ .wpr-vertical-tabs__content .nav-tab-active { background-color: #fff; border-bottom-color: #fff; }
92
+
93
+ /*.wp-review-field { clear: both; padding-top: 0; }*/
94
+ .clearfix:before, .clearfix:after { content: " "; display: table; }
95
+
96
+ .clearfix:after { clear: both; }
97
+
98
+ .clearfix { *zoom: 1; }
99
+
100
+ .wp_review_schema_type_options textarea { width: 77%; min-height: 80px; }
101
+
102
+ .wp-review-field select { width: 15em; margin-left: 0; }
103
+
104
+ .wp-review-field #wp_review_product_price { width: 70px; }
105
+
106
+ .wp-review-field .wp-color-result { margin: 0; }
107
+
108
+ .wp-review-field .large-text { width: 77%; }
109
+
110
+ .wp-review-field input { margin: 0; padding: 5px 8px; }
111
+
112
+ .wp-review-field .wp-picker-container { display: inline-block; }
113
+
114
+ .wp-review-field .wp-picker-container label { flex: none; width: auto; }
115
+
116
+ .wp-review-field .wp-picker-container input[type="text"].wp-color-picker { padding: 4px; width: 65px; }
117
+
118
+ .wp-review-field .wp-picker-container .iris-picker { box-sizing: initial; }
119
+
120
+ .wp-review-field .wp-picker-container .wp-picker-open + .wp-picker-input-wrap { width: 140px; }
121
+
122
+ #wp-wp_review_pros-wrap textarea.wp-editor-area, #wp-wp_review_cons-wrap textarea.wp-editor-area, #wp-wp_review_desc-wrap textarea.wp-editor-area { border: 0; }
123
+
124
+ .wp_review_schema_options_label { vertical-align: top; padding-top: 5px; }
125
+
126
+ .wpr_image_upload_field { display: inline-block; }
127
+
128
+ .wp-review-item th { text-align: left; }
129
+
130
+ .wp-review-item td:first-child { text-align: center; }
131
+
132
+ .wp-review-item .handle { cursor: move; }
133
+
134
+ .wp-review-links td:first-child { text-align: center; }
135
+
136
+ .wp-review-links .handle { cursor: move; }
137
+
138
+ .wp-review-links input[type="text"] { padding: 5px 8px; }
139
+
140
+ .has-border-bottom { border-bottom: 1px solid #ddd; margin-bottom: 20px; padding-bottom: 20px; }
141
+
142
+ .review-total { text-align: right; }
143
+
144
+ .wp-picker-holder { position: absolute; z-index: 9; }
145
+
146
+ .review-value-incorrect { border-color: #F00 !important; }
147
+
148
+ #wp_review_id_hint { margin-left: 8px; }
149
+
150
+ .wp-review-admin-options .form-table td { padding: 20px 10px; vertical-align: top; }
151
+
152
+ .wp-review-admin-options p.description { font-weight: normal; font-style: normal; }
153
+
154
+ .wp-review-admin-options .wp-review-field > label .description { margin-left: 0; }
155
+
156
+ .wp-review-admin-options .wp-review-field input { padding: 7px; border-radius: 2px; margin: 0; box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1); }
157
+
158
+ .wp-review-admin-options .wp-review-field input[type=radio] { border-radius: 50%; }
159
+
160
+ .wp-review-admin-options .wp-review-field input[type=checkbox] { border-radius: 0; }
161
+
162
+ .wp-review-admin-options .wp-review-field .large-text { width: 70%; }
163
+
164
+ .wp-review-admin-options .wp-review-field .description { display: block; color: #888; font-style: normal; margin-top: 5px; }
165
+
166
+ .wp-review-admin-options #wp_review_shortcode_hint_field span { display: inline; margin-left: 6px; }
167
+
168
+ .wp-review-admin-options .wp-review-thumbnail-options label { margin-right: 0; width: 90%; }
169
+
170
+ .wp-review-description label { margin-bottom: -20px; display: block; }
171
+
172
+ .wp-review-theme-defaults-msg { position: relative; }
173
+
174
+ .wp-review-theme-defaults-msg a.button { display: inline-block; margin-bottom: 8px; }
175
+
176
+ .wp-review-theme-defaults-msg a.close-notice { position: absolute; top: 0; right: 0; }
177
+
178
+ .edit-ratings-notice.update-nag { background: #fff9e8; margin-right: 0; }
179
+
180
+ #wp-review-width-slider { width: 70%; float: left; margin-top: 12px; margin-right: 25px; border-radius: 0; max-width: 600px; border: 0; background: #d8d8d8; height: 8px; }
181
+
182
+ #wp-review-width-slider .ui-slider-handle { background: #fff; box-shadow: 0 0px 3px rgba(0, 0, 0, 0.4); border-radius: 2px; }
183
+
184
+ #wp-review-width-slider.ui-slider-horizontal .ui-slider-range-min { border: 0; border-radius: 2px; background: #0184bb; }
185
+
186
+ #wp_review_width { width: 60px; }
187
+
188
+ .wrap.wp-review .nav-tab-wrapper { border-bottom: 1px solid #ccc; margin-top: 16px; }
189
+
190
+ .wrap.wp-review .nav-tab-wrapper a:focus { box-shadow: none; }
191
+
192
+ .nav-tab-hidden { display: none; }
193
+
194
+ .nav-tab-hidden.nav-tab-active { display: block; }
195
+
196
+ textarea#wp-review-migrate-log { width: 600px; max-width: 100%; height: 200px; display: none; }
197
+
198
+ .already-migrated-msg { display: none; }
199
+
200
+ #start-migrate { margin-bottom: 12px; }
201
+
202
+ #wp-review-settings-tab-contents > div { display: none; max-width: 900px; }
203
+
204
+ #wp-review-settings-tab-contents .settings-tab-general { display: block; }
205
+
206
+ .pros-cons-title { max-width: 25%; }
207
+
208
+ .column-wp_review_rating, .column-wp_review_comment_rating { text-align: center; position: relative; width: 110px; }
209
+
210
+ .column-wp_review_rating .review-star, .column-wp_review_comment_rating .review-star { position: relative; letter-spacing: 1px; }
211
+
212
+ .column-wp_review_rating .no-rating, .column-wp_review_comment_rating .no-rating { color: #aaa; font-style: italic; }
213
+
214
+ #editwpreview { overflow: hidden; }
215
+
216
+ #editwpreview .inside { float: left; padding: 3px 0 2px 5px; margin: 0; text-align: left; }
217
+
218
+ #editwpreview .inside input { width: 180px; }
219
+
220
+ #editwpreview label { padding: 2px 0; }
221
+
222
+ h4.wp-review-comment-title { margin-top: 0; margin-bottom: 1em; }
223
+
224
+ .review-result-wrapper { position: relative; display: inline-block; font-size: 0; }
225
+
226
+ .postbox .review-result-wrapper a, .postbox .review-result i { cursor: pointer; }
227
+
228
+ .review-result { position: absolute; top: 0; left: 0; height: 22px; overflow: hidden; white-space: nowrap; }
229
+
230
+ .wp-review-rating-feature { display: inline-block; }
231
+
232
+ .wp-review-notice { position: relative; }
233
+
234
+ .wpr_image_upload_img { margin: 0 0 10px; padding: 0; max-width: 100%; height: auto; float: left; display: inline-block; }
235
+
236
+ .wpr-hide { display: none; }
237
+
238
+ .wpr-tabs .tab-title.nav-tab-active { background-color: #fff; border-bottom-color: #fff; }
239
+
240
+ .wpr-box-template-images { display: flex; flex-wrap: wrap; }
241
+
242
+ .wpr-box-template-images .wpr-box-template-image { flex: 0 0 50%; display: block; outline: 0; box-shadow: none; text-decoration: none; text-align: center; color: #333; font-weight: 700; margin-bottom: 5px; }
243
+
244
+ .wpr-box-template-images .wpr-box-template-image img { padding: 4px; width: 100%; height: auto; display: block; }
245
+
246
+ .wpr-box-template-images .wpr-box-template-image.active img { background-color: #0073aa; }
247
+
248
+ #wpr-review-items-app * { box-sizing: border-box; }
249
+
250
+ #wpr-review-items-app .wpr-review-item { background-color: #f7f7f7; padding: 10px 10px 10px 30px; margin-bottom: 5px; }
251
+
252
+ #wpr-review-items-app .wpr-review-item .setting-row:first-of-type .col-2 input { width: 100%; padding: 5px; background: #fff; }
253
+
254
+ #wpr-review-items-app .wpr-review-item .col-3 input { float: right; background: #fff; }
255
+
256
+ #wpr-review-items-app .wpr-review-item .wpr-icon-move { cursor: move; position: absolute; left: 5px; top: 16px; }
257
+
258
+ #wpr-review-items-app .setting-row { padding: 5px 0; }
259
+
260
+ #wpr-review-items-app .final-row .col-3 { text-align: right; }
261
+
262
+ #wpr-review-items-app .final-row .col-3 input { float: right; min-width: 52px; }
263
+
264
+ #wpr-review-items-app .final-row .col-3 label { margin: 4px 10px 0 0; display: inline-block; font-weight: bold; }
265
+
266
+ #wpr-review-items-app .wpr-percentage-input-wrapper { margin-top: 10px; }
267
+
268
+ #wpr-review-items-app .wp-picker-container { display: inline-block; }
269
+
270
+ #wpr-review-items-app .wp-picker-holder * { box-sizing: initial; }
271
+
272
+ @media (min-width: 768px) { #wpr-review-items-app .wpr-review-item { position: relative; }
273
+ #wpr-review-items-app .delete-item { position: absolute; right: 10px; bottom: 10px; }
274
+ #wpr-review-items-app .setting-row { display: flex; flex-wrap: wrap; }
275
+ #wpr-review-items-app .col-1 { flex: 0 0 20%; }
276
+ #wpr-review-items-app .col-2 { flex: 0 0 60%; padding: 0 10px; }
277
+ #wpr-review-items-app .col-3 { flex: 0 0 20%; } }
278
+
279
+ #wp_review_box_template_wrapper { position: relative; }
280
+
281
+ #wp_review_box_template_preview { position: absolute; left: 250px; top: 0px; z-index: 1000; padding: 3px; box-shadow: 0 0 3px rgba(0, 0, 0, 0.2); background: #fff; }
282
+
283
+ #wp_review_box_template_preview.loading { background: #eee url(../images/loading.svg) no-repeat center center; }
284
+
285
+ #wp_review_box_template_preview.loading img { visibility: hidden; }
286
+
287
+ #wp_review_box_template_img, #wp_review_box_template_preview_img { max-width: 414px; height: auto; }
288
+
289
+ .wpr-switch { display: inline-block; }
290
+
291
+ .wpr-switch input { position: absolute !important; clip: rect(0, 0, 0, 0); height: 1px; width: 1px; border: 0; overflow: hidden; }
292
+
293
+ .wpr-switch label { float: left; display: inline-block; min-width: 45px; background-color: #e4e4e4; color: rgba(0, 0, 0, 0.6); font-size: 12px; font-weight: 700; line-height: 28px; text-align: center; text-shadow: none; border: 1px solid rgba(0, 0, 0, 0.2); box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px rgba(255, 255, 255, 0.1); transition: all 0.1s ease-in-out; }
294
+
295
+ .wpr-switch label:hover { cursor: pointer; }
296
+
297
+ .wpr-switch label:first-of-type { border-radius: 3px 0 0 3px; border-right: 0; font-weight: normal; }
298
+
299
+ .wpr-switch label:last-of-type { border-radius: 0 3px 3px 0; border-left: 0; font-weight: normal; }
300
+
301
+ input.wpr-switch__on:checked + label, input.wpr-switch__off:checked + label { background: #0085ba; border-color: #0073aa #006799 #006799; box-shadow: 0 1px 0 #006799; color: #fff; text-decoration: none; text-shadow: 0 -1px 1px #006799, 1px 0 1px #006799, 0 1px 1px #006799, -1px 0 1px #006799; margin-bottom: 2px; }
302
+
303
+ input.wpr-switch__on:checked + label:hover, input.wpr-switch__off:checked + label:hover { background: #008ec2; border-color: #006799; color: #fff; }
304
+
305
+ input.wpr-switch__off:checked + label, input.wpr-switch__off:checked + label:hover { color: #fff; background: #f5786f; border-color: #bd4c44 #bd4c44 #bd4c44; box-shadow: 0 1px 0 #bd4c44; text-shadow: none; }
306
+
307
+ #wp-review-demo-importer-popup { background: #fff; border: 1px solid #eaeaeb; border-radius: 3px; box-shadow: 0 1px 0 #FFF inset, 0 1px 5px rgba(0, 0, 0, 0.1); position: relative; width: auto; max-width: 600px; margin: 50px auto; }
308
+
309
+ #wp-review-demo-importer-modal-header { border-bottom: 1px solid #eaeaeb; background: #FAFBFD; padding: 12px 20px; }
310
+
311
+ #wp-review-demo-importer-modal-header .spinner { margin-top: 14px; }
312
+
313
+ #wp-review-demo-importer-modal-header h2, #wp-review-demo-importer-modal-content h4 { padding: 0 !important; margin: 0 !important; }
314
+
315
+ #wp-review-demo-importer-modal-header h2 { font-size: 1.8em; line-height: 2em; }
316
+
317
+ #wp-review-demo-importer-modal-content { background: #fff; padding: 20px; overflow: auto; height: 300px; width: 100%; box-sizing: border-box; }
318
+
319
+ #wp-review-demo-importer-modal-content p { padding: 0; margin: 0; }
320
+
321
+ #wp-review-demo-importer-modal-footer { border-top: 1px solid #eaeaeb; background: #FAFBFD; padding: 12px 20px; display: inline-block; width: 100%; box-sizing: border-box; }
322
+
323
+ #wp-review-demo-importer-modal-footer-info { float: left; }
324
+
325
+ #wp-review-demo-importer-modal-footer-button { float: right; display: none; text-transform: uppercase; }
326
+
327
+ .wp-admin select.mce-selectbox { padding: 0; }
328
+
329
+ #wp-review-metabox-userReview .inside > p:first-of-type label, #wp-review-metabox-userReview .inside > p:nth-of-type(2) label, #wp-review-metabox-userReview .inside > p:nth-of-type(3) label, #wp-review-metabox-userReview .inside > p:nth-of-type(4) label { padding-right: 0; margin-left: 5px; }
330
+
331
+ .wp-review-subsite-wrapper { display: none; }
332
+
333
+ .wp-review-pro-text { color: #00cc66; }
334
+
335
+ .wp-review-disabled { position: relative; cursor: pointer; }
336
+
337
+ .wp-review-disabled:before { content: " "; display: block; position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 100; }
338
+
339
+ .wp-review-disabled.inline-block { display: inline-block; }
340
+
341
+ .wp-review-disabled.wpr-switch, .wp-review-disabled.has-bg { opacity: 0.3; }
342
+
343
+ /*# sourceMappingURL=../sourcemaps/admin.css.map */
admin/assets/css/jquery-ui.min.css ADDED
@@ -0,0 +1,360 @@
1
+ /*---------------------------
2
+ * jQuery UI Slider
3
+ *--------------------------*/
4
+ .ui-slider { position: relative; text-align: left; }
5
+ .ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.3em; cursor: default; }
6
+ .ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
7
+ .ui-slider-horizontal { height: .8em; }
8
+ .ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
9
+ .ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
10
+ .ui-slider-horizontal .ui-slider-range-min { left: 0; }
11
+ .ui-slider-horizontal .ui-slider-range-max { right: 0; }
12
+ .ui-slider-vertical { width: .8em; height: 100px; }
13
+ .ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
14
+ .ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
15
+ .ui-slider-vertical .ui-slider-range-min { bottom: 0; }
16
+ .ui-slider-vertical .ui-slider-range-max { top: 0; }
17
+
18
+ /* Date Picker Default Styles */
19
+ .ui-datepicker {
20
+ padding: 0;
21
+ margin: 0;
22
+ -webkit-border-radius: 0;
23
+ -moz-border-radius: 0;
24
+ border-radius: 0;
25
+ background-color: #fff;
26
+ border: 1px solid #dfdfdf;
27
+ border-top: none;
28
+ -webkit-box-shadow: 0 3px 6px rgba(0, 0, 0, 0.075);
29
+ box-shadow: 0 3px 6px rgba(0, 0, 0, 0.075);
30
+ min-width: 17em;
31
+ width: auto;
32
+ }
33
+
34
+ .ui-datepicker * {
35
+ padding: 0;
36
+ font-family: "Open Sans", sans-serif;
37
+ -webkit-border-radius: 0;
38
+ -moz-border-radius: 0;
39
+ border-radius: 0;
40
+ }
41
+
42
+ .ui-datepicker table {
43
+ font-size: 13px;
44
+ margin: 0;
45
+ border: none;
46
+ border-collapse: collapse;
47
+ }
48
+
49
+ .ui-datepicker .ui-widget-header,
50
+ .ui-datepicker .ui-datepicker-header {
51
+ background-image: none;
52
+ border: none;
53
+ color: #fff;
54
+ font-weight: normal;
55
+ }
56
+
57
+ .ui-datepicker .ui-datepicker-header .ui-state-hover {
58
+ background: transparent;
59
+ border-color: transparent;
60
+ cursor: pointer;
61
+ }
62
+
63
+ .ui-datepicker .ui-datepicker-title {
64
+ margin: 0;
65
+ padding: 10px 0;
66
+ color: #fff;
67
+ font-size: 14px;
68
+ line-height: 14px;
69
+ text-align: center;
70
+ }
71
+
72
+ .ui-datepicker .ui-datepicker-prev,
73
+ .ui-datepicker .ui-datepicker-next {
74
+ position: relative;
75
+ top: 0;
76
+ height: 34px;
77
+ width: 34px;
78
+ }
79
+
80
+ .ui-datepicker .ui-state-hover.ui-datepicker-prev,
81
+ .ui-datepicker .ui-state-hover.ui-datepicker-next {
82
+ border: none;
83
+ }
84
+
85
+ .ui-datepicker .ui-datepicker-prev,
86
+ .ui-datepicker .ui-datepicker-prev-hover {
87
+ left: 0;
88
+ }
89
+
90
+ .ui-datepicker .ui-datepicker-next,
91
+ .ui-datepicker .ui-datepicker-next-hover {
92
+ right: 0;
93
+ }
94
+
95
+ .ui-datepicker .ui-datepicker-next span,
96
+ .ui-datepicker .ui-datepicker-prev span {
97
+ display: none;
98
+ }
99
+
100
+ .ui-datepicker .ui-datepicker-prev {
101
+ float: left;
102
+ }
103
+
104
+ .ui-datepicker .ui-datepicker-next {
105
+ float: right;
106
+ }
107
+
108
+ .ui-datepicker .ui-datepicker-prev:before,
109
+ .ui-datepicker .ui-datepicker-next:before {
110
+ font: normal 20px/34px 'dashicons';
111
+ padding-left: 7px;
112
+ color: #fff;
113
+ speak: none;
114
+ -webkit-font-smoothing: antialiased;
115
+ -moz-osx-font-smoothing: grayscale;
116
+ width: 34px;
117
+ height: 34px;
118
+ }
119
+
120
+ .ui-datepicker .ui-datepicker-prev:before {
121
+ content: '\f341';
122
+ }
123
+
124
+ .ui-datepicker .ui-datepicker-next:before {
125
+ content: '\f345';
126
+ }
127
+
128
+ .ui-datepicker .ui-datepicker-prev-hover:before,
129
+ .ui-datepicker .ui-datepicker-next-hover:before {
130
+ opacity: 0.7;
131
+ }
132
+
133
+ .ui-datepicker select.ui-datepicker-month,
134
+ .ui-datepicker select.ui-datepicker-year {
135
+ width: 33%;
136
+ }
137
+
138
+ .ui-datepicker thead {
139
+ color: #fff;
140
+ font-weight: 600;
141
+ }
142
+
143
+ .ui-datepicker th {
144
+ padding: 10px;
145
+ }
146
+
147
+ .ui-datepicker td {
148
+ padding: 0;
149
+ border: 1px solid #f4f4f4;
150
+ }
151
+
152
+ .ui-datepicker td.ui-datepicker-other-month {
153
+ border: transparent;
154
+ }
155
+
156
+ .ui-datepicker td.ui-datepicker-week-end {
157
+ background-color: #f4f4f4;
158
+ border: 1px solid #f4f4f4;
159
+ }
160
+
161
+ .ui-datepicker td.ui-datepicker-today {
162
+ background-color: #f0f0c0;
163
+ }
164
+
165
+ .ui-datepicker td.ui-datepicker-current-day {
166
+ background: #bbdd88;
167
+ }
168
+
169
+ .ui-datepicker td .ui-state-default {
170
+ background: transparent;
171
+ border: none;
172
+ text-align: center;
173
+ text-decoration: none;
174
+ width: auto;
175
+ display: block;
176
+ padding: 5px 10px;
177
+ font-weight: normal;
178
+ color: #444;
179
+ }
180
+
181
+ .ui-datepicker td.ui-state-disabled .ui-state-default {
182
+ opacity: 0.5;
183
+ }
184
+
185
+ /* Default Color Scheme */
186
+ .ui-datepicker .ui-widget-header,
187
+ .ui-datepicker .ui-datepicker-header {
188
+ background: #00a0d2;
189
+ }
190
+
191
+ .ui-datepicker thead {
192
+ background: #32373c;
193
+ }
194
+
195
+ .ui-datepicker td .ui-state-hover {
196
+ background: #0073aa;
197
+ color: #fff;
198
+ }
199
+
200
+ /* WordPress Color Schemes */
201
+
202
+ /* Fresh */
203
+ .admin-color-fresh .ui-datepicker .ui-widget-header,
204
+ .admin-color-fresh .ui-datepicker .ui-datepicker-header {
205
+ background: #00a0d2;
206
+ }
207
+
208
+ .admin-color-fresh .ui-datepicker thead {
209
+ background: #32373c;
210
+ }
211
+
212
+ .admin-color-fresh .ui-datepicker td .ui-state-hover {
213
+ background: #0073aa;
214
+ color: #fff;
215
+ }
216
+
217
+ /* Blue */
218
+ .admin-color-blue .ui-datepicker .ui-widget-header,
219
+ .admin-color-blue .ui-datepicker .ui-datepicker-header {
220
+ background: #52accc;
221
+ }
222
+
223
+ .admin-color-blue .ui-datepicker thead {
224
+ background: #4796b3;
225
+ }
226
+
227
+ .admin-color-blue .ui-datepicker td .ui-state-hover {
228
+ background: #096484;
229
+ color: #fff;
230
+ }
231
+
232
+ /* Coffee */
233
+ .admin-color-coffee .ui-datepicker .ui-widget-header,
234
+ .admin-color-coffee .ui-datepicker .ui-datepicker-header {
235
+ background: #59524c;
236
+ }
237
+
238
+ .admin-color-coffee .ui-datepicker thead {
239
+ background: #46403c;
240
+ }
241
+
242
+ .admin-color-coffee .ui-datepicker td .ui-state-hover {
243
+ background: #c7a589;
244
+ color: #fff;
245
+ }
246
+
247
+ /* Ectoplasm */
248
+ .admin-color-ectoplasm .ui-datepicker .ui-widget-header,
249
+ .admin-color-ectoplasm .ui-datepicker .ui-datepicker-header {
250
+ background: #523f6d;
251
+ }
252
+
253
+ .admin-color-ectoplasm .ui-datepicker thead {
254
+ background: #413256;
255
+ }
256
+
257
+ .admin-color-ectoplasm .ui-datepicker td .ui-state-hover {
258
+ background: #a3b745;
259
+ color: #fff;
260
+ }
261
+
262
+ /* Midnight */
263
+ .admin-color-midnight .ui-datepicker .ui-widget-header,
264
+ .admin-color-midnight .ui-datepicker .ui-datepicker-header {
265
+ background: #363b3f;
266
+ }
267
+
268
+ .admin-color-midnight .ui-datepicker thead {
269
+ background: #26292c;
270
+ }
271
+
272
+ .admin-color-midnight .ui-datepicker td .ui-state-hover {
273
+ background: #e14d43;
274
+ color: #fff;
275
+ }
276
+
277
+ /* Ocean */
278
+ .admin-color-ocean .ui-datepicker .ui-widget-header,
279
+ .admin-color-ocean .ui-datepicker .ui-datepicker-header {
280
+ background: #738e96;
281
+ }
282
+
283
+ .admin-color-ocean .ui-datepicker thead {
284
+ background: #627c83;
285
+ }
286
+
287
+ .admin-color-ocean .ui-datepicker td .ui-state-hover {
288
+ background: #9ebaa0;
289
+ color: #fff;
290
+ }
291
+
292
+ /* Sunrise */
293
+ .admin-color-sunrise .ui-datepicker .ui-widget-header,
294
+ .admin-color-sunrise .ui-datepicker .ui-datepicker-header,
295
+ .admin-color-sunrise .ui-datepicker .ui-datepicker-header .ui-state-hover {
296
+ background: #cf4944;
297
+ }
298
+
299
+ .admin-color-sunrise .ui-datepicker th {
300
+ border-color: #be3631;
301
+ background: #be3631;
302
+ }
303
+
304
+ .admin-color-sunrise .ui-datepicker td .ui-state-hover {
305
+ background: #dd823b;
306
+ color: #fff;
307
+ }
308
+
309
+ /* Light */
310
+ .admin-color-light .ui-datepicker .ui-widget-header,
311
+ .admin-color-light .ui-datepicker .ui-datepicker-header {
312
+ background: #e5e5e5;
313
+ }
314
+
315
+ .admin-color-light .ui-datepicker thead {
316
+ background: #888;
317
+ }
318
+
319
+ .admin-color-light .ui-datepicker .ui-datepicker-title,
320
+ .admin-color-light .ui-datepicker td .ui-state-default,
321
+ .admin-color-light .ui-datepicker .ui-datepicker-prev:before,
322
+ .admin-color-light .ui-datepicker .ui-datepicker-next:before {
323
+ color: #555;
324
+ }
325
+
326
+ .admin-color-light .ui-datepicker td .ui-state-hover {
327
+ background: #e5e5e5;
328
+ }
329
+
330
+ /* bbPress Color Schemes */
331
+
332
+ /* Evergreen */
333
+ .admin-color-bbp-evergreen .ui-datepicker .ui-widget-header,
334
+ .admin-color-bbp-evergreen .ui-datepicker .ui-datepicker-header {
335
+ background: #56b274;
336
+ }
337
+
338
+ .admin-color-bbp-evergreen .ui-datepicker thead {
339
+ background: #36533f;
340
+ }
341
+
342
+ .admin-color-bbp-evergreen .ui-datepicker td .ui-state-hover {
343
+ background: #446950;
344
+ color: #fff;
345
+ }
346
+
347
+ /* Mint */
348
+ .admin-color-bbp-mint .ui-datepicker .ui-widget-header,
349
+ .admin-color-bbp-mint .ui-datepicker .ui-datepicker-header {
350
+ background: #4ca26a;
351
+ }
352
+
353
+ .admin-color-bbp-mint .ui-datepicker thead {
354
+ background: #4f6d59;
355
+ }
356
+
357
+ .admin-color-bbp-mint .ui-datepicker td .ui-state-hover {
358
+ background: #5fb37c;
359
+ color: #fff;
360
+ }
admin/assets/css/select2.min.css ADDED
@@ -0,0 +1 @@
1
+ .select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background-color:white;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;user-select:none;-webkit-user-select:none}.select2-results__option[aria-selected]{cursor:pointer}.select2-container--open .select2-dropdown{left:0}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important}.select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #aaa;border-radius:4px}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--default .select2-selection--single .select2-selection__arrow{height:26px;position:absolute;top:1px;right:1px;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--default .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text}.select2-container--default .select2-selection--multiple .select2-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none}.select2-container--default .select2-selection--multiple .select2-selection__placeholder{color:#999;margin-top:5px;float:left}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-top:5px;margin-right:10px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:#999;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#333}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline{float:right}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--default.select2-container--focus .select2-selection--multiple{border:solid black 1px;outline:0}.select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid #aaa}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--default .select2-results__option[role=group]{padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{color:#999}.select2-container--default .select2-results__option[aria-selected=true]{background-color:#ddd}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background-color:#5897fb;color:white}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic .select2-selection--single{background-color:#f7f7f7;border:1px solid #aaa;border-radius:4px;outline:0;background-image:-webkit-linear-gradient(top, #fff 50%, #eee 100%);background-image:-o-linear-gradient(top, #fff 50%, #eee 100%);background-image:linear-gradient(to bottom, #fff 50%, #eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-right:10px}.select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #aaa;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-linear-gradient(top, #eee 50%, #ccc 100%);background-image:-o-linear-gradient(top, #eee 50%, #ccc 100%);background-image:linear-gradient(to bottom, #eee 50%, #ccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0)}.select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow{border:none;border-right:1px solid #aaa;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px;left:1px;right:auto}.select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:transparent;border:none}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-linear-gradient(top, #fff 0%, #eee 50%);background-image:-o-linear-gradient(top, #fff 0%, #eee 50%);background-image:linear-gradient(to bottom, #fff 0%, #eee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-linear-gradient(top, #eee 50%, #fff 100%);background-image:-o-linear-gradient(top, #eee 50%, #fff 100%);background-image:linear-gradient(to bottom, #eee 50%, #fff 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0)}.select2-container--classic .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0}.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--multiple .select2-selection__rendered{list-style:none;margin:0;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none}.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{color:#888;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{float:right}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #aaa;outline:0}.select2-container--classic .select2-search--inline .select2-search__field{outline:0;box-shadow:none}.select2-container--classic .select2-dropdown{background-color:#fff;border:1px solid transparent}.select2-container--classic .select2-dropdown--above{border-bottom:none}.select2-container--classic .select2-dropdown--below{border-top:none}.select2-container--classic .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--classic .select2-results__option[role=group]{padding:0}.select2-container--classic .select2-results__option[aria-disabled=true]{color:grey}.select2-container--classic .select2-results__option--highlighted[aria-selected]{background-color:#3875d7;color:#fff}.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb}
admin/assets/images/loading.svg ADDED
@@ -0,0 +1,17 @@
1
+ <!-- By Sam Herbert (@sherb), for everyone. More @ http://goo.gl/7AJzbL -->
2
+ <svg width="38" height="38" viewBox="0 0 38 38" xmlns="http://www.w3.org/2000/svg" stroke="#fff">
3
+ <g fill="none" fill-rule="evenodd">
4
+ <g transform="translate(1 1)" stroke-width="2">
5
+ <circle stroke-opacity=".5" cx="18" cy="18" r="18"/>
6
+ <path d="M36 18c0-9.94-8.06-18-18-18">
7
+ <animateTransform
8
+ attributeName="transform"
9
+ type="rotate"
10
+ from="0 18 18"
11
+ to="360 18 18"
12
+ dur="1s"
13
+ repeatCount="indefinite"/>
14
+ </path>
15
+ </g>
16
+ </g>
17
+ </svg>
admin/assets/images/wp-review-pro.jpg ADDED
Binary file
admin/assets/js/admin.import.js ADDED
@@ -0,0 +1,33 @@
1
+ jQuery( function( $ ) {
2
+ 'use strict';
3
+
4
+ var $section_header = $( '#import h2' );
5
+ var default_error = { message: wprImportVars.server_error };
6
+ var source, nonce;
7
+
8
+ $( '#wp-review-import-options-btn' ).on( 'click', function( ev ) {
9
+ ev.preventDefault();
10
+ var $btn, code, check;
11
+ $btn = $( this );
12
+ code = $( '#wp-review-import-options-code' ).val().trim();
13
+ if ( ! code ) {
14
+ return;
15
+ }
16
+ check = confirm( wprImportVars.confirmOptionsImport );
17
+ if ( ! check ) {
18
+ return;
19
+ }
20
+ $btn.prop( 'disabled', true );
21
+ var request = wp.ajax.post( 'wp_review_import_options', {
22
+ code: code,
23
+ _ajax_nonce: wprImportVars.importOptionsNonce
24
+ });
25
+ request.done( function( response ) {
26
+ window.location.href = window.location.href;
27
+ });
28
+ request.fail( function( response ) {
29
+ console.error( response );
30
+ $btn.prop( 'disabled', false );
31
+ });
32
+ });
33
+ } );
admin/assets/js/admin.js ADDED
@@ -0,0 +1,799 @@
1
+ /*
2
+ * Plugin Name: WP Review
3
+ * Plugin URI: http://mythemeshop.com/plugins/wp-review/
4
+ * Description: Create reviews! Choose from Stars, Percentages, Circles or Points for review scores. Supports Retina Display, WPMU & Unlimited Color Schemes.
5
+ * Author: MyThemesShop
6
+ * Author URI: http://mythemeshop.com/
7
+ */
8
+ ( function( $, Cookies ) {
9
+ "use strict";
10
+
11
+ var wpreview = window.wpreview = window.wpreview || {};
12
+
13
+ wpreview.initSelect2 = function() {
14
+ function addIcon( option ) {
15
+ if ( $( option.element ).attr( 'data-icon' ) ) {
16
+ return $( '<span><i class="' + $( option.element ).attr( 'data-icon' ) + '"></i> ' + option.text + '</span>' );
17
+ }
18
+ return option.text;
19
+ }
20
+
21
+ $( '.js-select2' ).select2({
22
+ templateResult: addIcon,
23
+ templateSelection: addIcon
24
+ });
25
+ };
26
+
27
+ wpreview.tabs = function( options ) {
28
+ var defaults = {
29
+ wrapper: '[data-tabs]',
30
+ title: '[data-tab-title]',
31
+ content: '[data-tab-content]',
32
+ activeElement: '',
33
+ activeClass: 'active',
34
+ active: '',
35
+ activate: null
36
+ };
37
+
38
+ options = $.extend( {}, defaults, options );
39
+
40
+ $( options.wrapper + ' ' + options.title ).on( 'click', function( ev ) {
41
+ ev.preventDefault();
42
+ var href, $tab;
43
+ href = $( this ).attr( 'href' );
44
+ $tab = $( this ).closest( options.wrapper );
45
+
46
+ $tab.find( options.content ).hide();
47
+
48
+ if ( ! options.activeElement || options.activeElement == options.title ) {
49
+ $tab.find( options.title ).removeClass( options.activeClass );
50
+ $( this ).addClass( options.activeClass );
51
+ } else {
52
+ $tab.find( options.activeElement ).removeClass( options.activeClass );
53
+ $( this ).closest( options.activeElement ).addClass( options.activeClass );
54
+ }
55
+
56
+ if ( typeof options.activate == 'function' ) {
57
+ options.activate.call( $( this ), href );
58
+ }
59
+
60
+ $tab.find( href ).fadeIn();
61
+ });
62
+
63
+ // Active a tab.
64
+ if ( options.active ) {
65
+ $( options.wrapper ).find( options.title + '[href="' + options.active + '"]' ).click();
66
+ } else {
67
+ $( options.wrapper ).find( options.title + ':eq(0)' ).click();
68
+ }
69
+ };
70
+
71
+ wpreview.initTabs = function() {
72
+ wpreview.tabs({
73
+ wrapper: '.js-tabs',
74
+ title: '.tab-title',
75
+ content: '.tab-content',
76
+ activeClass: 'nav-tab-active'
77
+ });
78
+
79
+ wpreview.tabs({
80
+ wrapper: '[data-vertical-tabs]',
81
+ activeElement: 'li',
82
+ active: $( '#setting-error-settings_updated' ).length ? Cookies.get( 'wpr-last-vtab' ) : '',
83
+ activate: function( tab ) {
84
+ Cookies.set( 'wpr-last-vtab', tab );
85
+ }
86
+ });
87
+
88
+ wpreview.tabs({
89
+ wrapper: '[data-nav-tabs]',
90
+ title: '.nav-tab',
91
+ content: '.tab-content',
92
+ activeClass: 'nav-tab-active',
93
+ active: $( '#setting-error-settings_updated' ).length ? Cookies.get( 'wpr-last-htab' ) : '',
94
+ activate: function( tab ) {
95
+ if ( ! $( '#wpr-global-options' ).length ) {
96
+ return;
97
+ }
98
+ Cookies.set( 'wpr-last-htab', tab );
99
+ }
100
+ });
101
+ };
102
+
103
+ wpreview.pluginOptions = function() {
104
+
105
+ // Custom comment color.
106
+ $( '#wp_review_custom_comment_colors' ).on( 'switch-on', function() {
107
+ $('#wp_review_comment_color_wrapper').show();
108
+ });
109
+ $( '#wp_review_custom_comment_colors' ).on( 'switch-off', function() {
110
+ $('#wp_review_comment_color_wrapper').hide();
111
+ });
112
+ };
113
+
114
+ wpreview.pluginMetaBoxes = function() {
115
+
116
+ // Custom location.
117
+ $( '#wp_review_custom_location' ).on( 'switch-on', function() {
118
+ $('.wp-review-location-options').show();
119
+ });
120
+ $( '#wp_review_custom_location' ).on( 'switch-off', function() {
121
+ $('.wp-review-location-options').hide();
122
+ });
123
+
124
+ // Custom colors.
125
+ $( '#wp_review_custom_colors' ).on( 'switch-on', function() {
126
+ $('.wp-review-color-options').show();
127
+ });
128
+ $( '#wp_review_custom_colors' ).on( 'switch-off', function() {
129
+ $('.wp-review-color-options').hide();
130
+ });
131
+
132
+ // Custom width.
133
+ $( '#wp_review_custom_width' ).on( 'switch-on', function() {
134
+ $('.wp-review-width-options').show();
135
+ });
136
+ $( '#wp_review_custom_width' ).on( 'switch-off', function() {
137
+ $('.wp-review-width-options').hide();
138
+ });
139
+
140
+ // Custom author.
141
+ $( '#wp_review_custom_author' ).on( 'switch-on', function() {
142
+ $('.wp-review-author-options').show();
143
+ });
144
+ $( '#wp_review_custom_author' ).on( 'switch-off', function() {
145
+ $('.wp-review-author-options').hide();
146
+ });
147
+
148
+ // Hide description.
149
+ $( '#wp_review_hide_desc' ).on( 'switch-on', function() {
150
+ $( '#wp_review_desc_settings' ).fadeOut();
151
+ });
152
+ $( '#wp_review_hide_desc' ).on( 'switch-off', function() {
153
+ $( '#wp_review_desc_settings' ).fadeIn();
154
+ });
155
+
156
+ // Disable features.
157
+ $( '#wp_review_disable_features' ).on( 'switch-on', function() {
158
+ $( '#wpr-review-items-app' ).fadeOut();
159
+ });
160
+ $( '#wp_review_disable_features' ).on( 'switch-off', function() {
161
+ $( '#wpr-review-items-app' ).fadeIn();
162
+ });
163
+
164
+ // User reviews.
165
+ $( '#wp-review-userReview-disable' ).on( 'change', function() {
166
+ var $postbox = $( this ).closest( '.postbox' );
167
+ if ( $(this)[0].checked ) {
168
+ $postbox.find( '.show-if-comment, .show-if-visitor, .show-if-both' ).hide();
169
+ $postbox.find( '.show-if-disabled' ).show();
170
+ }
171
+ });
172
+ $( '#wp-review-userReview-visitor' ).on( 'change', function() {
173
+ var $postbox = $( this ).closest( '.postbox' );
174
+ if ( $(this)[0].checked ) {
175
+ $postbox.find( '.show-if-comment, .show-if-disabled' ).hide();
176
+ $postbox.find( '.show-if-visitor, .show-if-both' ).show();
177
+ }
178
+ });
179
+ $( '#wp-review-userReview-comment' ).on( 'change', function() {
180
+ var $postbox = $( this ).closest( '.postbox' );
181
+ if ( $(this)[0].checked ) {
182
+ $postbox.find( '.show-if-visitor, .show-if-disabled' ).hide();
183
+ $postbox.find( '.show-if-comment, .show-if-both' ).show();
184
+ }
185
+ });
186
+ $( '#wp-review-userReview-both' ).on( 'change', function() {
187
+ var $postbox = $( this ).closest( '.postbox' );
188
+ if ( $(this)[0].checked ) {
189
+ $postbox.find( '.show-if-disabled' ).hide();
190
+ $postbox.find( '.show-if-comment, .show-if-visitor, .show-if-both' ).show();
191
+ }
192
+ });
193
+
194
+ var richSnippetSelect = $('#rank_math_rich_snippet');
195
+
196
+ $( document ).on( 'change', 'select#wp_review_schema', function() {
197
+ var $this = $( this ),
198
+ value = $this.val(),
199
+ targetSelector = '#wp_review_schema_type_' + value;
200
+
201
+ $( '.wp_review_schema_type_options' ).hide();
202
+ $( '#wp_review_schema_type_options_wrap' ).hide();
203
+
204
+ if ( value ) {
205
+ $( targetSelector ).show();
206
+ if ( 'none' !== value ) {
207
+ $( '#wp_review_schema_type_options_wrap' ).show();
208
+
209
+ if(richSnippetSelect.length)
210
+ richSnippetSelect.val('off').trigger('change');
211
+ }
212
+ }
213
+
214
+ });
215
+
216
+ if(richSnippetSelect.length) {
217
+
218
+ var wpReviewSchemaSelect = $('select#wp_review_schema');
219
+
220
+ if(wpReviewSchemaSelect.val() !== 'none') {
221
+ richSnippetSelect.val('off').trigger('change');
222
+ }
223
+
224
+ richSnippetSelect.on( 'change', function() {
225
+ if( 'off' !== $(this).val() ) {
226
+ wpReviewSchemaSelect.val( 'none' ).trigger( 'change' );
227
+ }
228
+ }).trigger( 'change' );
229
+ }
230
+
231
+ $( document ).on( 'change', '#wp_review_rating_schema', function() {
232
+ var value = $( this ).val();
233
+ if ( 'author' === value ) {
234
+ $( '#wp_review_schema_author_wrapper' ).show();
235
+ } else {
236
+ $( '#wp_review_schema_author_wrapper' ).hide();
237
+ }
238
+ });
239
+
240
+ /**
241
+ * Toggle meta box
242
+ */
243
+ $( '#wp-review-metabox-item' ).hide();
244
+ $( '#wp-review-metabox-heading' ).hide();
245