Changeset 2431304
- Timestamp:
- 12/04/2020 07:56:28 AM (5 years ago)
- Location:
- wp-image-sizes
- Files:
-
- 14 added
- 3 edited
-
tags/1.0.2 (added)
-
tags/1.0.2/assets (added)
-
tags/1.0.2/assets/css (added)
-
tags/1.0.2/assets/css/wpis-style.css (added)
-
tags/1.0.2/assets/js (added)
-
tags/1.0.2/assets/js/api-request.min.js (added)
-
tags/1.0.2/assets/js/wpis.js (added)
-
tags/1.0.2/includes (added)
-
tags/1.0.2/includes/tab-templates (added)
-
tags/1.0.2/includes/tab-templates/image-sizes.php (added)
-
tags/1.0.2/includes/wpis-settings.php (added)
-
tags/1.0.2/readme.txt (added)
-
tags/1.0.2/wp-image-sizes.php (added)
-
tags/1.0.2/wpis-init.php (added)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/wp-image-sizes.php (modified) (3 diffs)
-
trunk/wpis-init.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-image-sizes/trunk/readme.txt
r2408159 r2431304 1 1 === WP Image Sizes === 2 2 Contributors: aiwatech 3 Tags: image sizes, restrict image sizes, selective image sizes, media uploader image size, bulk image sizes3 Tags: image sizes, selected image sizes, uploader image sizes, bulk image sizes 4 4 Requires at least: 4.7 5 5 Requires PHP: 5.2.4 6 Stable tag: 1.0. 17 Tested up to: 5.5. 16 Stable tag: 1.0.2 7 Tested up to: 5.5.3 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 46 46 47 47 == Screenshots == 48 49 48 1. Assignment of image sizes to post types 50 49 2. The image sizes will show in media uploader … … 53 52 54 53 == Changelog == 54 = 1.0.2 = 55 * Plugin core changes 56 * Wordpress 5.5.3 compatibility 55 57 56 58 = 1.0.1 = -
wp-image-sizes/trunk/wp-image-sizes.php
r2408153 r2431304 4 4 * Plugin URI: https://aiwatech.com/wp-image-sizes 5 5 * Description: Save server space by creating selected image sizes for every post type. It allows to select registered image sizes in media uploader and helps to avoid creation of unneccessary images. 6 * Tags: image sizes,restrict image sizes,selective image sizes,media uploader image size,bulk image sizes 7 * Version: 1.0.1 6 * Version: 1.0.2 8 7 * Requires at least: 4.7 9 * Tested up to: 5.5. 18 * Tested up to: 5.5.3 10 9 * Author: Aiwatech 11 10 * Author URI: https://aiwatech.com … … 17 16 global $wpis, 18 17 $wpis_image_sizes, 19 $wpis_settings; 18 $wpis_settings, 19 $wpis_plugin_data; 20 20 21 21 $wpis = get_option( "wpis" ); … … 26 26 $wpis_image_sizes = []; 27 27 } 28 //=== Include plugin.php for plugin related functions 29 if( !function_exists( "is_plugin_active" ) ) { 30 require_once ABSPATH . "wp-admin/includes/plugin.php"; 31 } 28 32 29 define( "WPIS_PLUGIN_VERSION", "1.0.1" ); 30 define( "WPIS_PLUGIN_NAME", "wp-image-sizes" ); 33 //--- Get Plugin Data 34 $wpis_plugin_data = get_plugin_data(__FILE__); 35 36 define( "WPIS_PLUGIN_VERSION", $wpis_plugin_data["Version"] ); 37 define( "WPIS_PLUGIN_NAME", plugin_basename(__FILE__) ); 31 38 define( "WPIS_PLUGIN_URL", plugin_dir_url( __FILE__ ) ); 32 39 define( "WPIS_PLUGIN_PATH", plugin_dir_path(__FILE__) ); -
wp-image-sizes/trunk/wpis-init.php
r2408153 r2431304 1 1 <?php 2 2 defined( "ABSPATH" ) or die(); 3 4 //=== Check if Current Page is WPIS Page ===// 5 if(!function_exists("is_wpis_page")): 6 function is_wpis_page(){ 7 global $current_screen; 8 $get = array_map("sanitize_text_field", $_GET); 9 10 return (isset($current_screen->base) && $current_screen->base == "settings_page_wpis") 11 || ( isset($get["page"]) && $get["page"] == "wpis" ); 12 } 13 endif; 3 14 4 15 if(!function_exists("wpis_styles")): … … 204 215 } 205 216 206 $wpis_image_sizes[$post_type] = isset($_SESSION["wpis_image_sizes"][$post_type]) ? array_map("sanitize_text_field",$_SESSION["wpis_image_sizes"][$post_type]) : array_map("sanitize_text_field", $wpis_image_sizes[$post_type]);217 $wpis_image_sizes[$post_type] = isset($_SESSION["wpis_image_sizes"][$post_type]) ? array_map("sanitize_text_field",$_SESSION["wpis_image_sizes"][$post_type]) : array_map("sanitize_text_field", (array)$wpis_image_sizes[$post_type]); 207 218 208 219 foreach( $intermediate_image_sizes as $image_size ){
Note: See TracChangeset
for help on using the changeset viewer.