Changeset 2254779
- Timestamp:
- 03/05/2020 02:08:36 AM (6 years ago)
- Location:
- wp-easy-gallery/trunk
- Files:
-
- 6 edited
-
admin/add-gallery.php (modified) (1 diff)
-
admin/add-images.php (modified) (2 diffs)
-
admin/edit-gallery.php (modified) (1 diff)
-
admin/overview.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
wp-easy-gallery.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-easy-gallery/trunk/admin/add-gallery.php
r2137518 r2254779 1 1 <?php 2 2 if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.'); } 3 /*4 $galleryName = '';5 $galleryDescription = '';6 $slug = '';7 $imagepath = '';8 $thumbwidth = '';9 $thumbheight = '';10 3 11 $galleryAdded = false;12 13 if(isset($_POST['hcg_add_gallery']))14 {15 if(check_admin_referer('wpeg_add_gallery','wpeg_add_gallery')) {16 if($_POST['galleryName'] != "") {17 $galleryName = sanitize_text_field($_POST['galleryName']);18 $galleryDescription = sanitize_text_field($_POST['galleryDescription']);19 $slug = mb_convert_case(str_replace(" ", "", sanitize_text_field($_POST['galleryName'])), MB_CASE_LOWER, "UTF-8");20 $imagepath = sanitize_text_field(str_replace("\\", "", $_POST['upload_image']));21 $thumbwidth = sanitize_text_field($_POST['gallerythumbwidth']);22 $thumbheight = sanitize_text_field($_POST['gallerythumbheight']);23 24 global $wpdb;25 global $easy_gallery_table;26 27 $gallery = $wpdb->get_row( "SELECT * FROM $wpdb->easyGalleries WHERE slug = '".$slug."'" );28 29 if (count($gallery) > 0) {30 $slug = $slug."-".count($gallery);31 }32 33 $galleryAdded = $wpdb->insert( $wpdb->easyGalleries, array( 'name' => $galleryName, 'slug' => $slug, 'description' => $galleryDescription, 'thumbnail' => $imagepath, 'thumbwidth' => $thumbwidth, 'thumbheight' => $thumbheight ) );34 35 $galleryNew = $wpdb->get_row( "SELECT * FROM $wpdb->easyGalleries WHERE slug = '".$slug."'" );36 37 if($galleryAdded) {38 ?>39 <div class="updated"><p><strong><?php _e('Gallery Added.' ); ?></strong></p></div>40 <?php41 }42 }43 else {44 ?>45 <div class="updated"><p><strong><?php _e('Please enter a gallery name.' ); ?></strong></p></div>46 <?php47 }48 }49 }*/50 4 ob_start(); 51 5 ?> -
wp-easy-gallery/trunk/admin/add-images.php
r2125007 r2254779 3 3 4 4 global $wpdb; 5 $imageResults = null;5 $imageResults = []; 6 6 $galleryResults = $wpdb->get_results( "SELECT * FROM $wpdb->easyGalleries" ); 7 7 … … 15 15 } 16 16 17 /*18 //Edit/Delete Images19 if(isset($_POST['editing_images'])) {20 if(check_admin_referer('wpeg_gallery','wpeg_gallery')) {21 $_POST = stripslashes_deep( $_POST );22 23 $editImageIds = array_map('absint', $_POST['edit_imageId']);24 $imagePaths = array_map('sanitize_text_field', $_POST['edit_imagePath']);25 $imageTitles = array_map('sanitize_text_field', $_POST['edit_imageTitle']);26 $imageDescriptions = array_map('sanitize_text_field', $_POST['edit_imageDescription']);27 $sortOrders = array_map('absint', $_POST['edit_imageSort']);28 $imagesToDelete = isset($_POST['edit_imageDelete']) ? array_map('absint', $_POST['edit_imageDelete']) : array();29 30 $i = 0;31 foreach($editImageIds as $editImageId) {32 if(in_array($editImageId, $imagesToDelete)) {33 $wpdb->query( "DELETE FROM $wpdb->easyImages WHERE Id = '".$editImageId."'" );34 echo "Deleted: ".$imageTitles[$i];35 }36 else {37 $imageEdited = $wpdb->update( $wpdb->easyImages, array( 'imagePath' => $imagePaths[$i], 'title' => $imageTitles[$i], 'description' => $imageDescriptions[$i], 'sortOrder' => $sortOrders[$i] ), array( 'Id' => $editImageId ) );38 }39 $i++;40 }41 ?>42 <div class="updated"><p><strong><?php _e('Images have been edited.' ); ?></strong></p></div>43 <?php44 }45 }46 */47 17 if(isset($_POST['editing_gid'])) { 48 18 if(check_admin_referer('wpeg_gallery','wpeg_gallery')) { -
wp-easy-gallery/trunk/admin/edit-gallery.php
r2137518 r2254779 12 12 $gallery = $wpdb->get_row( "SELECT * FROM $wpdb->easyGalleries WHERE Id = $gid" ); 13 13 } 14 /* 15 if(isset($_POST['hcg_edit_gallery'])) 16 { 17 if(check_admin_referer('wpeg_gallery','wpeg_gallery')) { 18 if($_POST['galleryName'] != "") { 19 $galleryName = sanitize_text_field($_POST['galleryName']); 20 $galleryDescription = sanitize_text_field($_POST['galleryDescription']); 21 $slug = mb_convert_case(str_replace(" ", "", sanitize_text_field($_POST['galleryName'])), MB_CASE_LOWER, "UTF-8"); 22 $imagepath = sanitize_text_field(str_replace("\\", "", $_POST['upload_image'])); 23 $thumbwidth = sanitize_text_field($_POST['gallerythumbwidth']); 24 $thumbheight = sanitize_text_field($_POST['gallerythumbheight']); 25 26 if(isset($_POST['hcg_edit_gallery'])) { 27 $imageEdited = $wpdb->update( $wpdb->easyGalleries, array( 'name' => $galleryName, 'slug' => $slug, 'description' => $galleryDescription, 'thumbnail' => $imagepath, 'thumbwidth' => $thumbwidth, 'thumbheight' => $thumbheight ), array( 'Id' => intval($_POST['hcg_edit_gallery']) ) ); 28 29 ?> 30 <div class="updated"><p><strong><?php _e('Gallery has been edited.' ); ?></strong></p></div> 31 <?php 32 } 33 } 34 } 35 } 36 */ 14 37 15 if(isset($_POST['hcg_edit_gallery'])) { 38 16 if(check_admin_referer('wpeg_gallery','wpeg_gallery')) { -
wp-easy-gallery/trunk/admin/overview.php
r2137518 r2254779 5 5 $galleryResults = $wpdb->get_results( "SELECT * FROM $wpdb->easyGalleries" ); 6 6 7 /*8 if (isset($_POST['defaultSettings'])) {9 if(check_admin_referer('wpeg_settings','wpeg_settings')) {10 $temp_defaults = get_option('wp_easy_gallery_defaults');11 $temp_defaults['hide_social'] = isset($_POST['hide_social']) ? $_POST['hide_social'] : 'false';12 13 update_option('wp_easy_gallery_defaults', $temp_defaults);14 15 ?>16 <div class="updated"><p><strong><?php _e('Options saved.', 'wp-easy-gallery'); ?></strong></p></div>17 <?php18 }19 }20 $default_options = get_option('wp_easy_gallery_defaults');21 */22 7 ob_start(); 23 8 ?> -
wp-easy-gallery/trunk/readme.txt
r2228213 r2254779 6 6 Tested up to: 5.3 7 7 Requires PHP: 5.6 8 Stable tag: 4.8. 38 Stable tag: 4.8.4 9 9 10 10 WP Easy Gallery is a powerful WordPress gallery plugin that is easy to use. WP Easy Gallery gives you the power to create and manage unlimited image galleries. … … 152 152 == Changelog == 153 153 154 **v4.8.4** 155 156 * Fixed Parameter must be an object warning on add images page. 157 154 158 **v4.8.3** 155 159 -
wp-easy-gallery/trunk/wp-easy-gallery.php
r2154519 r2254779 7 7 Text Domain: wp-easy-gallery 8 8 Domain Path: /languages 9 Version: 4.8. 39 Version: 4.8.4 10 10 Author URI: https://plugingarden.com/ 11 11 */ … … 17 17 public function __construct() { 18 18 $this->plugin_name = plugin_basename(__FILE__); 19 $this->plugin_version = "4.8. 3";19 $this->plugin_version = "4.8.4"; 20 20 $this->db_version = "1.3"; 21 21
Note: See TracChangeset
for help on using the changeset viewer.