Version Description
- Embedded full video tutorial
Download this release
Release Info
Developer | MyThemeShop |
Plugin | WP Review |
Version | 4.0.6 |
Comparing to | |
See all releases |
Code changes from version 4.0.5 to 4.0.6
- admin/options.php +50 -5
- assets/js/admin.js +2 -1
- includes/functions.php +2 -1
- readme.txt +4 -1
- wp-review.php +13 -4
admin/options.php
CHANGED
@@ -43,13 +43,12 @@ function wpreview_settings_page() {
|
|
43 |
'default_link_urls' => array(),
|
44 |
'default_schema_type' => 'Thing',
|
45 |
'default_user_review_type' => WP_REVIEW_REVIEW_DISABLED,
|
46 |
-
'
|
47 |
);
|
48 |
// set defaults
|
49 |
if (empty($options)) {
|
50 |
update_option( 'wp_review_options', $options = $default_options );
|
51 |
}
|
52 |
-
if (empty($options['image_sizes'])) $options['image_sizes'] = array();
|
53 |
|
54 |
$opt_name = 'wp_review_options_'.wp_get_theme();
|
55 |
$options_updated = get_option( $opt_name );
|
@@ -116,6 +115,7 @@ function wpreview_settings_page() {
|
|
116 |
$bordercolor = ! empty($options['colors']['bordercolor']) ? $options['colors']['bordercolor'] : '';
|
117 |
$registered_only = ! empty( $options['registered_only'] ) ? $options['registered_only'] : '';
|
118 |
$add_backlink = ! empty( $options['add_backlink'] ) ? true : false;
|
|
|
119 |
if ( $items == '' ) $items = $defaultItems;
|
120 |
if( $color == '' ) $color = $defaultColors['color'];
|
121 |
if( $location == '' ) $location = $defaultLocation;
|
@@ -141,6 +141,7 @@ function wpreview_settings_page() {
|
|
141 |
<div class="nav-tab-wrapper">
|
142 |
<a href="#styling" class="nav-tab nav-tab-active" data-tab="styling"><?php _e('Styling', 'wp-review'); ?></a>
|
143 |
<a href="#defaults" class="nav-tab" data-tab="defaults"><?php _e('Defaults', 'wp-review'); ?></a>
|
|
|
144 |
<a href="#pro" class="nav-tab" data-tab="pro"><?php _e('Pro', 'wp-review'); ?></a>
|
145 |
<?php if ( $rows_left ) : ?>
|
146 |
<a href="#migrate" class="nav-tab" data-tab="migrate"><?php _e('Migrate Ratings', 'wp-review'); ?></a>
|
@@ -179,7 +180,10 @@ function wpreview_settings_page() {
|
|
179 |
<label for="wp_review_bordercolor"><?php _e( 'Border Color', 'wp-review' ); ?></label>
|
180 |
<input type="text" class="wp-review-color" name="wp_review_options[colors][bordercolor]" id="wp_review_bordercolor" value="<?php echo $bordercolor; ?>" />
|
181 |
</p>
|
|
|
|
|
182 |
</div>
|
|
|
183 |
<p class="wp-review-field">
|
184 |
<?php
|
185 |
$backlink_text = wp_review_get_backlink();
|
@@ -188,6 +192,12 @@ function wpreview_settings_page() {
|
|
188 |
<input name="wp_review_options[add_backlink]" id="wp_review_add_backlink" type="checkbox" value="1" <?php checked( $add_backlink, '1' ); ?> />
|
189 |
<label for="wp_review_add_backlink" style="width: 300px;"><?php printf(__( 'Add Backlink (%s)', 'wp-review' ), $backlink_text); ?></label>
|
190 |
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
191 |
|
192 |
</div>
|
193 |
<div class="settings-tab-defaults">
|
@@ -257,12 +267,49 @@ function wpreview_settings_page() {
|
|
257 |
</td>
|
258 |
</tr>
|
259 |
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
260 |
</div>
|
|
|
261 |
<div class="settings-tab-pro">
|
262 |
<p>
|
263 |
<?php _e('Create Reviews Easily & Rank Higher In Search Engines', 'wp-review'); ?> - <a target="_blank" href="https://mythemeshop.com/plugins/wp-review-pro/?utm_source=WP+Review&utm_medium=Notification+Link&utm_content=WP+Review+Pro+LP&utm_campaign=WordPressOrg"><strong><?php _e('WP Review Pro Plugin', 'wp-review'); ?></strong></a>
|
264 |
</p>
|
|
|
|
|
|
|
|
|
265 |
</div>
|
|
|
266 |
<?php if ( $rows_left ) : ?>
|
267 |
<div class="settings-tab-migrate">
|
268 |
<div id="settings-allow-migrate">
|
@@ -278,9 +325,7 @@ function wpreview_settings_page() {
|
|
278 |
</div>
|
279 |
|
280 |
|
281 |
-
|
282 |
-
<input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
|
283 |
-
</p>
|
284 |
|
285 |
</form>
|
286 |
</div>
|
43 |
'default_link_urls' => array(),
|
44 |
'default_schema_type' => 'Thing',
|
45 |
'default_user_review_type' => WP_REVIEW_REVIEW_DISABLED,
|
46 |
+
'last_tab' => 'styling',
|
47 |
);
|
48 |
// set defaults
|
49 |
if (empty($options)) {
|
50 |
update_option( 'wp_review_options', $options = $default_options );
|
51 |
}
|
|
|
52 |
|
53 |
$opt_name = 'wp_review_options_'.wp_get_theme();
|
54 |
$options_updated = get_option( $opt_name );
|
115 |
$bordercolor = ! empty($options['colors']['bordercolor']) ? $options['colors']['bordercolor'] : '';
|
116 |
$registered_only = ! empty( $options['registered_only'] ) ? $options['registered_only'] : '';
|
117 |
$add_backlink = ! empty( $options['add_backlink'] ) ? true : false;
|
118 |
+
$last_tab = ! empty( $options['last_tab'] ) ? $options['last_tab'] : 'styling' ;
|
119 |
if ( $items == '' ) $items = $defaultItems;
|
120 |
if( $color == '' ) $color = $defaultColors['color'];
|
121 |
if( $location == '' ) $location = $defaultLocation;
|
141 |
<div class="nav-tab-wrapper">
|
142 |
<a href="#styling" class="nav-tab nav-tab-active" data-tab="styling"><?php _e('Styling', 'wp-review'); ?></a>
|
143 |
<a href="#defaults" class="nav-tab" data-tab="defaults"><?php _e('Defaults', 'wp-review'); ?></a>
|
144 |
+
<a href="#help" class="nav-tab" data-tab="help"><?php _e('Help', 'wp-review'); ?></a>
|
145 |
<a href="#pro" class="nav-tab" data-tab="pro"><?php _e('Pro', 'wp-review'); ?></a>
|
146 |
<?php if ( $rows_left ) : ?>
|
147 |
<a href="#migrate" class="nav-tab" data-tab="migrate"><?php _e('Migrate Ratings', 'wp-review'); ?></a>
|
180 |
<label for="wp_review_bordercolor"><?php _e( 'Border Color', 'wp-review' ); ?></label>
|
181 |
<input type="text" class="wp-review-color" name="wp_review_options[colors][bordercolor]" id="wp_review_bordercolor" value="<?php echo $bordercolor; ?>" />
|
182 |
</p>
|
183 |
+
|
184 |
+
|
185 |
</div>
|
186 |
+
|
187 |
<p class="wp-review-field">
|
188 |
<?php
|
189 |
$backlink_text = wp_review_get_backlink();
|
192 |
<input name="wp_review_options[add_backlink]" id="wp_review_add_backlink" type="checkbox" value="1" <?php checked( $add_backlink, '1' ); ?> />
|
193 |
<label for="wp_review_add_backlink" style="width: 300px;"><?php printf(__( 'Add Backlink (%s)', 'wp-review' ), $backlink_text); ?></label>
|
194 |
</p>
|
195 |
+
|
196 |
+
<p class="submit">
|
197 |
+
<input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
|
198 |
+
</p>
|
199 |
+
|
200 |
+
<input name="wp_review_options[last_tab]" id="wp_review_last_tab" type="hidden" value="<?php echo esc_attr($last_tab); ?>" />
|
201 |
|
202 |
</div>
|
203 |
<div class="settings-tab-defaults">
|
267 |
</td>
|
268 |
</tr>
|
269 |
</table>
|
270 |
+
|
271 |
+
<p class="submit">
|
272 |
+
<input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
|
273 |
+
</p>
|
274 |
+
|
275 |
+
</div>
|
276 |
+
|
277 |
+
<div class="settings-tab-help">
|
278 |
+
<p>
|
279 |
+
<object type="application/x-shockwave-flash" style="width:450px; height:366px;" data="//www.youtube.com/v/NzMe-QY_WZY?version=3">
|
280 |
+
<param name="movie" value="//www.youtube.com/v/NzMe-QY_WZY?version=3" />
|
281 |
+
<param name="allowFullScreen" value="true" />
|
282 |
+
<param name="allowscriptaccess" value="always" />
|
283 |
+
</object>
|
284 |
+
</p>
|
285 |
+
<p>
|
286 |
+
<?php _e('All support for this plugin is provided through our forums. If you have not registered yet, you can do so here for <strong>FREE</strong>: ', 'wp-review'); ?>
|
287 |
+
<a target="_blank" href="https://mythemeshop.com/#signup">https://mythemeshop.com/#signup</a>
|
288 |
+
</p>
|
289 |
+
<p>
|
290 |
+
<?php _e('Check our free WordPress video tutorials here: ', 'wp-review'); ?>
|
291 |
+
<a target="_blank" href="https://mythemeshop.com/wordpress-101/">https://mythemeshop.com/wordpress-101/</a>
|
292 |
+
<?php _e('(no registration required)', 'wp-review'); ?>
|
293 |
+
</p>
|
294 |
+
<p>
|
295 |
+
<?php _e('Thank you for using our plugin.', 'wp-review'); ?>
|
296 |
+
</p>
|
297 |
+
|
298 |
+
<p class="submit">
|
299 |
+
<a href="https://mythemeshop.com/#login" target="_blank" class="button-primary"><?php _e('Get Support for Free') ?></a>
|
300 |
+
</p>
|
301 |
</div>
|
302 |
+
|
303 |
<div class="settings-tab-pro">
|
304 |
<p>
|
305 |
<?php _e('Create Reviews Easily & Rank Higher In Search Engines', 'wp-review'); ?> - <a target="_blank" href="https://mythemeshop.com/plugins/wp-review-pro/?utm_source=WP+Review&utm_medium=Notification+Link&utm_content=WP+Review+Pro+LP&utm_campaign=WordPressOrg"><strong><?php _e('WP Review Pro Plugin', 'wp-review'); ?></strong></a>
|
306 |
</p>
|
307 |
+
|
308 |
+
<p class="submit">
|
309 |
+
<a href="https://mythemeshop.com/plugins/wp-review-pro/?utm_source=WP+Review&utm_medium=Link+CPC&utm_content=WP+Review+Pro+LP&utm_campaign=WordPressOrg" target="_blank" class="button-primary"><?php _e('Check the Pro Version') ?></a>
|
310 |
+
</p>
|
311 |
</div>
|
312 |
+
|
313 |
<?php if ( $rows_left ) : ?>
|
314 |
<div class="settings-tab-migrate">
|
315 |
<div id="settings-allow-migrate">
|
325 |
</div>
|
326 |
|
327 |
|
328 |
+
|
|
|
|
|
329 |
|
330 |
</form>
|
331 |
</div>
|
assets/js/admin.js
CHANGED
@@ -256,7 +256,7 @@ jQuery(document).ready(function($) {
|
|
256 |
$('#wp-review-settings-tab-contents').find('.settings-tab-'+$this.data('tab')).show().siblings().hide();
|
257 |
});*/
|
258 |
var hash = window.location.hash.substr(1);
|
259 |
-
if (hash == '') hash = '
|
260 |
if ($('#wp-review-settings-tab-contents').find('.settings-tab-'+hash).length) {
|
261 |
$('.wrap.wp-review .nav-tab-wrapper .nav-tab').filter('[data-tab='+hash+']').addClass('nav-tab-active').siblings().removeClass('nav-tab-active');
|
262 |
$('#wp-review-settings-tab-contents').find('.settings-tab-'+hash).show().siblings().hide();
|
@@ -266,6 +266,7 @@ jQuery(document).ready(function($) {
|
|
266 |
if ($('#wp-review-settings-tab-contents').find('.settings-tab-'+hash).length) {
|
267 |
$('.wrap.wp-review .nav-tab-wrapper .nav-tab').filter('[data-tab='+hash+']').addClass('nav-tab-active').siblings().removeClass('nav-tab-active');
|
268 |
$('#wp-review-settings-tab-contents').find('.settings-tab-'+hash).show().siblings().hide();
|
|
|
269 |
}
|
270 |
});
|
271 |
if ($('#wp-review-migrate-log').length) {
|
256 |
$('#wp-review-settings-tab-contents').find('.settings-tab-'+$this.data('tab')).show().siblings().hide();
|
257 |
});*/
|
258 |
var hash = window.location.hash.substr(1);
|
259 |
+
if (hash == '') hash = $('#wp_review_last_tab').val();
|
260 |
if ($('#wp-review-settings-tab-contents').find('.settings-tab-'+hash).length) {
|
261 |
$('.wrap.wp-review .nav-tab-wrapper .nav-tab').filter('[data-tab='+hash+']').addClass('nav-tab-active').siblings().removeClass('nav-tab-active');
|
262 |
$('#wp-review-settings-tab-contents').find('.settings-tab-'+hash).show().siblings().hide();
|
266 |
if ($('#wp-review-settings-tab-contents').find('.settings-tab-'+hash).length) {
|
267 |
$('.wrap.wp-review .nav-tab-wrapper .nav-tab').filter('[data-tab='+hash+']').addClass('nav-tab-active').siblings().removeClass('nav-tab-active');
|
268 |
$('#wp-review-settings-tab-contents').find('.settings-tab-'+hash).show().siblings().hide();
|
269 |
+
$('#wp_review_last_tab').val(hash);
|
270 |
}
|
271 |
});
|
272 |
if ($('#wp-review-migrate-log').length) {
|
includes/functions.php
CHANGED
@@ -1356,7 +1356,8 @@ function wp_review_admin_notice() {
|
|
1356 |
global $current_user ;
|
1357 |
$user_id = $current_user->ID;
|
1358 |
/* Check that the user hasn't already clicked to ignore the message */
|
1359 |
-
|
|
|
1360 |
echo '<div class="updated notice-info wp-review-notice" id="wpreview-notice" style="position:relative;">';
|
1361 |
printf(__('<p>Create Reviews Easily & Rank Higher In Search Engines - <a target="_blank" href="https://mythemeshop.com/plugins/wp-review-pro/?utm_source=WP+Review&utm_medium=Notification+Link&utm_content=WP+Review+Pro+LP&utm_campaign=WordPressOrg"><strong>WP Review Pro Plugin</strong></a></p><a class="notice-dismiss" href="%1$s"></a>'), '?wp_review_admin_notice_ignore=0');
|
1362 |
echo "</div>";
|
1356 |
global $current_user ;
|
1357 |
$user_id = $current_user->ID;
|
1358 |
/* Check that the user hasn't already clicked to ignore the message */
|
1359 |
+
/* Only show the notice 2 days after plugin activation */
|
1360 |
+
if ( ! get_user_meta($user_id, 'wp_review_ignore_notice') && time() >= (get_option( 'wp_review_activated', 0 ) + (2 * 24 * 60 * 60)) ) {
|
1361 |
echo '<div class="updated notice-info wp-review-notice" id="wpreview-notice" style="position:relative;">';
|
1362 |
printf(__('<p>Create Reviews Easily & Rank Higher In Search Engines - <a target="_blank" href="https://mythemeshop.com/plugins/wp-review-pro/?utm_source=WP+Review&utm_medium=Notification+Link&utm_content=WP+Review+Pro+LP&utm_campaign=WordPressOrg"><strong>WP Review Pro Plugin</strong></a></p><a class="notice-dismiss" href="%1$s"></a>'), '?wp_review_admin_notice_ignore=0');
|
1363 |
echo "</div>";
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Creator's website link: http://mythemeshop.com/plugins/wp-review/
|
|
4 |
Tags: review, wp review, rating, wp rating, user rating, google rating, star rating, product review
|
5 |
Requires at least: 3.0.1
|
6 |
Tested up to: 4.4
|
7 |
-
Stable tag: 4.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -107,6 +107,9 @@ Please disable all plugins and check if rating is working properly. Then you can
|
|
107 |
|
108 |
== Changelog ==
|
109 |
|
|
|
|
|
|
|
110 |
= 4.0.5 =
|
111 |
* Fixed: final rating can now be entered manually again
|
112 |
* Fixed: removed unneeded code related to circle review type
|
4 |
Tags: review, wp review, rating, wp rating, user rating, google rating, star rating, product review
|
5 |
Requires at least: 3.0.1
|
6 |
Tested up to: 4.4
|
7 |
+
Stable tag: 4.0.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
107 |
|
108 |
== Changelog ==
|
109 |
|
110 |
+
= 4.0.6 =
|
111 |
+
* Embedded full video tutorial
|
112 |
+
|
113 |
= 4.0.5 =
|
114 |
* Fixed: final rating can now be entered manually again
|
115 |
* Fixed: removed unneeded code related to circle review type
|
wp-review.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: WP Review
|
4 |
* Plugin URI: http://mythemeshop.com/plugins/wp-review/
|
5 |
* Description: Create reviews! Choose from stars, percentages or points for review scores. Supports Retina Display, WPMU and Unlimited Color Schemes.
|
6 |
-
* Version: 4.0.
|
7 |
* Author: MyThemesShop
|
8 |
* Author URI: http://mythemeshop.com/
|
9 |
*
|
@@ -20,13 +20,14 @@ if ( ! defined( 'ABSPATH' ) ) exit;
|
|
20 |
if ( ! defined( 'MTS_WP_REVIEW_DB_TABLE' )) {
|
21 |
|
22 |
/* Plugin version */
|
23 |
-
define( 'WP_REVIEW_PLUGIN_VERSION', '4.0.
|
24 |
|
25 |
/* Sets the custom db table name. */
|
26 |
define( 'MTS_WP_REVIEW_DB_TABLE', 'mts_wp_reviews' );
|
27 |
|
28 |
/* When plugin is activated */
|
29 |
register_activation_hook( __FILE__, 'wp_review_activation' );
|
|
|
30 |
|
31 |
/* Defines constants used by the plugin. */
|
32 |
add_action( 'plugins_loaded', 'wp_review_constants', 1 );
|
@@ -110,8 +111,16 @@ if ( ! defined( 'MTS_WP_REVIEW_DB_TABLE' )) {
|
|
110 |
|
111 |
function wp_review_activation(){
|
112 |
/* Loads activation functions */
|
113 |
-
|
114 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
}
|
116 |
|
117 |
}
|
3 |
* Plugin Name: WP Review
|
4 |
* Plugin URI: http://mythemeshop.com/plugins/wp-review/
|
5 |
* Description: Create reviews! Choose from stars, percentages or points for review scores. Supports Retina Display, WPMU and Unlimited Color Schemes.
|
6 |
+
* Version: 4.0.6
|
7 |
* Author: MyThemesShop
|
8 |
* Author URI: http://mythemeshop.com/
|
9 |
*
|
20 |
if ( ! defined( 'MTS_WP_REVIEW_DB_TABLE' )) {
|
21 |
|
22 |
/* Plugin version */
|
23 |
+
define( 'WP_REVIEW_PLUGIN_VERSION', '4.0.6' );
|
24 |
|
25 |
/* Sets the custom db table name. */
|
26 |
define( 'MTS_WP_REVIEW_DB_TABLE', 'mts_wp_reviews' );
|
27 |
|
28 |
/* When plugin is activated */
|
29 |
register_activation_hook( __FILE__, 'wp_review_activation' );
|
30 |
+
add_action('admin_init', 'wp_review_settings_redirect');
|
31 |
|
32 |
/* Defines constants used by the plugin. */
|
33 |
add_action( 'plugins_loaded', 'wp_review_constants', 1 );
|
111 |
|
112 |
function wp_review_activation(){
|
113 |
/* Loads activation functions */
|
114 |
+
add_option('wp_review_do_activation_redirect', true);
|
115 |
+
update_option('wp_review_activated', time());
|
116 |
+
}
|
117 |
+
|
118 |
+
function wp_review_settings_redirect() {
|
119 |
+
if (get_option('wp_review_do_activation_redirect', false)) {
|
120 |
+
delete_option('wp_review_do_activation_redirect');
|
121 |
+
wp_redirect('options-general.php?page=wp-review%2Fadmin%2Foptions.php#help');
|
122 |
+
exit;
|
123 |
+
}
|
124 |
}
|
125 |
|
126 |
}
|