Yasr – Yet Another Stars Rating - Version 1.1.0

Version Description

  • Yasr is not anymore a freemium plugin: it works now with extensions that you can be installed through the settings panel
Download this release

Release Info

Developer Dudo
Plugin Icon 128x128 Yasr – Yet Another Stars Rating
Version 1.1.0
Comparing to
See all releases

Code changes from version 1.0.7 to 1.1.0

css/yasr-admin.css CHANGED
@@ -556,20 +556,65 @@ div.bigstars .rateit-selected
556
text-align: center;
557
}
558
559
- #yasr-info-pro-version {
560
text-align: center;
561
- font-size: x-large;
562
- margin-top: 15px;
563
}
564
565
- /* START COMPARISON TABLE STYLES */
566
- #comparetable {width: 70%; table-layout: fixed; text-align: center; margin: 4em 0; border-collapse: collapse; }
567
- #comparetable tr {background: transparent!important;}
568
- #comparetable td,
569
- #comparetable th {padding: 15px; text-align: center;}
570
- #comparetable td.rowTitle {text-align: left;}
571
- .blank {background: none!important; border: none!important;}
572
- .softgreen th {background-color: #84db7b; font-size: 20px; color: #253a22; text-align: center; font-weight: 600; border: 1px solid #85aa81;}
573
- .softgreen td {background-color: #f0f1f1; border: 1px solid #bed5bb;}
574
- .softgreen td.rowTitle {font-weight: 600;}
575
- /* END COMPARISON TABLE STYLES */
556
text-align: center;
557
}
558
559
+ /**** Extensions tab ****/
560
+
561
+ .yasr-extensionsdiv {
562
+
563
+ float:left;
564
+ display:block;
565
+ width:90%;
566
+ background-color:#FFF;
567
+ border: 1px solid #DDD;
568
+ padding-left: 25px;
569
+ padding-right: 25px;
570
+ padding-bottom: 10px;
571
+
572
+ }
573
+
574
+ .yasr-extension {
575
+ float: left;
576
+ margin: 0px 15px 15px 0px;
577
+ background: #FFF none repeat scroll 0% 0%;
578
+ border: 1px solid #CCC;
579
+ width: 300px;
580
+ min-height: 300px;
581
+ padding: 14px;
582
+ position: relative;
583
+ border-radius: 10px;
584
+
585
+ }
586
+
587
+ .yasr-extension-title {
588
+
589
+ display: block;
590
text-align: center;
591
+ font-size:16px;
592
+ font-weight: bold;
593
+ margin-bottom: 15px;
594
+
595
+ }
596
+
597
+ .yasr-extension-image {
598
+
599
+ display: block;
600
+ margin: 0 auto;
601
+ width: 160px;
602
+ height: 160px;
603
+
604
}
605
606
+ .yasr-extension-image-no-width{
607
+
608
+ display: block;
609
+ margin: 0 auto;
610
+ height: 160px;
611
+
612
+ }
613
+
614
+ .yasr-extension-description {
615
+
616
+ margin-top: 15px;
617
+ font-size: 13px;
618
+ display: block;
619
+
620
+ }
img/addCheck.png DELETED
Binary file
img/addExclamation.png DELETED
Binary file
img/addRedX2.png DELETED
Binary file
img/create-ranking.png ADDED
Binary file
img/yasr-custom-image.png ADDED
Binary file
img/yasr-user-reviews.png ADDED
Binary file
js/yasr-admin.js CHANGED
@@ -567,24 +567,24 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
567
568
function yasrShortcodeCreator(nMultiSet) {
569
570
- jQuery('#yasr-link-tab-charts').on("click", function(){
571
572
- jQuery('#yasr-link-tab-main').removeClass('nav-tab-active');
573
- jQuery('#yasr-link-tab-charts').addClass('nav-tab-active');
574
575
- jQuery('#yasr-content-tab-main').hide();
576
- jQuery('#yasr-content-tab-charts').show();
577
578
- });
579
580
- // When click on main tab hide tab-main and show tab-charts
581
- jQuery('#yasr-link-tab-main').on("click", function(){
582
583
- jQuery('#yasr-link-tab-charts').removeClass('nav-tab-active');
584
- jQuery('#yasr-link-tab-main').addClass('nav-tab-active');
585
586
- jQuery('#yasr-content-tab-charts').hide();
587
- jQuery('#yasr-content-tab-main').show();
588
589
});
590
567
568
function yasrShortcodeCreator(nMultiSet) {
569
570
+ // When click on main tab hide tab-main and show tab-charts
571
+ jQuery('#yasr-link-tab-main').on("click", function(){
572
573
+ jQuery('.yasr-nav-tab').removeClass('nav-tab-active');
574
+ jQuery('#yasr-link-tab-main').addClass('nav-tab-active');
575
576
+ jQuery('.yasr-content-tab-tinymce').hide();
577
+ jQuery('#yasr-content-tab-main').show();
578
579
+ });
580
581
+ jQuery('#yasr-link-tab-charts').on("click", function(){
582
583
+ jQuery('.yasr-nav-tab').removeClass('nav-tab-active');
584
+ jQuery('#yasr-link-tab-charts').addClass('nav-tab-active');
585
586
+ jQuery('.yasr-content-tab-tinymce').hide();
587
+ jQuery('#yasr-content-tab-charts').show();
588
589
});
590
languages/yet-another-stars-rating.mo CHANGED
Binary file
languages/yet-another-stars-rating.pot CHANGED
@@ -2,7 +2,7 @@ msgid ""
2
msgstr ""
3
"Project-Id-Version: YASR lenguages\n"
4
"POT-Creation-Date: 2015-10-28 13:42+0100\n"
5
- "PO-Revision-Date: 2015-10-28 13:42+0100\n"
6
"Last-Translator: Dario <thedudoworld@gmail.com>\n"
7
"Language-Team: \n"
8
"Language: En\n"
2
msgstr ""
3
"Project-Id-Version: YASR lenguages\n"
4
"POT-Creation-Date: 2015-10-28 13:42+0100\n"
5
+ "PO-Revision-Date: 2015-12-15 12:52+0100\n"
6
"Last-Translator: Dario <thedudoworld@gmail.com>\n"
7
"Language-Team: \n"
8
"Language: En\n"
lib/yasr-admin-actions.php CHANGED
@@ -29,41 +29,6 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
29
}
30
31
32
- /****** Settings Pages ******/
33
-
34
- //add tab on settings page
35
- add_action( 'yasr_add_settings_tab', 'yasr_free_settings_tab');
36
-
37
- function yasr_free_settings_tab ($active_tab) {
38
-
39
- ?>
40
-
41
- <a href="?page=yasr_settings_page&tab=go_pro" class="nav-tab <?php if ($active_tab == 'go_pro') echo 'nav-tab-active'; ?>" > <?php _e("Pro Features!", 'yet-another-stars-rating'); ?> </a>
42
-
43
- <?php
44
- }
45
-
46
-
47
- //content of the bottom in the settings tab
48
- add_action( 'yasr_settings_check_active_tab', 'yasr_free_check_active_tab' );
49
-
50
- function yasr_free_check_active_tab ($active_tab) {
51
-
52
- if ($active_tab == 'go_pro') {
53
-
54
- yasr_go_pro();
55
-
56
- yasr_fb_box ();
57
-
58
- yasr_ask_rating ();
59
-
60
- }
61
-
62
- }
63
-
64
-
65
- /****** End Settings Pages ******/
66
-
67
//Always return False
68
add_filter( 'yasr_filter_schema_microdata', 'yasr_filter_schema_microdata_callback');
69
29
}
30
31
32
//Always return False
33
add_filter( 'yasr_filter_schema_microdata', 'yasr_filter_schema_microdata_callback');
34
lib/yasr-ajax-functions.php CHANGED
@@ -476,15 +476,15 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
476
<div id="yasr-tinypopup-form">
477
478
<h2 class="nav-tab-wrapper yasr-underline">
479
- <a href="#" id="yasr-link-tab-main" class="nav-tab nav-tab-active"><?php _e("Main", 'yet-another-stars-rating'); ?></a>
480
- <a href="#" id="yasr-link-tab-charts" class="nav-tab"><?php _e("Charts" , 'yet-another-stars-rating'); ?></a>
481
<?php do_action( 'yasr_add_tabs_on_tinypopupform'); ?>
482
483
<a href="https://yetanotherstarsrating.com/f-a-q/" target="_blank" id="yasr-tinypopup-link-doc"><?php _e("Read the doc", 'yet-another-stars-rating'); ?></a>
484
485
</h2>
486
487
- <div id="yasr-content-tab-main">
488
489
<table id="yasr-table-tiny-popup-main" class="form-table">
490
@@ -564,7 +564,7 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
564
565
</div>
566
567
- <div id="yasr-content-tab-charts" style="display:none">
568
569
<table id="yasr-table-tiny-popup-charts" class="form-table">
570
<tr>
476
<div id="yasr-tinypopup-form">
477
478
<h2 class="nav-tab-wrapper yasr-underline">
479
+ <a href="#" id="yasr-link-tab-main" class="nav-tab nav-tab-active yasr-nav-tab"><?php _e("Main", 'yet-another-stars-rating'); ?></a>
480
+ <a href="#" id="yasr-link-tab-charts" class="nav-tab yasr-nav-tab"><?php _e("Charts" , 'yet-another-stars-rating'); ?></a>
481
<?php do_action( 'yasr_add_tabs_on_tinypopupform'); ?>
482
483
<a href="https://yetanotherstarsrating.com/f-a-q/" target="_blank" id="yasr-tinypopup-link-doc"><?php _e("Read the doc", 'yet-another-stars-rating'); ?></a>
484
485
</h2>
486
487
+ <div id="yasr-content-tab-main" class="yasr-content-tab-tinymce">
488
489
<table id="yasr-table-tiny-popup-main" class="form-table">
490
564
565
</div>
566
567
+ <div id="yasr-content-tab-charts" class="yasr-content-tab-tinymce" style="display:none">
568
569
<table id="yasr-table-tiny-popup-charts" class="form-table">
570
<tr>
lib/yasr-functions.php CHANGED
@@ -28,10 +28,9 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
28
29
function yasr_add_scripts () {
30
31
- do_action( 'yasr_add_front_script_css' );
32
33
-
34
- wp_enqueue_style( 'yasrcss', YASR_CSS_DIR . 'yasr.css', FALSE, NULL, 'all' );
35
36
//If choosen is light or not dark (force to be default)
37
if (YASR_SCHEME_COLOR === 'light' || YASR_SCHEME_COLOR != 'dark' ) {
@@ -46,13 +45,13 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
46
wp_add_inline_style( 'yasrcss', YASR_CUSTOM_CSS_RULES );
47
}
48
49
- wp_enqueue_script( 'rateit', YASR_JS_DIR . 'jquery.rateit.min.js' , array('jquery'), '1.0.22', TRUE );
50
51
wp_enqueue_script( 'yasrfront', YASR_JS_DIR . 'yasr-front.js' , array('jquery', 'rateit'), '1.0.0', TRUE );
52
53
do_action('yasr_add_front_script_js');
54
55
- $yasr_visitor_votes_loader = '<div id="loader-visitor-rating" >&nbsp; ' . __("Loading, please wait",'yet-another-stars-rating') . ' <img src=' . YASR_IMG_DIR . '/loader.gif title="yasr-loader" alt="yasr-loader"></div>';
56
57
$tooltip_values = __("bad, poor, ok, good, super", 'yet-another-stars-rating');
58
$tooltip_values_exploded = explode(", ", $tooltip_values);
@@ -72,17 +71,26 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
72
73
}
74
75
- function yasr_add_admin_scripts () {
76
77
- do_action('yasr_add_admin_scripts_begin');
78
79
- wp_enqueue_style( 'yasrcss', YASR_CSS_DIR . 'yasr-admin.css', FALSE, NULL, 'all' );
80
- wp_enqueue_style( 'wp-jquery-ui-dialog' ); //style
81
82
- wp_enqueue_script( 'rateit', YASR_JS_DIR . 'jquery.rateit.min.js' , array('jquery'), '1.0.20', TRUE );
83
- wp_enqueue_script( 'jquery-ui-dialog' ); //script
84
85
- wp_enqueue_script( 'yasradmin', YASR_JS_DIR . 'yasr-admin.js' , array('jquery', 'rateit'), '1.0.00', TRUE );
86
87
88
}
@@ -93,9 +101,9 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
93
94
add_action('init', 'yasr_translate_option', 110);
95
96
- function yasr_translate_option() {
97
- load_plugin_textdomain('yet-another-stars-rating', FALSE, YASR_LANG_DIR);
98
- }
99
100
101
/****** Create a new Page in Administration Menu ******/
@@ -103,26 +111,29 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
103
/* Hook to admin_menu the yasr_add_pages function above */
104
add_action( 'admin_menu', 'yasr_add_pages' );
105
106
- function yasr_add_pages() {
107
108
- //Add Settings Page
109
- add_options_page(
110
- __( 'Yet Another Stars Rating: Settings', 'yet-another-stars-rating' ), //Page Title
111
- __( 'Yet Another Stars Rating: Settings', 'yet-another-stars-rating' ), //Menu Title
112
- 'manage_options', //capability
113
- 'yasr_settings_page', //menu slug
114
- 'yasr_settings_page_callback' //The function to be called to output the content for this page.
115
- );
116
- }
117
118
119
// Settings Page Content
120
function yasr_settings_page_callback () {
121
if ( ! current_user_can( 'manage_options' ) ) {
122
wp_die( __( 'You do not have sufficient permissions to access this page.', 'yet-another-stars-rating' ) );
123
}
124
125
- include(YASR_RELATIVE_PATH . '/yasr-settings-page.php');
126
127
} //End yasr_settings_page_content
128
@@ -164,7 +175,7 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
164
165
function yasr_metabox_overall_rating_content() {
166
if ( current_user_can( 'publish_posts' ) ) {
167
- include (YASR_RELATIVE_PATH . '/yasr-metabox-top-right.php');
168
}
169
else {
170
_e("You don't have enought privileges to insert Overall Rating");
@@ -174,7 +185,7 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
174
175
function yasr_metabox_multiple_rating_content() {
176
if ( current_user_can( 'publish_posts' ) ) {
177
- include (YASR_RELATIVE_PATH . '/yasr-metabox-multiple-rating.php');
178
}
179
else {
180
_e("You don't have enought privileges to insert Multi Set");
28
29
function yasr_add_scripts () {
30
31
+ wp_enqueue_style( 'yasrcss', YASR_CSS_DIR . 'yasr.css', FALSE, NULL, 'all' );
32
33
+ do_action( 'yasr_add_front_script_css' );
34
35
//If choosen is light or not dark (force to be default)
36
if (YASR_SCHEME_COLOR === 'light' || YASR_SCHEME_COLOR != 'dark' ) {
45
wp_add_inline_style( 'yasrcss', YASR_CUSTOM_CSS_RULES );
46
}
47
48
+ wp_enqueue_script( 'rateit', YASR_JS_DIR . 'jquery.rateit.min.js' , array('jquery'), '1.0.22', TRUE );
49
50
wp_enqueue_script( 'yasrfront', YASR_JS_DIR . 'yasr-front.js' , array('jquery', 'rateit'), '1.0.0', TRUE );
51
52
do_action('yasr_add_front_script_js');
53
54
+ $yasr_visitor_votes_loader = '<div id="loader-visitor-rating" >&nbsp; ' . __("Loading, please wait",'yet-another-stars-rating') . ' <img src=' . YASR_IMG_DIR . 'loader.gif title="yasr-loader" alt="yasr-loader"></div>';
55
56
$tooltip_values = __("bad, poor, ok, good, super", 'yet-another-stars-rating');
57
$tooltip_values_exploded = explode(", ", $tooltip_values);
71
72
}
73
74
+ //$hook contain the current page in the admin side
75
+ function yasr_add_admin_scripts ($hook) {
76
+
77
+ global $yasr_settings_page;
78
+
79
+ if($hook == 'index.php' || $hook == 'edit.php' || $hook == 'post.php' || $hook == 'post-new.php' || $hook == $yasr_settings_page) {
80
81
+ do_action('yasr_add_admin_scripts_begin');
82
83
+ wp_enqueue_style( 'yasrcss', YASR_CSS_DIR . 'yasr-admin.css', FALSE, NULL, 'all' );
84
+ wp_enqueue_style( 'wp-jquery-ui-dialog' ); //style
85
86
+ wp_enqueue_script( 'rateit', YASR_JS_DIR . 'jquery.rateit.min.js' , array('jquery'), '1.0.20', TRUE );
87
+ wp_enqueue_script( 'jquery-ui-dialog' ); //script
88
89
+ wp_enqueue_script( 'yasradmin', YASR_JS_DIR . 'yasr-admin.js' , array('jquery', 'rateit'), '1.0.00', TRUE );
90
+
91
+ do_action('yasr_add_admin_scripts_end' );
92
+
93
+ }
94
95
96
}
101
102
add_action('init', 'yasr_translate_option', 110);
103
104
+ function yasr_translate_option() {
105
+ load_plugin_textdomain('yet-another-stars-rating', FALSE, YASR_LANG_DIR);
106
+ }
107
108
109
/****** Create a new Page in Administration Menu ******/
111
/* Hook to admin_menu the yasr_add_pages function above */
112
add_action( 'admin_menu', 'yasr_add_pages' );
113
114
+ function yasr_add_pages() {
115
116
+ global $yasr_settings_page;
117
+
118
+ //Add Settings Page
119
+ $yasr_settings_page = add_options_page(
120
+ __( 'Yet Another Stars Rating: Settings', 'yet-another-stars-rating' ), //Page Title
121
+ __( 'Yet Another Stars Rating: Settings', 'yet-another-stars-rating' ), //Menu Title
122
+ 'manage_options', //capability
123
+ 'yasr_settings_page', //menu slug
124
+ 'yasr_settings_page_callback' //The function to be called to output the content for this page.
125
+ );
126
+ }
127
128
129
// Settings Page Content
130
function yasr_settings_page_callback () {
131
+
132
if ( ! current_user_can( 'manage_options' ) ) {
133
wp_die( __( 'You do not have sufficient permissions to access this page.', 'yet-another-stars-rating' ) );
134
}
135
136
+ include(YASR_ABSOLUTE_PATH . '/yasr-settings-page.php');
137
138
} //End yasr_settings_page_content
139
175
176
function yasr_metabox_overall_rating_content() {
177
if ( current_user_can( 'publish_posts' ) ) {
178
+ include (YASR_ABSOLUTE_PATH . '/yasr-metabox-top-right.php');
179
}
180
else {
181
_e("You don't have enought privileges to insert Overall Rating");
185
186
function yasr_metabox_multiple_rating_content() {
187
if ( current_user_can( 'publish_posts' ) ) {
188
+ include (YASR_ABSOLUTE_PATH . '/yasr-metabox-multiple-rating.php');
189
}
190
else {
191
_e("You don't have enought privileges to insert Multi Set");
lib/yasr-settings-functions.php CHANGED
@@ -1304,7 +1304,30 @@ add_action( 'admin_init', 'yasr_style_options_init' ); //This is for auto insert
1304
1305
add_settings_section( 'yasr_style_options_section_id', __('Style Options', 'yet-another-stars-rating'), 'yasr_style_section_callback', 'yasr_style_tab' );
1306
add_settings_field( 'yasr_color_scheme_multiset', __('Which color scheme do you want to use?', 'yet-another-stars-rating') , 'yasr_color_scheme_multiset_callback', 'yasr_style_tab', 'yasr_style_options_section_id', $style_options);
1307
add_settings_field( 'yasr_style_options_textarea', __('Custom CSS Styles', 'yet-another-stars-rating'), 'yasr_style_options_textarea_callback', 'yasr_style_tab', 'yasr_style_options_section_id', $style_options );
1308
}
1309
1310
function yasr_style_section_callback () {
@@ -1376,104 +1399,6 @@ add_action( 'admin_init', 'yasr_style_options_init' ); //This is for auto insert
1376
}
1377
1378
1379
-
1380
- function yasr_go_pro () {
1381
-
1382
- ?>
1383
-
1384
- <div class="yasr-settingsdiv">
1385
-
1386
- <div id="yasr-info-pro-version">
1387
-
1388
- <?php
1389
-
1390
- _e("Looking for more features?", 'yet-another-stars-rating');
1391
- echo " <a href=\"https://yetanotherstarsrating.com/pro-version/\">" . __("Upgrade to yasr pro!", 'yet-another-stars-rating') . "</a>";
1392
-
1393
- echo "<br>";
1394
-
1395
- ?>
1396
-
1397
- </div>
1398
-
1399
- <table id="comparetable" class="softgreen">
1400
- <tr>
1401
- <td class="blank"> </td>
1402
- <th>Free</th>
1403
- <th>Pro</th>
1404
- </tr>
1405
-
1406
- <tr>
1407
- <td class="rowTitle"><?php _e("Unlimited ratings and votes" , 'yet-another-stars-rating'); ?></td>
1408
- <td><img src=<?php echo YASR_IMG_DIR . '/addCheck.png' ?> alt='icon' /></td>
1409
- <td><img src=<?php echo YASR_IMG_DIR . '/addCheck.png' ?> alt='icon' /></td>
1410
- </tr>
1411
-
1412
- <tr>
1413
- <td class="rowTitle"><?php _e("Works with shortcodes" , 'yet-another-stars-rating'); ?></td>
1414
- <td><img src=<?php echo YASR_IMG_DIR . '/addCheck.png' ?> alt='icon' /></td>
1415
- <td><img src=<?php echo YASR_IMG_DIR . '/addCheck.png' ?> alt='icon' /></td>
1416
- </tr>
1417
-
1418
- <tr>
1419
- <td class="rowTitle"><?php _e("Multi Set Support" , 'yet-another-stars-rating'); ?></td>
1420
- <td><img src=<?php echo YASR_IMG_DIR . '/addCheck.png' ?> alt='icon' /></td>
1421
- <td><img src=<?php echo YASR_IMG_DIR . '/addCheck.png' ?> alt='icon' /></td>
1422
- </tr>
1423
- <tr>
1424
- <td class="rowTitle"><?php _e("Logs and stats for visitors votes" , 'yet-another-stars-rating'); ?></td>
1425
- <td><img src=<?php echo YASR_IMG_DIR . '/addCheck.png' ?> alt='icon' /></td>
1426
- <td><img src=<?php echo YASR_IMG_DIR . '/addCheck.png' ?> alt='icon' /></td>
1427
- </tr>
1428
- <tr>
1429
- <td class="rowTitle"><?php _e("Localization (.po and .mo files included)" , 'yet-another-stars-rating'); ?></td>
1430
- <td><img src=<?php echo YASR_IMG_DIR . '/addCheck.png' ?> alt='icon' /></td>
1431
- <td><img src=<?php echo YASR_IMG_DIR . '/addCheck.png' ?> alt='icon' /></td>
1432
- </tr>
1433
- <tr>
1434
- <td class="rowTitle"><?php _e("Rich Snippet Support" , 'yet-another-stars-rating'); ?></td>
1435
- <td><img src=<?php echo YASR_IMG_DIR . '/addCheck.png' ?> alt='icon' /></td>
1436
- <td><img src=<?php echo YASR_IMG_DIR . '/addCheck.png' ?> alt='icon' /></td>
1437
- </tr>
1438
- <tr>
1439
- <td class="rowTitle"><?php _e("Rankings for reviews, votes and users" , 'yet-another-stars-rating'); ?></td>
1440
- <td><img src=<?php echo YASR_IMG_DIR . '/addCheck.png' ?> alt='icon' /></td>
1441
- <td><img src=<?php echo YASR_IMG_DIR . '/addCheck.png' ?> alt='icon' /></td>
1442
- </tr>
1443
- <tr>
1444
- <td class="rowTitle"><?php _e("Rankings Customization" , 'yet-another-stars-rating'); ?></td>
1445
- <td><img src=<?php echo YASR_IMG_DIR . '/addRedX2.png' ?> alt='icon' /></td>
1446
- <td><img src=<?php echo YASR_IMG_DIR . '/addCheck.png' ?> alt='icon' /></td>
1447
- </tr>
1448
- <tr>
1449
- <td class="rowTitle"><?php _e("Stars Customization" , 'yet-another-stars-rating'); ?></td>
1450
- <td><?php _e("Size Only" , 'yet-another-stars-rating'); ?></td>
1451
- <td> <img src=<?php echo YASR_IMG_DIR . '/addCheck.png' ?> alt='icon' /> <br /><?php _e("Users can choose different ready to use sets or can upload their own images." , 'yet-another-stars-rating'); ?></td>
1452
- </tr>
1453
- <tr>
1454
- <td class="rowTitle"><?php _e("Users can review in comments" , 'yet-another-stars-rating'); ?></td>
1455
- <td><img src=<?php echo YASR_IMG_DIR . '/addRedX2.png' ?> alt='icon' /></td>
1456
- <td><img src=<?php echo YASR_IMG_DIR . '/addCheck.png' ?> alt='icon' /></td>
1457
- </tr>
1458
-
1459
- </table>
1460
-
1461
- <?php
1462
-
1463
- echo "<img src=" . YASR_IMG_DIR . "/addExclamation.png alt=icon /> =" ;
1464
-
1465
- _e("Not avaible yet", 'yet-another-stars-rating');
1466
-
1467
- echo "<p>";
1468
-
1469
- ?>
1470
-
1471
- </div>
1472
-
1473
- <?php
1474
-
1475
- }
1476
-
1477
/*** Facebook sdk, since version 0.8.8 ***/
1478
1479
function yasr_include_fb_sdk () {
1304
1305
add_settings_section( 'yasr_style_options_section_id', __('Style Options', 'yet-another-stars-rating'), 'yasr_style_section_callback', 'yasr_style_tab' );
1306
add_settings_field( 'yasr_color_scheme_multiset', __('Which color scheme do you want to use?', 'yet-another-stars-rating') , 'yasr_color_scheme_multiset_callback', 'yasr_style_tab', 'yasr_style_options_section_id', $style_options);
1307
+
1308
+ if (function_exists('yasr_st_upload_stars_callback')) {
1309
+
1310
+ //If a default stars set was saved ...
1311
+ if(array_key_exists('stars_set', $style_options)) {
1312
+
1313
+ $style_options['custom_stars_set'] = FALSE; //..avoid undefined index
1314
+
1315
+ }
1316
+
1317
+ //else if a custom stars set was saved...
1318
+ else {
1319
+
1320
+ $style_options['stars_set'] = FALSE; //..avoid undefined index
1321
+
1322
+ }
1323
+
1324
+ add_settings_field( 'yasr_st_upload_stars', __('Select the set you\'ve uploaded', 'yet-another-stars-rating'), 'yasr_st_upload_stars_callback', 'yasr_style_tab', 'yasr_style_options_section_id', $style_options );
1325
+ add_settings_field( 'yasr_st_choose_stars_radio', __('Choose Stars Set', 'yet-another-stars-rating'), 'yasr_st_choose_stars_radio_callback', 'yasr_style_tab', 'yasr_style_options_section_id', $style_options );
1326
+
1327
+ }
1328
+
1329
add_settings_field( 'yasr_style_options_textarea', __('Custom CSS Styles', 'yet-another-stars-rating'), 'yasr_style_options_textarea_callback', 'yasr_style_tab', 'yasr_style_options_section_id', $style_options );
1330
+
1331
}
1332
1333
function yasr_style_section_callback () {
1399
}
1400
1401
1402
/*** Facebook sdk, since version 0.8.8 ***/
1403
1404
function yasr_include_fb_sdk () {
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: 5 star, admin, administrator, AJAX, five-star, javascript, jquery, post r
4
Requires at least: 3.5
5
Contributors: Dudo
6
Tested up to: 4.4
7
- Stable tag: 1.0.7
8
License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
10
Yet Another Stars Rating is a simple plugin which allows you and / or your visitor to rate a post or element. Ideal for review's website
@@ -13,7 +13,6 @@ Yet Another Stars Rating is a simple plugin which allows you and / or your visit
13
Yet Another Stars Rating (YASR) is a new system review based on jquery plugin RateIT.
14
With YASR you can make your own review or let your visitors vote, and you can even create multiple sets (a set of stars for each aspect to
15
rate). Review scores or visitor ratings will be indexed by search engines through snippets .
16
- Most important, if you are a gd star rating user, with YASR you can import all the data from gd star rating (which isn't maintained anymore).
17
18
= How To use =
19
@@ -121,6 +120,9 @@ Of course not: you can easily add it on the visual editor just by clicking on th
121
122
== Changelog ==
123
124
= 1.0.7 =
125
* FIXED: minor bugfix in settings page
126
4
Requires at least: 3.5
5
Contributors: Dudo
6
Tested up to: 4.4
7
+ Stable tag: 1.1.0
8
License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
10
Yet Another Stars Rating is a simple plugin which allows you and / or your visitor to rate a post or element. Ideal for review's website
13
Yet Another Stars Rating (YASR) is a new system review based on jquery plugin RateIT.
14
With YASR you can make your own review or let your visitors vote, and you can even create multiple sets (a set of stars for each aspect to
15
rate). Review scores or visitor ratings will be indexed by search engines through snippets .
16
17
= How To use =
18
120
121
== Changelog ==
122
123
+ = 1.1.0 =
124
+ * Yasr is not anymore a freemium plugin: it works now with extensions that you can be installed through the settings panel
125
+
126
= 1.0.7 =
127
* FIXED: minor bugfix in settings page
128
yasr-settings-page.php CHANGED
@@ -83,6 +83,7 @@ $n_multi_set = NULL; //Evoid undefined variable when printed outside multiset ta
83
<a href="?page=yasr_settings_page&tab=manage_multi" class="nav-tab <?php if ($active_tab == 'manage_multi') echo 'nav-tab-active'; ?>" > <?php _e("Multi Sets", 'yet-another-stars-rating'); ?> </a>
84
<a href="?page=yasr_settings_page&tab=style_options" class="nav-tab <?php if ($active_tab == 'style_options') echo 'nav-tab-active'; ?>" > <?php _e("Aspect & Styles", 'yet-another-stars-rating'); ?> </a>
85
<?php do_action( 'yasr_add_settings_tab', $active_tab ); ?>
86
87
</h2>
88
@@ -186,7 +187,7 @@ $n_multi_set = NULL; //Evoid undefined variable when printed outside multiset ta
186
<?php
187
} //$gd_star_rating_found && $gd_star_imported==1$gd_star_rating_found = yasr_search_gd_star_rating();
188
189
- } //End if tab 'general_settings'
190
191
192
if ($active_tab == 'manage_multi') {
@@ -310,10 +311,142 @@ $n_multi_set = NULL; //Evoid undefined variable when printed outside multiset ta
310
} //End tab style
311
312
313
do_action( 'yasr_settings_check_active_tab', $active_tab );
314
315
316
-
317
318
yasr_fb_box("bottom");
319
yasr_ask_rating ("bottom");
83
<a href="?page=yasr_settings_page&tab=manage_multi" class="nav-tab <?php if ($active_tab == 'manage_multi') echo 'nav-tab-active'; ?>" > <?php _e("Multi Sets", 'yet-another-stars-rating'); ?> </a>
84
<a href="?page=yasr_settings_page&tab=style_options" class="nav-tab <?php if ($active_tab == 'style_options') echo 'nav-tab-active'; ?>" > <?php _e("Aspect & Styles", 'yet-another-stars-rating'); ?> </a>
85
<?php do_action( 'yasr_add_settings_tab', $active_tab ); ?>
86
+ <a href="?page=yasr_settings_page&tab=extensions" class="nav-tab <?php if ($active_tab == 'extensions') echo 'nav-tab-active'; ?>" > <?php _e("Extensions", 'yet-another-stars-rating'); ?> </a>
87
88
</h2>
89
187
<?php
188
} //$gd_star_rating_found && $gd_star_imported==1$gd_star_rating_found = yasr_search_gd_star_rating();
189
190
+ } //End if tab 'general_settings'
191
192
193
if ($active_tab == 'manage_multi') {
311
} //End tab style
312
313
314
+ if ($active_tab == 'extensions') {
315
+
316
+ ?>
317
+
318
+ <div class="yasr-extensionsdiv">
319
+
320
+ <h1><?php _e("Extensions for Yet Another Stars Rating", "yet-another-stars-rating");?></h1>
321
+
322
+ <div class="yasr-indented-answer">
323
+ <?php _e("Extensions add functionality to your Yasr installation", "yet-another-stars-rating"); ?>
324
+ </div>
325
+
326
+ <div class="yasr-space-settings-div">
327
+ </div>
328
+ <div class="yasr-space-settings-div">
329
+ </div>
330
+
331
+ <div class="yasr-extension">
332
+
333
+ <span class="yasr-extension-title">Yasr User Reviews</span>
334
+
335
+ <img src=<?php echo YASR_IMG_DIR . '/yasr-user-reviews.png'?> alt='Yasr User Reviews' class="yasr-extension-image"/>
336
+
337
+ <span class="yasr-extension-description">
338
+ <?php _e("Start accepting reviews and ratings for your post or pages using Yasr User Reviews extension.", "yet-another-stars-rating"); ?>
339
+ </span>
340
+
341
+ <div class="yasr-space-settings-div">
342
+ </div>
343
+
344
+ <?php
345
+
346
+ if (function_exists('yasr_ur_license_page')) {
347
+
348
+ yasr_ur_license_page ();
349
+
350
+ }
351
+
352
+ else {
353
+
354
+ ?>
355
+
356
+ <a href="https://yetanotherstarsrating.com/extensions/reviews-in-comments/" target="_blank" class="button-secondary"><?php _e("Get this extension", "yet-another-stars-rating") ?></a>
357
+
358
+ <?php
359
+
360
+ }
361
+
362
+
363
+ ?>
364
+
365
+ <p>
366
+
367
+ </div>
368
+
369
+ <div class="yasr-extension">
370
+
371
+ <span class="yasr-extension-title">Yasr Stylish</span>
372
+
373
+ <img src=<?php echo YASR_IMG_DIR . '/yasr-custom-image.png'?> alt='Yasr User Reviews' class="yasr-extension-image-no-width"/>
374
+
375
+ <span class="yasr-extension-description">
376
+ <?php _e("Choose between ready to use image or upload your own!", "yet-another-stars-rating"); ?>
377
+ </span>
378
+
379
+ <div class="yasr-space-settings-div">
380
+ </div>
381
+
382
+ <?php
383
+
384
+ if (function_exists('yasr_st_license_page')) {
385
+
386
+ yasr_st_license_page ();
387
+
388
+ }
389
+
390
+ else {
391
+
392
+ ?>
393
+
394
+ <a href="https://yetanotherstarsrating.com/extensions/yasr-stylish/" target="_blank" class="button-secondary"><?php _e("Get this extension", "yet-another-stars-rating") ?></a>
395
+
396
+ <?php
397
+
398
+ }
399
+
400
+
401
+ ?>
402
+
403
+ <p>
404
+
405
+ </div>
406
+
407
+ <div class="yasr-extension">
408
+
409
+ <span class="yasr-extension-title">Yasr Custom Rankings</span>
410
+
411
+ <img src=<?php echo YASR_IMG_DIR . '/create-ranking.png'?> alt='Yasr User Reviews' class="yasr-extension-image"/>
412
+
413
+ <span class="yasr-extension-description">
414
+ <?php _e("Unleash all the power of your rankings with just a click!", "yet-another-stars-rating"); ?>
415
+ </span>
416
+
417
+ <div class="yasr-space-settings-div">
418
+ </div>
419
+
420
+ <?php
421
+
422
+ if (function_exists('yasr_cr_license_page')) {
423
+
424
+ yasr_cr_license_page ();
425
+
426
+ }
427
+
428
+ else {
429
+
430
+ ?>
431
+
432
+ <a href="https://yetanotherstarsrating.com/extensions/yasr-custom-rankings/" target="_blank" class="button-secondary"><?php _e("Get this extension", "yet-another-stars-rating") ?></a>
433
+
434
+ <?php
435
+
436
+ }
437
+
438
+ ?>
439
+
440
+ <p>
441
+ </div>
442
+
443
+ <?php
444
+
445
+ }
446
+
447
do_action( 'yasr_settings_check_active_tab', $active_tab );
448
449
450
451
yasr_fb_box("bottom");
452
yasr_ask_rating ("bottom");
yet-another-stars-rating.php CHANGED
@@ -2,8 +2,8 @@
2
/**
3
* Plugin Name: Yet Another Stars Rating
4
* Plugin URI: http://wordpress.org/plugins/yet-another-stars-rating/
5
- * Description: Rating system with rich snippets
6
- * Version: 1.0.7
7
* Author: Dario Curvino
8
* Author URI: https://yetanotherstarsrating.com/
9
* Text Domain: yet-another-stars-rating
@@ -32,26 +32,26 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
32
if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // Exit if accessed directly
33
34
35
- define('YASR_VERSION_NUM', '1.0.7');
36
37
//Plugin relative path
38
- define( "YASR_RELATIVE_PATH", dirname(__FILE__) );
39
40
//Plugin RELATIVE PATH without slashes (just the directory's name)
41
- define( "YASR_RELATIVE_PATH_PLUGIN_DIR", dirname( plugin_basename(__FILE__) ) );
42
43
//Plugin language directory: here I've to use relative path
44
//because load_plugin_textdomain wants relative and not absolute path
45
- define( "YASR_LANG_DIR", YASR_RELATIVE_PATH_PLUGIN_DIR . '/languages/' );
46
47
//Js directory absolute
48
- define ("YASR_JS_DIR", plugins_url( YASR_RELATIVE_PATH_PLUGIN_DIR . '/js/' ));
49
50
//CSS directory absolute
51
- define ("YASR_CSS_DIR", plugins_url( YASR_RELATIVE_PATH_PLUGIN_DIR . '/css/' ));
52
53
//IMG directory absolute
54
- define ("YASR_IMG_DIR", plugins_url( YASR_RELATIVE_PATH_PLUGIN_DIR . '/img/'));
55
56
57
/****** Getting options ******/
@@ -102,6 +102,11 @@ define ("YASR_SCHEMA_FORMAT", $stored_options['snippet_format']);
102
define ("YASR_METABOX_OVERALL_RATING", $stored_options['metabox_overall_rating']);
103
104
105
//Get stored style options
106
$style_options = get_option ('yasr_style_options');
107
@@ -131,6 +136,22 @@ if ($style_options) {
131
132
}
133
134
}
135
136
else {
@@ -138,24 +159,27 @@ else {
138
define ("YASR_CUSTOM_CSS_RULES", NULL);
139
define ("YASR_SCHEME_COLOR", NULL);
140
141
}
142
143
/****** End Getting options ******/
144
145
146
147
// Include function file
148
- require (YASR_RELATIVE_PATH . '/lib/yasr-functions.php');
149
150
- require (YASR_RELATIVE_PATH . '/lib/yasr-admin-actions.php');
151
152
- require (YASR_RELATIVE_PATH . '/lib/yasr-settings-functions.php');
153
154
- require (YASR_RELATIVE_PATH . '/lib/yasr-db-functions.php');
155
156
- require (YASR_RELATIVE_PATH . '/lib/yasr-ajax-functions.php');
157
158
- require (YASR_RELATIVE_PATH . '/lib/yasr-shortcode-functions.php');
159
160
$version_installed = get_option('yasr-version') ;
161
2
/**
3
* Plugin Name: Yet Another Stars Rating
4
* Plugin URI: http://wordpress.org/plugins/yet-another-stars-rating/
5
+ * Description: Yet Another Stars Rating turn your WordPress into a complete review website.
6
+ * Version: 1.1.0
7
* Author: Dario Curvino
8
* Author URI: https://yetanotherstarsrating.com/
9
* Text Domain: yet-another-stars-rating
32
if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // Exit if accessed directly
33
34
35
+ define('YASR_VERSION_NUM', '1.1.0');
36
37
//Plugin relative path
38
+ define( "YASR_ABSOLUTE_PATH", dirname(__FILE__) );
39
40
//Plugin RELATIVE PATH without slashes (just the directory's name)
41
+ define( "YASR_RELATIVE_PATH", dirname( plugin_basename(__FILE__) ) );
42
43
//Plugin language directory: here I've to use relative path
44
//because load_plugin_textdomain wants relative and not absolute path
45
+ define( "YASR_LANG_DIR", YASR_RELATIVE_PATH . '/languages/' );
46
47
//Js directory absolute
48
+ define ("YASR_JS_DIR", plugins_url() .'/'. YASR_RELATIVE_PATH . '/js/');
49
50
//CSS directory absolute
51
+ define ("YASR_CSS_DIR", plugins_url() .'/'. YASR_RELATIVE_PATH . '/css/');
52
53
//IMG directory absolute
54
+ define ("YASR_IMG_DIR", plugins_url() .'/'. YASR_RELATIVE_PATH . '/img/');
55
56
57
/****** Getting options ******/
102
define ("YASR_METABOX_OVERALL_RATING", $stored_options['metabox_overall_rating']);
103
104
105
+ // this is the URL our updater / license checker pings. This should be the URL of the site with EDD installed
106
+ define( 'YASR_EDD_SL_STORE_URL', 'https://yetanotherstarsrating.com' );
107
+
108
+
109
+
110
//Get stored style options
111
$style_options = get_option ('yasr_style_options');
112
136
137
}
138
139
+ //Needed for yasr stylish extension
140
+ if(isset($style_options['stars_set'])) {
141
+
142
+ define("YASR_ST_STARS_DIR", $style_options['stars_set']);
143
+
144
+ }
145
+
146
+
147
+ //Needed for yasr stylish extension
148
+ if(isset($style_options['custom_stars_set'])) {
149
+
150
+ define("YASR_ST_CUSTOM_STARS_DIR", $style_options['custom_stars_set']);
151
+
152
+ }
153
+
154
+
155
}
156
157
else {
159
define ("YASR_CUSTOM_CSS_RULES", NULL);
160
define ("YASR_SCHEME_COLOR", NULL);
161
162
+
163
}
164
165
+ //do_action('yasr_define_style_options', $style_options);
166
+
167
/****** End Getting options ******/
168
169
170
171
// Include function file
172
+ require (YASR_ABSOLUTE_PATH . '/lib/yasr-functions.php');
173
174
+ require (YASR_ABSOLUTE_PATH . '/lib/yasr-admin-actions.php');
175
176
+ require (YASR_ABSOLUTE_PATH . '/lib/yasr-settings-functions.php');
177
178
+ require (YASR_ABSOLUTE_PATH . '/lib/yasr-db-functions.php');
179
180
+ require (YASR_ABSOLUTE_PATH . '/lib/yasr-ajax-functions.php');
181
182
+ require (YASR_ABSOLUTE_PATH . '/lib/yasr-shortcode-functions.php');
183
184
$version_installed = get_option('yasr-version') ;
185