Version Description
- Updated: Framework updated for no conflict mode with other kk plugins.
Download this release
Release Info
Developer | bhittani |
Plugin | kk Star Ratings |
Version | 2.3.1 |
Comparing to | |
See all releases |
Code changes from version 2.3 to 2.3.1
- admin.php +3 -3
- bhittani-framework/admin/admin.class.php +2 -0
- bhittani-framework/admin/css/admin.css +5 -6
- bhittani-framework/admin/js/lightbox.js +26 -9
- bhittani-framework/admin/js/script.js +5 -2
- bhittani-framework/admin/markup.class.php +5 -5
- bhittani-framework/plugin.php +4 -4
- index.php +35 -9
- readme.txt +4 -1
- shortcode/shortcode.php +1 -1
admin.php
CHANGED
@@ -218,7 +218,7 @@
|
|
218 |
'field' => 'kksr_stars_gray',
|
219 |
'label' => 'Choose an image',
|
220 |
'caption' => 'Gray Star',
|
221 |
-
'value' => get_option('kksr_stars_gray') ? get_option('kksr_stars_gray') :
|
222 |
));
|
223 |
BhittaniPlugin_AdminMarkup::image(array(
|
224 |
'title' => 'Yellow Star',
|
@@ -226,7 +226,7 @@
|
|
226 |
'field' => 'kksr_stars_yellow',
|
227 |
'label' => 'Choose an image',
|
228 |
'caption' => 'Yellow Star',
|
229 |
-
'value' => get_option('kksr_stars_yellow') ? get_option('kksr_stars_yellow') :
|
230 |
));
|
231 |
BhittaniPlugin_AdminMarkup::image(array(
|
232 |
'title' => 'Orange Star',
|
@@ -234,7 +234,7 @@
|
|
234 |
'field' => 'kksr_stars_orange',
|
235 |
'label' => 'Choose an image',
|
236 |
'caption' => 'Orange Star',
|
237 |
-
'value' => get_option('kksr_stars_orange') ? get_option('kksr_stars_orange') :
|
238 |
));
|
239 |
?>
|
240 |
</div>
|
218 |
'field' => 'kksr_stars_gray',
|
219 |
'label' => 'Choose an image',
|
220 |
'caption' => 'Gray Star',
|
221 |
+
'value' => get_option('kksr_stars_gray') ? get_option('kksr_stars_gray') : BhittaniPlugin_kkStarRatings::file_uri('gray.png')
|
222 |
));
|
223 |
BhittaniPlugin_AdminMarkup::image(array(
|
224 |
'title' => 'Yellow Star',
|
226 |
'field' => 'kksr_stars_yellow',
|
227 |
'label' => 'Choose an image',
|
228 |
'caption' => 'Yellow Star',
|
229 |
+
'value' => get_option('kksr_stars_yellow') ? get_option('kksr_stars_yellow') : BhittaniPlugin_kkStarRatings::file_uri('yellow.png')
|
230 |
));
|
231 |
BhittaniPlugin_AdminMarkup::image(array(
|
232 |
'title' => 'Orange Star',
|
234 |
'field' => 'kksr_stars_orange',
|
235 |
'label' => 'Choose an image',
|
236 |
'caption' => 'Orange Star',
|
237 |
+
'value' => get_option('kksr_stars_orange') ? get_option('kksr_stars_orange') : BhittaniPlugin_kkStarRatings::file_uri('orange.png')
|
238 |
));
|
239 |
?>
|
240 |
</div>
|
bhittani-framework/admin/admin.class.php
CHANGED
@@ -61,6 +61,8 @@ if(!class_exists('BhittaniPlugin_Admin')) :
|
|
61 |
*/
|
62 |
public static function js()
|
63 |
{
|
|
|
|
|
64 |
wp_enqueue_script('media-upload');
|
65 |
wp_enqueue_script(
|
66 |
self::$id.'_colorpicker',
|
61 |
*/
|
62 |
public static function js()
|
63 |
{
|
64 |
+
wp_enqueue_script('jquery');
|
65 |
+
|
66 |
wp_enqueue_script('media-upload');
|
67 |
wp_enqueue_script(
|
68 |
self::$id.'_colorpicker',
|
bhittani-framework/admin/css/admin.css
CHANGED
@@ -265,11 +265,10 @@ input.button {
|
|
265 |
display: block;
|
266 |
}
|
267 |
|
268 |
-
|
269 |
-
div.bhittani-lightbox div.kkpopup {
|
270 |
-
div.bhittani-lightbox div.kkpopup-
|
271 |
-
div.bhittani-lightbox div.kkpopup-exit {
|
272 |
-
div.bhittani-lightbox div.kkpopup-exit a {padding:3px;color:#999;font-weight:bold;float:right;font-family:Verdana,Geneva,sans-serif;font-size:16px;text-decoration:none;}
|
273 |
div.bhittani-lightbox span.kkpopup__processing {display:none;}
|
274 |
div.bhittani-lightbox img.kkpopup-process {padding-top:3px;padding-right:5px;float:left;}
|
275 |
-
div.bhittani-lightbox.kkpopup-lightbox {position:
|
265 |
display: block;
|
266 |
}
|
267 |
|
268 |
+
div.bhittani-lightbox div.kkpopup {border:1px solid #999;border-radius:4px;-moz-border-radius:4px;-webkit-border-radius:4px;line-height:20px;overflow:hidden;background-color:#FFF;position:absolute;top:0px;left:0px;z-index:9999;font-family:"Helvetica Neue", Helvetica, Arial, sans-serif;font-size:12px;padding:10px;min-height:15px; display:none;}
|
269 |
+
div.bhittani-lightbox div.kkpopup-bg {display:none;background-color:#FFF;padding:10px;position:absolute;z-index:999;border-radius:6px;-moz-border-radius:6px;-webkit-border-radius:6px;border:1px solid #999;box-shadow: 0 0px 100px #000;}
|
270 |
+
div.bhittani-lightbox div.kkpopup-exit {border-radius:300px;-moz-border-radius:300px;-webkit-border-radius:300px;position:absolute;z-index:99999; display:none;}
|
271 |
+
div.bhittani-lightbox div.kkpopup-exit a {background-color: #AAA;border-radius:300px;-moz-border-radius:300px;-webkit-border-radius:300px;line-height: 0px;display: block;text-align: center;padding: 7px;}
|
|
|
272 |
div.bhittani-lightbox span.kkpopup__processing {display:none;}
|
273 |
div.bhittani-lightbox img.kkpopup-process {padding-top:3px;padding-right:5px;float:left;}
|
274 |
+
div.bhittani-lightbox.kkpopup-lightbox {position:fixed;top:0px;left:0px;z-index:99;display:none;}
|
bhittani-framework/admin/js/lightbox.js
CHANGED
@@ -61,9 +61,9 @@ var bhittani_lightbox_js = {
|
|
61 |
'width' : jQuery(document).width(),
|
62 |
'height' : jQuery(document).height(),
|
63 |
'opacity' : bhittani_lightbox_js._popup_opacity,
|
64 |
-
'background-color': bhittani_lightbox_js._popup_color
|
65 |
});
|
66 |
-
if(bhittani_lightbox_js._popup_active) { jQuery(bhittani_lightbox_js._popup_lightbox).fadeIn('slow') }
|
67 |
},
|
68 |
|
69 |
lightbox_center : function()
|
@@ -80,8 +80,8 @@ var bhittani_lightbox_js = {
|
|
80 |
'top' : ((height)/2) - (epp_height/2) + jQuery(document).scrollTop()
|
81 |
}, 'fast', 'linear', function() {
|
82 |
jQuery(bhittani_lightbox_js._popup_exit).stop(true,true).animate({
|
83 |
-
'left' : parseInt(popup.css('left'))+epp_width+
|
84 |
-
'top' : parseInt(popup.css('top'))-
|
85 |
}, 'fast', 'linear');
|
86 |
jQuery(bhittani_lightbox_js._popup_bg).stop(true,true).animate({
|
87 |
'left' : ((width)/2) - (epp_width/2) + jQuery(document).scrollLeft() - 10,
|
@@ -98,7 +98,7 @@ var bhittani_lightbox_js = {
|
|
98 |
jQuery(bhittani_lightbox_js._popup).fadeOut('fast',function(){ jQuery(bhittani_lightbox_js._popup_bg).fadeOut(200, function(){ jQuery(bhittani_lightbox_js._popup_exit).fadeOut(200); }); });
|
99 |
},
|
100 |
|
101 |
-
lightbox : function(html,arg,callback)
|
102 |
{
|
103 |
bhittani_lightbox_js._popup_active = true;
|
104 |
|
@@ -108,11 +108,28 @@ var bhittani_lightbox_js = {
|
|
108 |
|
109 |
popup.html((arg=='busy'?jQuery(bhittani_lightbox_js._popup_busy).html():'')+html+(arg=='confirm'?bhittani_lightbox_js.lightbox_confirm(callback):''));
|
110 |
|
111 |
-
var popup_width =
|
112 |
-
var popup_height =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
popup.css({'width':popup_width+'px','height':popup_height+'px'});
|
114 |
|
115 |
-
jQuery(bhittani_lightbox_js._popup_bg).css({
|
|
|
|
|
|
|
|
|
116 |
|
117 |
bhittani_lightbox_js.lightbox_center();
|
118 |
|
@@ -143,6 +160,6 @@ var bhittani_lightbox_js = {
|
|
143 |
}
|
144 |
|
145 |
jQuery(document).ready( function($){
|
146 |
-
bhittani_lightbox_js._init('.bhittani-lightbox', '
|
147 |
});
|
148 |
|
61 |
'width' : jQuery(document).width(),
|
62 |
'height' : jQuery(document).height(),
|
63 |
'opacity' : bhittani_lightbox_js._popup_opacity,
|
64 |
+
'background-color': bhittani_lightbox_js._popup_color
|
65 |
});
|
66 |
+
if(bhittani_lightbox_js._popup_active) { jQuery(bhittani_lightbox_js._popup_lightbox).fadeIn('slow'); }
|
67 |
},
|
68 |
|
69 |
lightbox_center : function()
|
80 |
'top' : ((height)/2) - (epp_height/2) + jQuery(document).scrollTop()
|
81 |
}, 'fast', 'linear', function() {
|
82 |
jQuery(bhittani_lightbox_js._popup_exit).stop(true,true).animate({
|
83 |
+
'left' : parseInt(popup.css('left'))+epp_width+10,
|
84 |
+
'top' : parseInt(popup.css('top'))-20
|
85 |
}, 'fast', 'linear');
|
86 |
jQuery(bhittani_lightbox_js._popup_bg).stop(true,true).animate({
|
87 |
'left' : ((width)/2) - (epp_width/2) + jQuery(document).scrollLeft() - 10,
|
98 |
jQuery(bhittani_lightbox_js._popup).fadeOut('fast',function(){ jQuery(bhittani_lightbox_js._popup_bg).fadeOut(200, function(){ jQuery(bhittani_lightbox_js._popup_exit).fadeOut(200); }); });
|
99 |
},
|
100 |
|
101 |
+
lightbox : function(html,arg,callback,w,h)
|
102 |
{
|
103 |
bhittani_lightbox_js._popup_active = true;
|
104 |
|
108 |
|
109 |
popup.html((arg=='busy'?jQuery(bhittani_lightbox_js._popup_busy).html():'')+html+(arg=='confirm'?bhittani_lightbox_js.lightbox_confirm(callback):''));
|
110 |
|
111 |
+
var popup_width = 0;
|
112 |
+
var popup_height = 0;
|
113 |
+
|
114 |
+
if((w && popup.width()>w) || (h && popup.height()>h))
|
115 |
+
{
|
116 |
+
popup_width = w + 2;
|
117 |
+
popup_height = h;
|
118 |
+
popup.css('overflow', 'auto');
|
119 |
+
}
|
120 |
+
else
|
121 |
+
{
|
122 |
+
popup_width = popup.width() + 2;
|
123 |
+
popup_height = popup.height();
|
124 |
+
}
|
125 |
+
|
126 |
popup.css({'width':popup_width+'px','height':popup_height+'px'});
|
127 |
|
128 |
+
jQuery(bhittani_lightbox_js._popup_bg).css({
|
129 |
+
'opacity': 0.5,
|
130 |
+
'width': (popup_width+20)+'px',
|
131 |
+
'height': (popup_height+20)+'px'
|
132 |
+
});
|
133 |
|
134 |
bhittani_lightbox_js.lightbox_center();
|
135 |
|
160 |
}
|
161 |
|
162 |
jQuery(document).ready( function($){
|
163 |
+
bhittani_lightbox_js._init('.bhittani-lightbox', '#222', '0.7');
|
164 |
});
|
165 |
|
bhittani-framework/admin/js/script.js
CHANGED
@@ -18,7 +18,7 @@
|
|
18 |
});
|
19 |
},
|
20 |
|
21 |
-
ajax_post : function($, params, action, nonce, waiting_msg)
|
22 |
{
|
23 |
$.ajax({
|
24 |
url: bf_admin._ajaxurl,
|
@@ -29,7 +29,10 @@
|
|
29 |
bhittani_lightbox_js.lightbox(waiting_msg, 'busy', false);
|
30 |
},
|
31 |
success: function(response){
|
32 |
-
|
|
|
|
|
|
|
33 |
},
|
34 |
complete: function(){
|
35 |
bhittani_lightbox_js.lightbox('Done', 'unclose', false);
|
18 |
});
|
19 |
},
|
20 |
|
21 |
+
ajax_post : function($, params, action, nonce, waiting_msg, callback_success)
|
22 |
{
|
23 |
$.ajax({
|
24 |
url: bf_admin._ajaxurl,
|
29 |
bhittani_lightbox_js.lightbox(waiting_msg, 'busy', false);
|
30 |
},
|
31 |
success: function(response){
|
32 |
+
if(callback_success)
|
33 |
+
{
|
34 |
+
callback_success(response);
|
35 |
+
}
|
36 |
},
|
37 |
complete: function(){
|
38 |
bhittani_lightbox_js.lightbox('Done', 'unclose', false);
|
bhittani-framework/admin/markup.class.php
CHANGED
@@ -38,8 +38,8 @@ if(!class_exists('BhittaniPlugin_AdminMarkup')) :
|
|
38 |
private static function _prepend($title='', $description='', $html='')
|
39 |
{
|
40 |
$html .= '<div class="bf_box">';
|
41 |
-
$html .= !empty($description) ? ' <div class="bf_aside">'
|
42 |
-
$html .= !empty($title) ? ' <h4>'
|
43 |
return $html;
|
44 |
}
|
45 |
private static function _append($html)
|
@@ -62,7 +62,7 @@ if(!class_exists('BhittaniPlugin_AdminMarkup')) :
|
|
62 |
{
|
63 |
extract($_attr);
|
64 |
|
65 |
-
$_html = '<input type="text" name="'.$field.'" class="'.(isset($class)?$class:'').'" value="'.(isset($value)?$value:'').'" />';
|
66 |
|
67 |
return self::_element($title, $description, $_html, $_echo);
|
68 |
}
|
@@ -98,7 +98,7 @@ if(!class_exists('BhittaniPlugin_AdminMarkup')) :
|
|
98 |
foreach($obj as $O)
|
99 |
{
|
100 |
extract($O);
|
101 |
-
$_html .= '<div'.(isset($pclass)?' class="'.$pclass.'"':'').'>';
|
102 |
$_html .= ' <input type="text" name="'.$field.'" class="chkbox '.(isset($value)&&$value?'_on':'_off').' modern allow-click bf__checkbox '.(isset($class)?$class:'').'" value="'.(isset($value)?$value:'0').'" />';
|
103 |
$_html .= ' <span class="bf-label allow-click">'.$label.'</span>';
|
104 |
$_html .= '</div>';
|
@@ -111,7 +111,7 @@ if(!class_exists('BhittaniPlugin_AdminMarkup')) :
|
|
111 |
{
|
112 |
extract($_attr);
|
113 |
|
114 |
-
$_html = '<div'.(isset($pclass)?' class="'.$pclass.'"':'').'>';
|
115 |
$_html .= ' <input type="text" name="'.$field.'" class="color modern allow-click bf__color '.(isset($class)?$class:'').'" value="'.(isset($value)?$value:'#FFFFFF').'" style="background-color:'.(isset($value)?$value:'#FFFFFF').';" />';
|
116 |
$_html .= ' <span class="bf-label allow-click">'.$label.'</span>';
|
117 |
$_html .= '</div>';
|
38 |
private static function _prepend($title='', $description='', $html='')
|
39 |
{
|
40 |
$html .= '<div class="bf_box">';
|
41 |
+
$html .= !empty($description) ? (' <div class="bf_aside">' . $description . '</div>') : '';
|
42 |
+
$html .= !empty($title) ? (' <h4>' . $title . '</h4>') : '';
|
43 |
return $html;
|
44 |
}
|
45 |
private static function _append($html)
|
62 |
{
|
63 |
extract($_attr);
|
64 |
|
65 |
+
$_html = '<input type="text" name="'.$field.'" class="'.(isset($class)?$class:'').'" value="'.(isset($value)?$value:'').'" placeholder="'.(isset($placeholder)?$placeholder:'').'" />';
|
66 |
|
67 |
return self::_element($title, $description, $_html, $_echo);
|
68 |
}
|
98 |
foreach($obj as $O)
|
99 |
{
|
100 |
extract($O);
|
101 |
+
$_html .= '<div'.(isset($pclass)?(' class="'.$pclass.'"'):'').'>';
|
102 |
$_html .= ' <input type="text" name="'.$field.'" class="chkbox '.(isset($value)&&$value?'_on':'_off').' modern allow-click bf__checkbox '.(isset($class)?$class:'').'" value="'.(isset($value)?$value:'0').'" />';
|
103 |
$_html .= ' <span class="bf-label allow-click">'.$label.'</span>';
|
104 |
$_html .= '</div>';
|
111 |
{
|
112 |
extract($_attr);
|
113 |
|
114 |
+
$_html = '<div'.(isset($pclass)?(' class="'.$pclass.'"'):'').'>';
|
115 |
$_html .= ' <input type="text" name="'.$field.'" class="color modern allow-click bf__color '.(isset($class)?$class:'').'" value="'.(isset($value)?$value:'#FFFFFF').'" style="background-color:'.(isset($value)?$value:'#FFFFFF').';" />';
|
116 |
$_html .= ' <span class="bf-label allow-click">'.$label.'</span>';
|
117 |
$_html .= '</div>';
|
bhittani-framework/plugin.php
CHANGED
@@ -83,10 +83,10 @@ if(!class_exists('BhittaniPlugin')) :
|
|
83 |
</script>
|
84 |
<?php
|
85 |
}
|
86 |
-
wp_enqueue_script($this->id.($slug?'_'.$slug:''), $file, is_array($prerequisite)?$prerequisite:array('jquery'), $ver ? $ver : $this->ver, $footer);
|
87 |
|
88 |
if(is_array($params) && !$json)
|
89 |
-
wp_localize_script($this->id.($slug?'_'.$slug:''), str_replace('-','_',$this->id).'_'.$slug, $params);
|
90 |
}
|
91 |
/** function/method
|
92 |
* Usage: helper for hooking css scripts
|
@@ -95,8 +95,8 @@ if(!class_exists('BhittaniPlugin')) :
|
|
95 |
*/
|
96 |
protected function enqueue_css($slug, $file, $ver = false)
|
97 |
{
|
98 |
-
wp_register_style( $this->id.($slug?'_'.$slug:''), $file, false, $ver ? $ver : $this->ver );
|
99 |
-
wp_enqueue_style( $this->id.($slug?'_'.$slug:'')
|
100 |
}
|
101 |
}
|
102 |
|
83 |
</script>
|
84 |
<?php
|
85 |
}
|
86 |
+
wp_enqueue_script($this->id.($slug?('_'.$slug):''), $file, is_array($prerequisite)?$prerequisite:array('jquery'), $ver ? $ver : $this->ver, $footer);
|
87 |
|
88 |
if(is_array($params) && !$json)
|
89 |
+
wp_localize_script($this->id.($slug?('_'.$slug):''), str_replace('-','_',$this->id).'_'.$slug, $params);
|
90 |
}
|
91 |
/** function/method
|
92 |
* Usage: helper for hooking css scripts
|
95 |
*/
|
96 |
protected function enqueue_css($slug, $file, $ver = false)
|
97 |
{
|
98 |
+
wp_register_style( $this->id.($slug?('_'.$slug):''), $file, false, $ver ? $ver : $this->ver );
|
99 |
+
wp_enqueue_style( $this->id.($slug?('_'.$slug):''));
|
100 |
}
|
101 |
}
|
102 |
|
index.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
Plugin Name: kk Star Ratings
|
5 |
Plugin URI: http://wakeusup.com/2011/05/kk-star-ratings/
|
6 |
Description: Renewed from the ground up(as of v2.0), clean, animated and light weight ratings feature for your blog. With kk Star Ratings, you can <strong>allow your blog posts to be rated by your blog visitors</strong>. It also includes a <strong>widget</strong> which you can add to your sidebar to show the top rated post. Wait! There is more to it. Enjoy the extensive options you can set to customize this plugin.
|
7 |
-
Version: 2.3
|
8 |
Author: Kamal Khan
|
9 |
Author URI: http://bhittani.com
|
10 |
License: GPLv2 or later
|
@@ -23,6 +23,32 @@ if(!class_exists('BhittaniPlugin_kkStarRatings')) :
|
|
23 |
parent::__construct($id, $nick, $ver);
|
24 |
$this->_Menus = array();
|
25 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
/** function/method
|
27 |
* Usage: hook js frontend
|
28 |
* Arg(0): null
|
@@ -42,7 +68,7 @@ if(!class_exists('BhittaniPlugin_kkStarRatings')) :
|
|
42 |
$Params['error_msg'] = parent::get_options('kksr_js_error');
|
43 |
$Params['tooltip'] = parent::get_options('kksr_tooltip');
|
44 |
$Params['tooltips'] = parent::get_options('kksr_tooltips');
|
45 |
-
$this->enqueue_js('js',
|
46 |
}
|
47 |
/** function/method
|
48 |
* Usage: hook js admin - helper
|
@@ -55,7 +81,7 @@ if(!class_exists('BhittaniPlugin_kkStarRatings')) :
|
|
55 |
$Params = array();
|
56 |
$Params['nonce'] = $nonce;
|
57 |
$Params['func_reset'] = 'kksr_admin_reset_ajax';
|
58 |
-
$this->enqueue_js('js_admin',
|
59 |
}
|
60 |
/** function/method
|
61 |
* Usage: hook admin scripts
|
@@ -76,7 +102,7 @@ if(!class_exists('BhittaniPlugin_kkStarRatings')) :
|
|
76 |
*/
|
77 |
public function css()
|
78 |
{
|
79 |
-
$this->enqueue_css('',
|
80 |
}
|
81 |
/** function/method
|
82 |
* Usage: hook custom css
|
@@ -223,7 +249,7 @@ if(!class_exists('BhittaniPlugin_kkStarRatings')) :
|
|
223 |
'manage_options',
|
224 |
$this->id.'_settings',
|
225 |
array(&$this, 'options_general'),
|
226 |
-
|
227 |
);
|
228 |
// Create images menu tab
|
229 |
$this->_Menus[] = add_submenu_page(
|
@@ -286,15 +312,15 @@ if(!class_exists('BhittaniPlugin_kkStarRatings')) :
|
|
286 |
$h3 = 'kk Star Ratings';
|
287 |
$Url = array(
|
288 |
array(
|
289 |
-
'title' => '
|
290 |
-
'link' => 'http://
|
291 |
),
|
292 |
array(
|
293 |
'title' => 'Changelog',
|
294 |
-
'link' => 'http://
|
295 |
)
|
296 |
);
|
297 |
-
include
|
298 |
}
|
299 |
/** function/method
|
300 |
* Usage: show general options
|
4 |
Plugin Name: kk Star Ratings
|
5 |
Plugin URI: http://wakeusup.com/2011/05/kk-star-ratings/
|
6 |
Description: Renewed from the ground up(as of v2.0), clean, animated and light weight ratings feature for your blog. With kk Star Ratings, you can <strong>allow your blog posts to be rated by your blog visitors</strong>. It also includes a <strong>widget</strong> which you can add to your sidebar to show the top rated post. Wait! There is more to it. Enjoy the extensive options you can set to customize this plugin.
|
7 |
+
Version: 2.3.1
|
8 |
Author: Kamal Khan
|
9 |
Author URI: http://bhittani.com
|
10 |
License: GPLv2 or later
|
23 |
parent::__construct($id, $nick, $ver);
|
24 |
$this->_Menus = array();
|
25 |
}
|
26 |
+
/**
|
27 |
+
* File uri
|
28 |
+
*
|
29 |
+
* @since 1.0 Initially defined
|
30 |
+
*
|
31 |
+
* @param string $path Path to file.
|
32 |
+
*
|
33 |
+
* @return string full uri.
|
34 |
+
*/
|
35 |
+
public static function file_uri($path)
|
36 |
+
{
|
37 |
+
return plugins_url($path, __FILE__);
|
38 |
+
}
|
39 |
+
/**
|
40 |
+
* File path
|
41 |
+
*
|
42 |
+
* @since 1.0 Initially defined
|
43 |
+
*
|
44 |
+
* @param string $path Path to file.
|
45 |
+
*
|
46 |
+
* @return string full path.
|
47 |
+
*/
|
48 |
+
public static function file_path($path)
|
49 |
+
{
|
50 |
+
return dirname(__FILE__).'/'.$path;
|
51 |
+
}
|
52 |
/** function/method
|
53 |
* Usage: hook js frontend
|
54 |
* Arg(0): null
|
68 |
$Params['error_msg'] = parent::get_options('kksr_js_error');
|
69 |
$Params['tooltip'] = parent::get_options('kksr_tooltip');
|
70 |
$Params['tooltips'] = parent::get_options('kksr_tooltips');
|
71 |
+
$this->enqueue_js('js', self::file_uri('js.js'), $this->ver, array('jquery'), $Params, false, true);
|
72 |
}
|
73 |
/** function/method
|
74 |
* Usage: hook js admin - helper
|
81 |
$Params = array();
|
82 |
$Params['nonce'] = $nonce;
|
83 |
$Params['func_reset'] = 'kksr_admin_reset_ajax';
|
84 |
+
$this->enqueue_js('js_admin', self::file_uri('js_admin.js'), $this->ver, array('jquery', 'bhittaniplugin_admin_script'), $Params);
|
85 |
}
|
86 |
/** function/method
|
87 |
* Usage: hook admin scripts
|
102 |
*/
|
103 |
public function css()
|
104 |
{
|
105 |
+
$this->enqueue_css('', self::file_uri('css.css'));
|
106 |
}
|
107 |
/** function/method
|
108 |
* Usage: hook custom css
|
249 |
'manage_options',
|
250 |
$this->id.'_settings',
|
251 |
array(&$this, 'options_general'),
|
252 |
+
self::file_uri('icon.png')
|
253 |
);
|
254 |
// Create images menu tab
|
255 |
$this->_Menus[] = add_submenu_page(
|
312 |
$h3 = 'kk Star Ratings';
|
313 |
$Url = array(
|
314 |
array(
|
315 |
+
'title' => 'Home',
|
316 |
+
'link' => 'http://wpapis.com/kk-star-ratings/'
|
317 |
),
|
318 |
array(
|
319 |
'title' => 'Changelog',
|
320 |
+
'link' => 'http://wpapis.com/kk-star-ratings/#tab-1369077219827-3-8'
|
321 |
)
|
322 |
);
|
323 |
+
include self::file_path('admin.php');
|
324 |
}
|
325 |
/** function/method
|
326 |
* Usage: show general options
|
readme.txt
CHANGED
@@ -11,7 +11,7 @@ Requires at least: 3.0
|
|
11 |
|
12 |
Tested up to: 3.5.1
|
13 |
|
14 |
-
Stable tag: 2.3
|
15 |
|
16 |
|
17 |
kk Star Ratings allows blog visitors to involve and interact more effectively with your website by rating posts.
|
@@ -128,6 +128,9 @@ Visit the help tab in the settings to find out what you can do.
|
|
128 |
|
129 |
== Changelog ==
|
130 |
|
|
|
|
|
|
|
131 |
= 2.3 =
|
132 |
* Added: Ability to exclude specific category(s).
|
133 |
|
11 |
|
12 |
Tested up to: 3.5.1
|
13 |
|
14 |
+
Stable tag: 2.3.1
|
15 |
|
16 |
|
17 |
kk Star Ratings allows blog visitors to involve and interact more effectively with your website by rating posts.
|
128 |
|
129 |
== Changelog ==
|
130 |
|
131 |
+
= 2.3.1 =
|
132 |
+
* Updated: Framework updated for no conflict mode with other kk plugins.
|
133 |
+
|
134 |
= 2.3 =
|
135 |
* Added: Ability to exclude specific category(s).
|
136 |
|
shortcode/shortcode.php
CHANGED
@@ -27,7 +27,7 @@ if(!class_exists('BhittaniPlugin_kkStarRatings_Shortcode')) :
|
|
27 |
{
|
28 |
//echo WP_PLUGIN_URL.'/kk-star-ratings/shortcode/mce/kkstarratings/editor_plugin.js';
|
29 |
//$plugin_array['kkstarratings'] = WP_PLUGIN_URL.'/kk-star-ratings/shortcode/mce/kkstarratings/editor_plugin.js';
|
30 |
-
$plugin_array['kkstarratings'] =
|
31 |
return $plugin_array;
|
32 |
}
|
33 |
}
|
27 |
{
|
28 |
//echo WP_PLUGIN_URL.'/kk-star-ratings/shortcode/mce/kkstarratings/editor_plugin.js';
|
29 |
//$plugin_array['kkstarratings'] = WP_PLUGIN_URL.'/kk-star-ratings/shortcode/mce/kkstarratings/editor_plugin.js';
|
30 |
+
$plugin_array['kkstarratings'] = BhittaniPlugin_kkStarRatings::file_uri('shortcode/mce/kkstarratings/editor_plugin.js');
|
31 |
return $plugin_array;
|
32 |
}
|
33 |
}
|