Changeset 3319341
- Timestamp:
- 06/29/2025 07:48:46 AM (9 months ago)
- Location:
- wp-extra/trunk
- Files:
-
- 4 edited
-
readme.txt (modified) (3 diffs)
-
src/Modules/Media.php (modified) (3 diffs)
-
src/Settings.php (modified) (1 diff)
-
wp-extra.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-extra/trunk/readme.txt
r3255152 r3319341 4 4 Tags: extra, functions, wpvnteam, security, enhancements, tweaks, optimizations, tools 5 5 Requires at least: 6.5 6 Tested up to: 6.8. 07 Stable tag: 8.6. 26 Tested up to: 6.8.1 7 Stable tag: 8.6.3 8 8 Requires PHP: 7.4 9 9 License: GPLv2 or later … … 14 14 == Description == 15 15 16 https://www.youtube.com/watch?v=H5vXwe5nyiQ 16 [youtube https://www.youtube.com/watch?v=H5vXwe5nyiQ] 17 17 18 18 🚀 Boost your website’s functionality, security and SEO with WP EXtra – the all-in-one tool for WordPress users! … … 178 178 == Changelog == 179 179 180 = 8.6.3 = 181 * [NEW] WordPress 6.8.1 compatibility 182 180 183 = 8.6.2 = 181 184 * [FIX] Nofollow -
wp-extra/trunk/src/Modules/Media.php
r3243284 r3319341 19 19 'save_images', 20 20 'autoset', 21 'allow_filetype', 21 22 ]; 22 23 … … 52 53 public function autoset() { 53 54 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); 54 61 } 55 62 … … 359 366 } 360 367 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 361 402 } -
wp-extra/trunk/src/Settings.php
r3255119 r3319341 379 379 380 380 $section = $tab->add_section(__('Optional')); 381 $section->add_option('checkbox', [ 382 'name' => 'allow_filetype', 383 'label' => __('Allow').' SVG & Webp' 384 ]); 381 385 $section->add_option('checkbox-multiple', [ 382 386 'name' => 'media_thumbnails', -
wp-extra/trunk/wp-extra.php
r3255119 r3319341 4 4 * Plugin URI: https://wordpress.org/plugins/wp-extra/ 5 5 * Description: ❤ This is a simple and perfect tool to use as your website’s functionality plugin. Awesome !!! 6 * Version: 8.6. 26 * Version: 8.6.3 7 7 * Requires at least: 6.2 8 8 * Requires PHP: 7.4 … … 18 18 exit; 19 19 } 20 //Check Pro21 if (is_dir(__DIR__ . '/src/Pro')) {22 include_once __DIR__ . '/src/Pro/Pro.php';23 }24 20 25 define( 'WPEX_VERSION', '8.6. 2' );21 define( 'WPEX_VERSION', '8.6.3' ); 26 22 define( 'WPEX_FILE', __FILE__ ); 27 23 define( 'WPEX_DIR', __DIR__ ); … … 32 28 require_once __DIR__ . '/vendor/autoload.php'; 33 29 34 if (is_dir(__DIR__ . '/src/Pro')) {35 include_once __DIR__ . '/src/Pro/constants.php';36 new Pro\WPEXtraPro;37 }38 39 30 new Language; 40 31 new Settings;
Note: See TracChangeset
for help on using the changeset viewer.