Changeset 1668421
- Timestamp:
- 06/01/2017 07:50:37 AM (9 years ago)
- Location:
- chartsbeds/trunk
- Files:
-
- 7 edited
-
admin_widget_bar.php (modified) (4 diffs)
-
admin_widget_review.php (modified) (4 diffs)
-
chartsbeds-plugin-circle.php (modified) (1 diff)
-
chartsbeds-plugin-page.php (modified) (2 diffs)
-
chartsbeds-widget-bar.php (modified) (1 diff)
-
chartsbeds-widget-review.php (modified) (3 diffs)
-
hotelrev.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
chartsbeds/trunk/admin_widget_bar.php
r1648713 r1668421 26 26 $title = apply_filters('widget_title', $instance['title'] ); 27 27 $show_info = isset( $instance['show_info'] ) ? $instance['show_info'] : false; 28 $key = isset( $instance['key'] ) ? $instance['key'] : ''; 28 29 29 30 echo $before_widget."<div class='cb-widget'>"; … … 35 36 36 37 // Use shortcode in a PHP file (outside the post editor). 37 echo do_shortcode( '[chartsbeds-review-bar ]' );38 echo do_shortcode( '[chartsbeds-review-bar key="'.$key.'"]' ); 38 39 39 40 echo $after_widget."</div>"; … … 47 48 $instance['title'] = strip_tags( $new_instance['title'] ); 48 49 $instance['show_info'] = $new_instance['show_info']; 50 $instance['key'] = $new_instance['key']; 49 51 50 52 return $instance; … … 63 65 echo '<input id="'.$this->get_field_id( 'title' ).'" name="'.$this->get_field_name( 'title' ).'" value="'.$instance['title'].'" style="width:100%;" />'; 64 66 echo '</p>'; 67 68 echo "<p>"; 69 echo '<label for="'.$this->get_field_id( 'key' ).'">'; 70 _e('Key:', 'wreviews'); 71 echo '</label>'; 72 echo '<input id="'.$this->get_field_id( 'key' ).'" name="'.$this->get_field_name( 'key' ).'" value="'.$instance['key'].'" style="width:100%;" />'; 73 echo '</p>'; 65 74 } 66 75 } -
chartsbeds/trunk/admin_widget_review.php
r1648713 r1668421 27 27 $title = apply_filters('widget_title', $instance['title'] ); 28 28 $show_info = isset( $instance['show_info'] ) ? $instance['show_info'] : false; 29 $key = isset( $instance['key'] ) ? $instance['key']:''; 29 30 30 31 echo $before_widget."<div class='cb-widget'>"; … … 36 37 37 38 // Use shortcode in a PHP file (outside the post editor). 38 echo do_shortcode( '[chartsbeds-review-recent ]' );39 echo do_shortcode( '[chartsbeds-review-recent key="'.$key.'"]' ); 39 40 40 41 echo $after_widget."</div>"; … … 49 50 $instance['title'] = strip_tags( $new_instance['title'] ); 50 51 $instance['show_info'] = $new_instance['show_info']; 51 52 $instance['key'] = $new_instance['key']; 52 53 return $instance; 53 54 } … … 67 68 echo '<input id="'.$this->get_field_id( 'title' ).'" name="'.$this->get_field_name( 'title' ).'" value="'.$instance['title'].'" style="width:100%;" />'; 68 69 echo '</p>'; 70 71 echo '<p>'; 72 echo '<label for="'.$this->get_field_id( 'key' ).'">'; 73 _e('Key:', 'reviews'); 74 echo '</label>'; 75 echo '<input id="'.$this->get_field_id( 'key' ).'" name="'.$this->get_field_name( 'key' ).'" value="'.$instance['key'].'" style="width:100%;" />'; 76 echo '</p>'; 69 77 } 70 78 } -
chartsbeds/trunk/chartsbeds-plugin-circle.php
r1648713 r1668421 3 3 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly 4 4 5 function cbeds_circles_func(){ 6 7 $json = file_get_contents('http://dashboard.chartspms.com/REVIEWS.json.php?apiKey='.get_option("charts_key").''); 5 function cbeds_circles_func($atts){ 6 $cbc = shortcode_atts( array( 7 'key' => esc_attr($cbc['key']), 8 ), $atts ); 9 10 if(empty($cbc['key'])){ 11 $json = file_get_contents('http://dashboard.chartspms.com/REVIEWS.json.php?apiKey='.get_option("charts_key").''); 12 }else{ 13 $ekey = 'http://dashboard.chartspms.com/REVIEWS.json.php?apiKey='.$cbc['key'].''; 14 $json = file_get_contents($ekey); 15 } 16 8 17 $obj = json_decode($json, true); 9 18 -
chartsbeds/trunk/chartsbeds-plugin-page.php
r1650855 r1668421 11 11 $cbh = shortcode_atts( array( 12 12 'limit' => esc_attr($cbh['limit']), 13 'key' => esc_attr($cbh['key']), 13 14 ), $atts ); 14 15 … … 16 17 $cbh['limit'] = 200; 17 18 } 19 20 if(empty($cbh['key'])){ 21 $json = file_get_contents('http://dashboard.chartspms.com/REVIEWS.json.php?apiKey='.get_option("charts_key").'&limit='.esc_attr($cbh['limit']).''); 22 }else{ 23 $ekey = 'http://dashboard.chartspms.com/REVIEWS.json.php?apiKey='.$cbh['key'].'&limit='.esc_attr($cbh['limit']).''; 24 $json = file_get_contents($ekey); 25 } 18 26 19 $json = file_get_contents('http://dashboard.chartspms.com/REVIEWS.json.php?apiKey='.get_option("charts_key").'&limit='.esc_attr($cbh['limit']).'');27 //$json = file_get_contents('http://dashboard.chartspms.com/REVIEWS.json.php?apiKey='.get_option("charts_key").'&limit='.esc_attr($cbh['limit']).''); 20 28 $obj = json_decode($json, true); 21 29 -
chartsbeds/trunk/chartsbeds-widget-bar.php
r1648713 r1668421 3 3 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly 4 4 5 function cbeds_widget_bar_creation(){ 5 function cbeds_widget_bar_creation($atts){ 6 7 $cbb = shortcode_atts( array( 8 'key' => esc_attr($cbb['key']), 9 ), $atts ); 10 11 if(empty($cbb['key'])){ 12 $json = file_get_contents('http://dashboard.chartspms.com/REVIEWS.json.php?apiKey='.get_option("charts_key").''); 13 }else{ 14 $ekey = 'http://dashboard.chartspms.com/REVIEWS.json.php?apiKey='.$cbb['key'].''; 15 $json = file_get_contents($ekey); 16 } 6 17 7 $json = file_get_contents('http://dashboard.chartspms.com/REVIEWS.json.php?apiKey='.get_option("charts_key").'');18 //$json = file_get_contents('http://dashboard.chartspms.com/REVIEWS.json.php?apiKey='.get_option("charts_key").''); 8 19 $obj = json_decode($json, true); 9 20 -
chartsbeds/trunk/chartsbeds-widget-review.php
r1665961 r1668421 6 6 $cba = shortcode_atts( array( 7 7 'limit' => esc_attr($cba['limit']), 8 'key' => esc_attr($cba['key']), 8 9 ), $atts ); 9 10 … … 15 16 } 16 17 } 18 19 if(empty($cba['key'])){ 20 $json = file_get_contents('http://dashboard.chartspms.com/REVIEWS.json.php?apiKey='.get_option("charts_key").'&limit='.esc_attr($cba['limit']).''); 21 }else{ 22 $ekey = 'http://dashboard.chartspms.com/REVIEWS.json.php?apiKey='.$cba['key'].'&limit='.esc_attr($cba['limit']).''; 23 $json = file_get_contents($ekey); 24 } 17 25 18 26 echo '<script>'; … … 32 40 echo '<ul class="media-list">'; 33 41 34 $json = file_get_contents('http://dashboard.chartspms.com/REVIEWS.json.php?apiKey='.get_option("charts_key").'&limit='.esc_attr($cba['limit']).'');42 //$json = file_get_contents('http://dashboard.chartspms.com/REVIEWS.json.php?apiKey='.get_option("charts_key").'&limit='.esc_attr($cba['limit']).''); 35 43 $obj = json_decode($json, true); 36 44 -
chartsbeds/trunk/hotelrev.php
r1665959 r1668421 3 3 * Plugin Name: Chartsbeds 4 4 * Description: Chartsbeds reviews plugin. 5 * Version: 1.0. 45 * Version: 1.0.5 6 6 * Author: ChartsBeds 7 7 * Author URI: https://chartsbeds.com … … 26 26 add_action('wp_head', 'cbeds_add_header_mc'); 27 27 function cbeds_add_header_mc() { 28 29 wp_enqueue_style( 'rvmain-css', plugins_url( 'styles/style.css', __FILE__ ) ); 28 wp_enqueue_style( 'rvmain-css', plugins_url( 'styles/style.css', __FILE__ ) ); 30 29 wp_register_style( 'rvmain-css', plugins_url( 'styles/style.css', __FILE__ ) ); 31 30 if(!empty(get_option("dark_on"))){ … … 41 40 wp_enqueue_script( 'circles', plugins_url( 'scripts/circles.js', __FILE__ ) ); 42 41 wp_enqueue_script( 'shorten', plugins_url( 'scripts/shorten.js', __FILE__ ) ); 42 } 43 43 44 } 44 function wpb_adding_scripts() { 45 wp_register_script( 'iframe-resizer', 'https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/3.5.14/iframeResizer.min.js', '', '', false); 46 wp_enqueue_script( 'iframe-resizer');} 47 add_action( 'wp_enqueue_scripts', 'wpb_adding_scripts' ); 48 49 50 add_action( 'wp_footer', function () { 51 ?> 52 53 <script language="javascript" type="text/javascript"> 54 iFrameResize({log:false}); 55 </script> 56 57 <?php } ); 45 58 46 59 /*Adding settings page to Admin Panel*/
Note: See TracChangeset
for help on using the changeset viewer.