Plugin Directory

Changeset 2431304


Ignore:
Timestamp:
12/04/2020 07:56:28 AM (5 years ago)
Author:
aiwatech
Message:

WPIS 1.0.2

Location:
wp-image-sizes
Files:
14 added
3 edited

Legend:

Unmodified
Added
Removed
  • wp-image-sizes/trunk/readme.txt

    r2408159 r2431304  
    11=== WP Image Sizes ===
    22Contributors: aiwatech
    3 Tags: image sizes, restrict image sizes, selective image sizes, media uploader image size, bulk image sizes
     3Tags: image sizes, selected image sizes, uploader image sizes, bulk image sizes
    44Requires at least: 4.7
    55Requires PHP: 5.2.4
    6 Stable tag: 1.0.1
    7 Tested up to: 5.5.1
     6Stable tag: 1.0.2
     7Tested up to: 5.5.3
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    4646
    4747== Screenshots ==
    48 
    49481. Assignment of image sizes to post types
    50492. The image sizes will show in media uploader
     
    5352
    5453== Changelog ==
     54= 1.0.2 =
     55* Plugin core changes
     56* Wordpress 5.5.3 compatibility
    5557
    5658= 1.0.1 =
  • wp-image-sizes/trunk/wp-image-sizes.php

    r2408153 r2431304  
    44 * Plugin URI: https://aiwatech.com/wp-image-sizes
    55 * 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
    87 * Requires at least: 4.7
    9  * Tested up to: 5.5.1
     8 * Tested up to: 5.5.3
    109 * Author: Aiwatech
    1110 * Author URI: https://aiwatech.com
     
    1716global $wpis,
    1817        $wpis_image_sizes,
    19         $wpis_settings;
     18        $wpis_settings,
     19        $wpis_plugin_data;
    2020
    2121$wpis               = get_option( "wpis" );
     
    2626    $wpis_image_sizes = [];
    2727}
     28//=== Include plugin.php for plugin related functions
     29if( !function_exists( "is_plugin_active" ) ) {
     30    require_once ABSPATH . "wp-admin/includes/plugin.php";
     31}
    2832
    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
     36define( "WPIS_PLUGIN_VERSION", $wpis_plugin_data["Version"] );
     37define( "WPIS_PLUGIN_NAME", plugin_basename(__FILE__) );
    3138define( "WPIS_PLUGIN_URL", plugin_dir_url( __FILE__ ) );
    3239define( "WPIS_PLUGIN_PATH", plugin_dir_path(__FILE__) );
  • wp-image-sizes/trunk/wpis-init.php

    r2408153 r2431304  
    11<?php
    22defined( "ABSPATH" ) or die();
     3
     4//=== Check if Current Page is WPIS Page ===//
     5if(!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    }
     13endif;
    314
    415if(!function_exists("wpis_styles")):
     
    204215        }
    205216       
    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]);
    207218       
    208219        foreach( $intermediate_image_sizes as $image_size ){
Note: See TracChangeset for help on using the changeset viewer.