예제 #1
0
 public static function tinymce_custom_plugin($plugin_array)
 {
     //echo WP_PLUGIN_URL.'/kk-star-ratings/shortcode/mce/kkstarratings/editor_plugin.js';
     //$plugin_array['kkstarratings'] = WP_PLUGIN_URL.'/kk-star-ratings/shortcode/mce/kkstarratings/editor_plugin.js';
     $plugin_array['kkstarratings'] = BhittaniPlugin_kkStarRatings::file_uri('shortcode/mce/kkstarratings/editor_plugin.js');
     return $plugin_array;
 }
예제 #2
0
BhittaniPlugin_AdminMarkup::input(array('title' => 'Thank you message', 'description' => 'Text to be displayed when user places a vote', 'field' => 'kksr_js_thankyou', 'value' => get_option('kksr_js_thankyou')));
BhittaniPlugin_AdminMarkup::input(array('title' => 'Error message', 'description' => 'Text to be displayed when something goes wrong unexpectidly', 'field' => 'kksr_js_error', 'value' => get_option('kksr_js_error')));
?>
    </div>
    <!--bf_container __general-->
    <div class="bf_container __stars <?php 
echo $opt == 'stars' ? '__active' : '';
?>
">
        <?php 
BhittaniPlugin_AdminMarkup::input(array('title' => 'Amount of stars', 'description' => 'How many stars do you want the ratings based on? Enter a numeric value', 'field' => 'kksr_stars', 'value' => get_option('kksr_stars')));
BhittaniPlugin_AdminMarkup::input(array('title' => 'Width of single star', 'description' => 'Set the width of a single star in pixels(px).<br /><strong>Note: </strong>All stars must be of equal width', 'field' => 'kksr_stars_w', 'value' => get_option('kksr_stars_w')));
BhittaniPlugin_AdminMarkup::input(array('title' => 'Height of single star', 'description' => 'Set the height of a single star in pixels(px).<br /><strong>Note: </strong>All stars must be of equal height', 'field' => 'kksr_stars_h', 'value' => get_option('kksr_stars_h')));
BhittaniPlugin_AdminMarkup::image(array('title' => 'Gray Star', 'description' => 'You can modify the gray star image here', 'field' => 'kksr_stars_gray', 'label' => 'Choose an image', 'caption' => 'Gray Star', 'value' => get_option('kksr_stars_gray') ? get_option('kksr_stars_gray') : BhittaniPlugin_kkStarRatings::file_uri('gray.png')));
BhittaniPlugin_AdminMarkup::image(array('title' => 'Yellow Star', 'description' => 'You can modify the yellow star image here', 'field' => 'kksr_stars_yellow', 'label' => 'Choose an image', 'caption' => 'Yellow Star', 'value' => get_option('kksr_stars_yellow') ? get_option('kksr_stars_yellow') : BhittaniPlugin_kkStarRatings::file_uri('yellow.png')));
BhittaniPlugin_AdminMarkup::image(array('title' => 'Orange Star', 'description' => 'You can modify the orange star image here', 'field' => 'kksr_stars_orange', 'label' => 'Choose an image', 'caption' => 'Orange Star', 'value' => get_option('kksr_stars_orange') ? get_option('kksr_stars_orange') : BhittaniPlugin_kkStarRatings::file_uri('orange.png')));
?>
    </div>
    <!--bf_container __stars-->
    <div class="bf_container __tooltips <?php 
echo $opt == 'tooltips' ? '__active' : '';
?>
">
        <?php 
BhittaniPlugin_AdminMarkup::checkbox(array('title' => 'Tooltips', 'description' => 'Choose whether you want to enable or disable the tooltips', 'obj' => array(array('field' => 'kksr_tooltip', 'label' => 'Enable Tooltips', 'value' => get_option('kksr_tooltip')))));
$Tooltips = get_option('kksr_tooltips');
for ($tooltip_i = 0; $tooltip_i < get_option('kksr_stars'); $tooltip_i++) {
    BhittaniPlugin_AdminMarkup::input(array('title' => 'Tooltip - star ' . ($tooltip_i + 1), 'description' => 'Displayed when mouse is hovered over star ' . ($tooltip_i + 1), 'field' => 'kksr_tooltips[' . $tooltip_i . '][tip]', 'value' => isset($Tooltips[$tooltip_i]['tip']) ? $Tooltips[$tooltip_i]['tip'] : ''));
    BhittaniPlugin_AdminMarkup::color(array('title' => 'Tooltip Color - star ' . ($tooltip_i + 1), 'description' => 'Color for tooltip of star ' . ($tooltip_i + 1), 'field' => 'kksr_tooltips[' . $tooltip_i . '][color]', 'label' => 'Choose a color', 'value' => isset($Tooltips[$tooltip_i]['color']) ? $Tooltips[$tooltip_i]['color'] : '#ffffff'));
}
?>