Changeset 1992038
- Timestamp:
- 12/11/2018 05:51:12 PM (7 years ago)
- Location:
- wp-google-places-review-slider
- Files:
-
- 73 added
- 6 edited
-
tags/4.9/admin/class-wp-google-reviews-admin.php (modified) (2 diffs)
-
tags/4.9/admin/css/wprev_admin.css (modified) (1 diff)
-
tags/4.9/admin/js/review_list_page.js (modified) (2 diffs)
-
tags/4.9/admin/partials/google_mystery_man.png (added)
-
tags/4.9/admin/partials/review_list.php (modified) (5 diffs)
-
tags/4.9/admin/partials/tabmenu.php (modified) (1 diff)
-
tags/5.0 (added)
-
tags/5.0/LICENSE.txt (added)
-
tags/5.0/README.txt (added)
-
tags/5.0/admin (added)
-
tags/5.0/admin/class-wp-google-reviews-admin.php (added)
-
tags/5.0/admin/css (added)
-
tags/5.0/admin/css/wprev_admin.css (added)
-
tags/5.0/admin/css/wprev_w3.css (added)
-
tags/5.0/admin/index.php (added)
-
tags/5.0/admin/js (added)
-
tags/5.0/admin/js/review_list_page.js (added)
-
tags/5.0/admin/js/templates_posts_page.js (added)
-
tags/5.0/admin/js/wprev_admin.js (added)
-
tags/5.0/admin/js/wprev_getgoogle.js (added)
-
tags/5.0/admin/js/wprev_simple-popup.min.js (added)
-
tags/5.0/admin/js/wprevpro-wp-color-picker-alpha.js (added)
-
tags/5.0/admin/partials (added)
-
tags/5.0/admin/partials/WPFPR_Instructions.pdf (added)
-
tags/5.0/admin/partials/get_pro.php (added)
-
tags/5.0/admin/partials/google_mystery_man.png (added)
-
tags/5.0/admin/partials/googlesettings.php (added)
-
tags/5.0/admin/partials/logo.png (added)
-
tags/5.0/admin/partials/pro_settings.png (added)
-
tags/5.0/admin/partials/review_list.php (added)
-
tags/5.0/admin/partials/sample_avatar.jpg (added)
-
tags/5.0/admin/partials/settings.php (added)
-
tags/5.0/admin/partials/tabmenu.php (added)
-
tags/5.0/admin/partials/template1_thumb.png (added)
-
tags/5.0/admin/partials/templates_posts.php (added)
-
tags/5.0/includes (added)
-
tags/5.0/includes/class-wp-google-reviews-activator.php (added)
-
tags/5.0/includes/class-wp-google-reviews-deactivator.php (added)
-
tags/5.0/includes/class-wp-google-reviews-i18n.php (added)
-
tags/5.0/includes/class-wp-google-reviews-loader.php (added)
-
tags/5.0/includes/class-wp-google-reviews.php (added)
-
tags/5.0/includes/index.php (added)
-
tags/5.0/index.php (added)
-
tags/5.0/languages (added)
-
tags/5.0/languages/wp-google-reviews.pot (added)
-
tags/5.0/public (added)
-
tags/5.0/public/class-wp-google-reviews-public.php (added)
-
tags/5.0/public/class-wp-google-reviews-template_action.php (added)
-
tags/5.0/public/class-wp-google-reviews-widget.php (added)
-
tags/5.0/public/css (added)
-
tags/5.0/public/css/imgs (added)
-
tags/5.0/public/css/imgs/mystery-man.png (added)
-
tags/5.0/public/css/imgs/slider_arrow.png (added)
-
tags/5.0/public/css/wprev-public_template1.css (added)
-
tags/5.0/public/css/wprev_w3.css (added)
-
tags/5.0/public/css/wprs_unslider-dots.css (added)
-
tags/5.0/public/css/wprs_unslider.css (added)
-
tags/5.0/public/index.php (added)
-
tags/5.0/public/js (added)
-
tags/5.0/public/js/unslider-min.js (added)
-
tags/5.0/public/js/wprev-public.js (added)
-
tags/5.0/public/js/wprs-unslider-min.js (added)
-
tags/5.0/public/js/wprs-unslider.js (added)
-
tags/5.0/public/partials (added)
-
tags/5.0/public/partials/imgs (added)
-
tags/5.0/public/partials/imgs/fb_profile.jpg (added)
-
tags/5.0/public/partials/imgs/four-stars_0.png (added)
-
tags/5.0/public/partials/imgs/stars_0_yellow.png (added)
-
tags/5.0/public/partials/imgs/stars_1_yellow.png (added)
-
tags/5.0/public/partials/imgs/stars_2_yellow.png (added)
-
tags/5.0/public/partials/imgs/stars_3_yellow.png (added)
-
tags/5.0/public/partials/imgs/stars_4_yellow.png (added)
-
tags/5.0/public/partials/imgs/stars_5_yellow.png (added)
-
tags/5.0/public/partials/template_style_1.php (added)
-
tags/5.0/public/partials/wp-google-reviews-public-display-widget.php (added)
-
tags/5.0/public/partials/wp-google-reviews-public-display.php (added)
-
tags/5.0/uninstall.php (added)
-
tags/5.0/wp-google-reviews.php (added)
-
trunk/README.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-google-places-review-slider/tags/4.9/admin/class-wp-google-reviews-admin.php
r1966529 r1992038 187 187 //admin js 188 188 wp_enqueue_script('review_list_page-js', plugin_dir_url( __FILE__ ) . 'js/review_list_page.js', array( 'jquery' ), $this->version, false ); 189 190 wp_enqueue_script('thickbox'); 191 wp_enqueue_style('thickbox'); 192 193 wp_enqueue_script('media-upload'); 194 wp_enqueue_script('wptuts-upload'); 189 195 } 190 196 … … 203 209 //enque alpha color add-on wprevpro-wp-color-picker-alpha.js 204 210 wp_enqueue_script( 'wp-color-picker-alpha', plugin_dir_url( __FILE__ ) . 'js/wprevpro-wp-color-picker-alpha.js', array( 'wp-color-picker' ), '2.1.2', false ); 211 205 212 } 206 213 } -
wp-google-places-review-slider/tags/4.9/admin/css/wprev_admin.css
r1966529 r1992038 113 113 } 114 114 /*---------------review list page-------------*/ 115 .editrev { 116 cursor: pointer; 117 } 115 118 .wpfbr_margin10 { 116 119 margin-top: 10px; -
wp-google-places-review-slider/tags/4.9/admin/js/review_list_page.js
r1966529 r1992038 42 42 }); 43 43 44 $( "#wprevpro_addnewreview_cancel" ).click(function() { 45 jQuery("#wprevpro_new_review").hide("slow"); 46 //reload page without taction and tid 47 //setTimeout(function(){ 48 //window.location.href = "?page=wp_pro-reviews"; 49 //}, 500); 50 51 }); 52 44 53 //remove all button 45 54 $( "#wpfbr_removeallbtn" ).click(function() { … … 51 60 openpopup("Upgrade Needed", '<p>Please upgrade to the Pro Version of this Plugin to access this feature.</p>', '<a class="button dashicons-before dashicons-cart" href="?page=wp_google-get_pro">Upgrade Here</a>'); 52 61 }); 62 63 //upload avatar button---------------------------------- 64 $('#upload_avatar_button').click(function() { 65 tb_show('Upload Reviewer Avatar', 'media-upload.php?referer=wp_pro-reviews&type=image&TB_iframe=true&post_id=0', false); 66 return false; 67 }); 68 window.send_to_editor = function(html) { 69 var image_url = jQuery("<div>" + html + "</div>").find('img').attr('src'); 70 //var image_url = $('img',html).attr('src'); 71 $('#wprevpro_nr_avatar_url').val(image_url); 72 $("#avatar_preview").attr("src",image_url); 73 tb_remove(); 74 } 75 //for adding default avater url to input rlimg 76 $( ".rlimg" ).click(function() { 77 var tempsrc = $(this).attr('src'); 78 $("#wprevpro_nr_avatar_url").val(tempsrc); 79 $("#wprevpro_nr_avatar_url").select(); 80 $("#avatar_preview").attr("src",tempsrc); 81 }); 53 82 54 83 //launch pop-up windows code-------- -
wp-google-places-review-slider/tags/4.9/admin/partials/review_list.php
r1966529 r1992038 22 22 $table_name = $wpdb->prefix . 'wpfb_reviews'; 23 23 $rowsperpage = 20; 24 25 $dbmsg = ""; 26 $html=""; 27 $currentreview= new stdClass(); 28 $currentreview->id=""; 29 $currentreview->rating=""; 30 $currentreview->review_title=""; 31 $currentreview->review_text=""; 32 $currentreview->reviewer_name=""; 33 $currentreview->reviewer_id=""; 34 $currentreview->company_name=""; 35 $currentreview->created_time=""; 36 $currentreview->created_time_stamp=""; 37 $currentreview->userpic=""; 38 $currentreview->review_length=""; 39 $currentreview->type=""; 40 $currentreview->from_name=""; 41 $currentreview->from_url=""; 42 $currentreview->from_logo=""; 43 $currentreview->consent=""; 44 $currentreview->hidestars=""; 45 46 //form updating here--------------------------- 47 if(isset($_GET['editrev'])){ 48 $rid = htmlentities($_GET['editrev']); 49 //for updating 50 if($rid > 0){ 51 //get form array 52 $currentreview = $wpdb->get_row( "SELECT * FROM ".$table_name." WHERE id = ".$rid ); 53 } 54 55 } 56 //------------------------------------------ 57 58 //form posting here-------------------------------- 59 //if template id present then update database if not then insert as new. 60 if (isset($_POST['wprevpro_submitreviewbtn'])){ 61 //verify nonce wp_nonce_field( 'wprevpro_save_review'); 62 check_admin_referer( 'wprevpro_save_review'); 63 64 //get form submission values and then save or update 65 $r_id = sanitize_text_field($_POST['editrid']); 66 //$rating = sanitize_text_field($_POST['wprevpro_nr_rating']); 67 //$text = sanitize_textarea_field($_POST['wprevpro_nr_text']); 68 //$name = sanitize_text_field($_POST['wprevpro_nr_name']); 69 $avatar_url = esc_url_raw($_POST['wprevpro_nr_avatar_url']); 70 //$rdate = sanitize_text_field($_POST['wprevpro_nr_date']); 71 72 //insert or update 73 $data = array( 74 'userpic' => "$avatar_url", 75 ); 76 $format = array( 77 '%s', 78 ); 79 80 if($r_id==""){ 81 //insert 82 //$wpdb->insert( $table_name, $data, $format ); 83 } else { 84 //update 85 $updatetempquery = $wpdb->update($table_name, $data, array( 'id' => $r_id ), $format, array( '%d' )); 86 if($updatetempquery>0){ 87 $dbmsg = '<div id="setting-error-wprevpro_message" class="updated settings-error notice is-dismissible">'.__('<p><strong>Review Updated!</strong></p><button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></button>', 'wp-review-slider-pro').'</div>'; 88 } 89 } 90 } 24 91 ?> 25 92 <div class="wrap" id="wp_fb-settings"> … … 37 104 </p> 38 105 </div> 106 <div class="wprevpro_margin10" id="wprevpro_new_review" <?php if($currentreview->id<1){echo "style='display:none;'";}?>> 107 <form name="newreviewform" id="newreviewform" action="?page=wp_google-reviews" method="post" onsubmit="return validateForm()"> 108 <table class="form-table "> 109 <tbody> 110 <tr class="wprevpro_row"> 111 <th scope="row"> 112 <?php _e('Review Rating (1 - 5):', 'wp-review-slider-pro'); ?> 113 </th> 114 <td><div id="divtemplatestyles"> 115 <?php 116 //if this is a not a manual review or new one then disable this 117 $tempdisable = 'disabled'; 118 ?> 119 <input type="radio" name="wprevpro_nr_rating" id="wprevpro_nr_rating1-radio" value="1" <?php if($currentreview->rating=="1"){echo "checked";} else {echo $tempdisable;}?> <?php echo $tempdisable; ?>> 120 <label for="wprevpro_template_type1-radio"><?php _e('1', 'wp-review-slider-pro'); ?></label> 121 <input type="radio" name="wprevpro_nr_rating" id="wprevpro_nr_rating2-radio" value="2" <?php if($currentreview->rating=="2"){echo "checked";} else {echo $tempdisable;}?> <?php echo $tempdisable; ?>> 122 <label for="wprevpro_template_type2-radio"><?php _e('2', 'wp-review-slider-pro'); ?></label> 123 124 <input type="radio" name="wprevpro_nr_rating" id="wprevpro_nr_rating3-radio" value="3" <?php if($currentreview->rating=="3"){echo "checked";} else {echo $tempdisable;}?> <?php echo $tempdisable; ?>> 125 <label for="wprevpro_template_type2-radio"><?php _e('3', 'wp-review-slider-pro'); ?></label> 126 127 <input type="radio" name="wprevpro_nr_rating" id="wprevpro_nr_rating4-radio" value="4" <?php if($currentreview->rating=="4"){echo "checked";} else {echo $tempdisable;}?> <?php echo $tempdisable; ?>> 128 <label for="wprevpro_template_type2-radio"><?php _e('4', 'wp-review-slider-pro'); ?></label> 129 130 <input type="radio" name="wprevpro_nr_rating" id="wprevpro_nr_rating5-radio" value="5" <?php if($currentreview->rating=="5" || $currentreview->rating==""){echo "checked";} else {echo $tempdisable;}?> > 131 <label for="wprevpro_template_type2-radio"><?php _e('5', 'wp-review-slider-pro'); ?></label> 132 133 134 </div> 135 136 </td> 137 </tr> 138 <tr class="wprevpro_row"> 139 <th scope="row"> 140 <?php _e('Review Text:', 'wp-review-slider-pro'); ?> 141 </th> 142 <td> 143 <?php 144 //if this is a not a manual review or new one then disable this 145 $tempdisable = 'readonly'; 146 ?> 147 <textarea name="wprevpro_nr_text" id="wprevpro_nr_text" cols="50" rows="4" <?php echo $tempdisable; ?>><?php echo $currentreview->review_text; ?></textarea> 148 </td> 149 </tr> 150 <tr class="wprevpro_row"> 151 <th scope="row"> 152 <?php _e('Reviewer Name:', 'wp-review-slider-pro'); ?> 153 </th> 154 <td> 155 <input id="wprevpro_nr_name" data-custom="custom" type="text" name="wprevpro_nr_name" placeholder="" value="<?php echo $currentreview->reviewer_name; ?>" required <?php echo $tempdisable; ?>> 156 <span class="description"> 157 <?php _e('Enter the name of the person who wrote this review.', 'wp-review-slider-pro'); ?> </span> 158 </td> 159 </tr> 160 <tr class="wprevpro_row"> 161 <th scope="row"> 162 <?php _e('Reviewer Pic URL:', 'wp-review-slider-pro'); ?> 163 </th> 164 <td> 165 <input id="wprevpro_nr_avatar_url" data-custom="custom" type="text" name="wprevpro_nr_avatar_url" placeholder="" value="<?php if($currentreview->userpic!=""){echo $currentreview->userpic; } else {echo plugin_dir_url( __FILE__ ) . 'google_mystery_man.png';} ?>"> <a id="upload_avatar_button" class="button"><?php _e('Upload', 'wp-review-slider-pro'); ?></a> 166 <br><span class="description"> 167 <?php _e('Avatar for the person who wrote the review. Click the following image to insert generic avatar URL.', 'wp-review-slider-pro'); ?> 168 </span> 169 <div class="avatar_images_list"> 170 <img src="<?php echo plugin_dir_url( __FILE__ ); ?>google_mystery_man.png" alt="thumb" class="rlimg default_avatar_img"> 171 </div> 172 </br> 173 <img class="" height="100px" id="avatar_preview" src="<?php if($currentreview->userpic!=""){echo $currentreview->userpic; } else {echo plugin_dir_url( __FILE__ ) . 'google_mystery_man.png';} ?>"> 174 </td> 175 </tr> 176 <tr class="wprevpro_row"> 177 <th scope="row"> 178 <?php _e('Review Date:', 'wp-review-slider-pro'); ?> 179 </th> 180 <td> 181 <input id="wprevpro_nr_date" data-custom="custom" type="text" name="wprevpro_nr_date" placeholder="" value="<?php if($currentreview->created_time!=""){echo $currentreview->created_time; } else {echo date("Y-m-d H:i:s",current_time( 'timestamp' ));} ?>" required readonly> 182 </td> 183 </tr> 184 </tbody> 185 </table> 186 <?php 187 //security nonce 188 wp_nonce_field( 'wprevpro_save_review'); 189 $customlastsaveoption = get_option('wprevpro_customlastsave'); 190 ?> 191 <input type="hidden" name="editrid" id="editrid" value="<?php echo $currentreview->id; ?>"> 192 <input type="hidden" name="editrtype" id="editrtype" value="<?php echo $currentreview->type; ?>"> 193 <input type="submit" name="wprevpro_submitreviewbtn" id="wprevpro_submitreviewbtn" class="button button-primary" value="<?php _e('Save Review', 'wp-review-slider-pro'); ?>"> 194 <a id="wprevpro_addnewreview_cancel" class="button button-secondary"><?php _e('Cancel', 'wp-review-slider-pro'); ?></a> 195 </form> 196 </br></br> 197 </div> 198 39 199 <?php 40 200 … … 107 267 <thead> 108 268 <tr> 109 <th scope="col" width="70px" class="manage-column">< a href="'.esc_url( add_query_arg( 'sortby', 'hide',$currenturl ) ).$sortdirection.'"><i class="dashicons dashicons-sort '.$sorticoncolor[0].'" aria-hidden="true"></i> '.__('Hide', 'wp-google-reviews').'</a></th>269 <th scope="col" width="70px" class="manage-column"><i class="dashicons dashicons-sort '.$sorticoncolor[0].'" aria-hidden="true"></i> '.__('Edit', 'wp-google-reviews').'</th> 110 270 <th scope="col" width="50px" class="manage-column">'.__('Pic', 'wp-google-reviews').'</th> 111 271 <th scope="col" style="min-width:70px" class="manage-column"><a href="'.esc_url( add_query_arg( 'sortby', 'reviewer_name',$currenturl ) ).$sortdirection.'"><i class="dashicons dashicons-sort '.$sorticoncolor[1].'" aria-hidden="true"></i> '.__('Name', 'wp-google-reviews').'</a></th> … … 136 296 foreach ( $reviewsrows as $reviewsrow ) 137 297 { 138 if($reviewsrow->hide!="yes"){ 139 $hideicon = '<i class="dashicons dashicons-visibility text_green" aria-hidden="true"></i>'; 140 } else { 141 $hideicon = '<i class="dashicons dashicons-hidden" aria-hidden="true"></i>'; 142 } 143 $hideicon =''; 298 $hideicon = '<i class="dashicons dashicons-admin-tools editrev" aria-hidden="true"></i>'; 299 144 300 //user image 145 301 if($reviewsrow->userpic!=""){ 146 $userpic = '<img style="-webkit-user-select: none " src="'.$reviewsrow->userpic.'">';302 $userpic = '<img style="-webkit-user-select: none; width:100px;" src="'.$reviewsrow->userpic.'">'; 147 303 } else { 148 $userpic = '<img style="-webkit-user-select: none " src="https://graph.facebook.com/v2.2/'.$reviewsrow->reviewer_id.'/picture?type=square">';304 $userpic = '<img style="-webkit-user-select: none; width:100px;" src="https://graph.facebook.com/v2.2/'.$reviewsrow->reviewer_id.'/picture?type=square">'; 149 305 } 150 306 //user profile link … … 158 314 159 315 $html .= '<tr id="'.$reviewsrow->id.'"> 160 <th scope="col" class=" wpfbr_upgrade_needed manage-column">'.$hideicon.'</th>316 <th scope="col" class="manage-column"><a href="'.esc_url( add_query_arg( 'editrev', $reviewsrow->id,$currenturl ) ).'">'.$hideicon.'</a></th> 161 317 <th scope="col" class="manage-column">'.$userpic.'</th> 162 318 <th scope="col" class="manage-column">'.$reviewsrow->reviewer_name.'</th> -
wp-google-places-review-slider/tags/4.9/admin/partials/tabmenu.php
r1966529 r1992038 1 1 <?php 2 $urltrimmedtab = remove_query_arg( array('page', '_wpnonce', 'taction', 'tid', 'sortby', 'sortdir', 'opt', 'settings-updated' ) );2 $urltrimmedtab = remove_query_arg( array('page', '_wpnonce', 'taction', 'tid', 'sortby', 'sortdir', 'opt', 'settings-updated','editrev' ) ); 3 3 4 4 $urlsettings = esc_url( add_query_arg( 'page', 'wp_fb-settings',$urltrimmedtab ) ); -
wp-google-places-review-slider/trunk/README.txt
r1990916 r1992038 5 5 Requires at least: 3.0.1 6 6 Tested up to: 5.0 7 Stable tag: 4.97 Stable tag: 5.0 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 83 83 84 84 == Changelog == 85 = 5.0 = 86 * added ability to update Avatar image location. 85 87 = 4.9 = 86 88 * hidden date no longer gets added to page.
Note: See TracChangeset
for help on using the changeset viewer.