Plugin Directory

Changeset 3319341


Ignore:
Timestamp:
06/29/2025 07:48:46 AM (9 months ago)
Author:
wpvncom
Message:

8.6.3

Location:
wp-extra/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • wp-extra/trunk/readme.txt

    r3255152 r3319341  
    44Tags: extra, functions, wpvnteam, security, enhancements, tweaks, optimizations, tools
    55Requires at least: 6.5
    6 Tested up to: 6.8.0
    7 Stable tag: 8.6.2
     6Tested up to: 6.8.1
     7Stable tag: 8.6.3
    88Requires PHP: 7.4
    99License: GPLv2 or later
     
    1414== Description ==
    1515
    16 https://www.youtube.com/watch?v=H5vXwe5nyiQ
     16[youtube https://www.youtube.com/watch?v=H5vXwe5nyiQ]
    1717
    1818🚀 Boost your website’s functionality, security and SEO with WP EXtra – the all-in-one tool for WordPress users!
     
    178178== Changelog ==
    179179
     180= 8.6.3 =
     181* [NEW] WordPress 6.8.1 compatibility
     182
    180183= 8.6.2 =
    181184* [FIX] Nofollow
  • wp-extra/trunk/src/Modules/Media.php

    r3243284 r3319341  
    1919        'save_images',
    2020        'autoset',
     21        'allow_filetype',
    2122    ];
    2223   
     
    5253    public function autoset() {
    5354        add_action( 'save_post', [$this, 'auto_featured_image'] );
     55    }
     56   
     57    public function allow_filetype() {
     58        add_filter('wp_check_filetype_and_ext', [$this, 'ignore_upload_ext'], 10, 4);
     59        add_filter('mime_types', [$this, 'webp_upload_mimes']);
     60        add_filter('file_is_displayable_image', [$this, 'webp_is_displayable'], 10, 2);
    5461    }
    5562   
     
    359366    }
    360367   
     368    function ignore_upload_ext($checked, $file, $filename, $mimes){
     369        if(!$checked['type']){
     370            $wp_filetype = wp_check_filetype( $filename, $mimes );
     371            $ext = $wp_filetype['ext'];
     372            $type = $wp_filetype['type'];
     373            $proper_filename = $filename;
     374            if($type && 0 === strpos($type, 'image/') && $ext !== 'svg'){
     375                $ext = $type = false;
     376            }
     377            $checked = compact('ext','type','proper_filename');
     378        }
     379        return $checked;
     380    }
     381   
     382    function webp_upload_mimes($existing_mimes) {
     383        $existing_mimes['webp'] = 'image/webp';
     384        return $existing_mimes;
     385    }
     386   
     387    function webp_is_displayable($result, $path) {
     388        if ($result === false) {
     389            $displayable_image_types = array( IMAGETYPE_WEBP );
     390            $info = @getimagesize( $path );
     391            if (empty($info)) {
     392                $result = false;
     393            } elseif (!in_array($info[2], $displayable_image_types)) {
     394                $result = false;
     395            } else {
     396                $result = true;
     397            }
     398        }
     399        return $result;
     400    }
     401   
    361402}
  • wp-extra/trunk/src/Settings.php

    r3255119 r3319341  
    379379       
    380380        $section = $tab->add_section(__('Optional'));
     381        $section->add_option('checkbox', [
     382            'name' => 'allow_filetype',
     383            'label' => __('Allow').' SVG & Webp'
     384        ]);
    381385        $section->add_option('checkbox-multiple', [
    382386            'name' => 'media_thumbnails',
  • wp-extra/trunk/wp-extra.php

    r3255119 r3319341  
    44 * Plugin URI:          https://wordpress.org/plugins/wp-extra/
    55 * Description:         ❤ This is a simple and perfect tool to use as your website’s functionality plugin. Awesome !!!
    6  * Version:             8.6.2
     6 * Version:             8.6.3
    77 * Requires at least:   6.2
    88 * Requires PHP:        7.4
     
    1818    exit;
    1919}
    20 //Check Pro
    21 if (is_dir(__DIR__ . '/src/Pro')) {
    22     include_once __DIR__ . '/src/Pro/Pro.php';
    23 }
    2420
    25 define( 'WPEX_VERSION', '8.6.2' );
     21define( 'WPEX_VERSION', '8.6.3' );
    2622define( 'WPEX_FILE', __FILE__ );
    2723define( 'WPEX_DIR', __DIR__ );
     
    3228require_once __DIR__ . '/vendor/autoload.php';
    3329
    34 if (is_dir(__DIR__ . '/src/Pro')) {
    35     include_once __DIR__ . '/src/Pro/constants.php';
    36     new Pro\WPEXtraPro;
    37 }
    38 
    3930new Language;
    4031new Settings;
Note: See TracChangeset for help on using the changeset viewer.