Changeset 2993018
- Timestamp:
- 11/09/2023 09:31:21 AM (2 years ago)
- Location:
- disable-media-pages
- Files:
-
- 18 edited
- 1 copied
-
tags/3.0.4 (copied) (copied from disable-media-pages/trunk)
-
tags/3.0.4/README.md (modified) (1 diff)
-
tags/3.0.4/disable-media-pages.php (modified) (1 diff)
-
tags/3.0.4/lib/Plugin.php (modified) (1 diff)
-
tags/3.0.4/readme.txt (modified) (3 diffs)
-
tags/3.0.4/vendor/autoload.php (modified) (1 diff)
-
tags/3.0.4/vendor/composer/InstalledVersions.php (modified) (2 diffs)
-
tags/3.0.4/vendor/composer/autoload_real.php (modified) (3 diffs)
-
tags/3.0.4/vendor/composer/autoload_static.php (modified) (2 diffs)
-
tags/3.0.4/vendor/composer/installed.php (modified) (2 diffs)
-
trunk/README.md (modified) (1 diff)
-
trunk/disable-media-pages.php (modified) (1 diff)
-
trunk/lib/Plugin.php (modified) (1 diff)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/vendor/autoload.php (modified) (1 diff)
-
trunk/vendor/composer/InstalledVersions.php (modified) (2 diffs)
-
trunk/vendor/composer/autoload_real.php (modified) (3 diffs)
-
trunk/vendor/composer/autoload_static.php (modified) (2 diffs)
-
trunk/vendor/composer/installed.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
disable-media-pages/tags/3.0.4/README.md
r2951523 r2993018 29 29 30 30 You can also mangle any existing attachment slugs so they won't cause any issues in the future. 31 32 ## Note for WordPress 6.4 33 34 WordPress 6.4 includes [a new feature](https://make.wordpress.org/core/2023/10/16/changes-to-attachment-pages/) that allows you to disable attachment pages. However, this feature redirects attachment pages to the file URL instead of returning a 404 error. To completely disable attachment pages, you should use this plugin instead. The WP 6.4 feature also does not fix the issue where attachment pages reserve slugs for pages. 35 36 Also, it seems like this feature does not work as intended, because it will disable attachment pages only for users who are logged in. Anonymous users will still be able to access attachment pages. Also, there is not user interface to enable or disable media pages, they are automatically disabled for new sites but remain enabled for existing sites. 37 38 Because of these issues, I recommend you to use this plugin instead of the built-in feature. The plugin will be updated in the foreseeable future, at least until attachment pages are completely removed from WordPress core and older WordPress versions are no longer in use. 31 39 32 40 ## Requirements -
disable-media-pages/tags/3.0.4/disable-media-pages.php
r2971781 r2993018 6 6 * Author: Johannes Siipola 7 7 * Author URI: https://siipo.la 8 * Version: 3.0. 38 * Version: 3.0.4 9 9 * License: GPL v2 or later 10 10 * Text Domain: disable-media-pages -
disable-media-pages/tags/3.0.4/lib/Plugin.php
r2971781 r2993018 60 60 $wp_query->set_404(); 61 61 status_header(404); 62 63 // Handle WordPress 6.4's attachment page redirection by cancelling the redirection. 64 // https://make.wordpress.org/core/2023/10/16/changes-to-attachment-pages/ 65 global $wp_version; 66 if (version_compare($wp_version, '6.4', '>=')) { 67 return false; 68 } 69 62 70 } 63 71 return $redirect_url; -
disable-media-pages/tags/3.0.4/readme.txt
r2971781 r2993018 4 4 Contributors: joppuyo 5 5 Requires at least: 5.2 6 Tested up to: 6. 36 Tested up to: 6.4 7 7 Requires PHP: 7.1 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html 10 10 Donate link: https://github.com/sponsors/joppuyo 11 Stable tag: 3.0. 311 Stable tag: 3.0.4 12 12 13 13 Completely remove "attachment" pages for WordPress media. Improve SEO and prevent conflicts between page and image permalinks. … … 32 32 33 33 You can also mangle any existing attachment slugs so they won't cause any issues in the future. 34 35 ### Note for WordPress 6.4 36 37 WordPress 6.4 includes [a new feature](https://make.wordpress.org/core/2023/10/16/changes-to-attachment-pages/) that allows you to disable attachment pages. However, this feature redirects attachment pages to the file URL instead of returning a 404 error. To completely disable attachment pages, you should use this plugin instead. The WP 6.4 feature also does not fix the issue where attachment pages reserve slugs for pages. 38 39 Also, it seems like this feature does not work as intended, because it will disable attachment pages only for users who are logged in. Anonymous users will still be able to access attachment pages. Also, there is not user interface to enable or disable media pages, they are automatically disabled for new sites but remain enabled for existing sites. 40 41 Because of these issues, I recommend you to use this plugin instead of the built-in feature. The plugin will be updated in the foreseeable future, at least until attachment pages are completely removed from WordPress core and older WordPress versions are no longer in use. 34 42 35 43 ### Thanks … … 80 88 81 89 ## Changelog 90 91 ### 3.0.4 (2023‐11‐09) 92 * Fix: WordPress 6.4 compatibility. 93 * Note for WordPress 6.4 94 * WordPress 6.4 includes [a new feature](https://make.wordpress.org/core/2023/10/16/changes-to-attachment-pages/) that allows you to disable attachment pages. However, this feature redirects attachment pages to the file URL instead of returning a 404 error. To completely disable attachment pages, you should use this plugin instead. The WP 6.4 feature also does not fix the issue where attachment pages reserve slugs for pages. 95 * Also, it seems like this feature does not work as intended, because it will disable attachment pages only for users who are logged in. Anonymous users will still be able to access attachment pages. Also, there is not user interface to enable or disable media pages, they are automatically disabled for new sites but remain enabled for existing sites. 96 * Because of these issues, I recommend you to use this plugin instead of the built-in feature. The plugin will be updated in the foreseeable future, at least until attachment pages are completely removed from WordPress core and older WordPress versions are no longer in use. 82 97 83 98 ### 3.0.3 (2023‐09‐26) -
disable-media-pages/tags/3.0.4/vendor/autoload.php
r2971781 r2993018 5 5 require_once __DIR__ . '/composer/autoload_real.php'; 6 6 7 return ComposerAutoloaderInit7 14535b52a7d6747014c0d55c0bb416d::getLoader();7 return ComposerAutoloaderInit7f5aff0fffa8080463f214fb2fb31d6e::getLoader(); -
disable-media-pages/tags/3.0.4/vendor/composer/InstalledVersions.php
r2653561 r2993018 327 327 $installed[] = self::$installedByVendor[$vendorDir]; 328 328 } elseif (is_file($vendorDir.'/composer/installed.php')) { 329 $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; 329 /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */ 330 $required = require $vendorDir.'/composer/installed.php'; 331 $installed[] = self::$installedByVendor[$vendorDir] = $required; 330 332 if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { 331 333 self::$installed = $installed[count($installed) - 1]; … … 339 341 // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 340 342 if (substr(__DIR__, -8, 1) !== 'C') { 341 self::$installed = require __DIR__ . '/installed.php'; 343 /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */ 344 $required = require __DIR__ . '/installed.php'; 345 self::$installed = $required; 342 346 } else { 343 347 self::$installed = array(); 344 348 } 345 349 } 346 $installed[] = self::$installed; 350 351 if (self::$installed !== array()) { 352 $installed[] = self::$installed; 353 } 347 354 348 355 return $installed; -
disable-media-pages/tags/3.0.4/vendor/composer/autoload_real.php
r2971781 r2993018 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit7 14535b52a7d6747014c0d55c0bb416d5 class ComposerAutoloaderInit7f5aff0fffa8080463f214fb2fb31d6e 6 6 { 7 7 private static $loader; … … 23 23 } 24 24 25 spl_autoload_register(array('ComposerAutoloaderInit7 14535b52a7d6747014c0d55c0bb416d', 'loadClassLoader'), true, true);25 spl_autoload_register(array('ComposerAutoloaderInit7f5aff0fffa8080463f214fb2fb31d6e', 'loadClassLoader'), true, true); 26 26 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); 27 spl_autoload_unregister(array('ComposerAutoloaderInit7 14535b52a7d6747014c0d55c0bb416d', 'loadClassLoader'));27 spl_autoload_unregister(array('ComposerAutoloaderInit7f5aff0fffa8080463f214fb2fb31d6e', 'loadClassLoader')); 28 28 29 29 $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); … … 31 31 require __DIR__ . '/autoload_static.php'; 32 32 33 call_user_func(\Composer\Autoload\ComposerStaticInit7 14535b52a7d6747014c0d55c0bb416d::getInitializer($loader));33 call_user_func(\Composer\Autoload\ComposerStaticInit7f5aff0fffa8080463f214fb2fb31d6e::getInitializer($loader)); 34 34 } else { 35 35 $map = require __DIR__ . '/autoload_namespaces.php'; -
disable-media-pages/tags/3.0.4/vendor/composer/autoload_static.php
r2971781 r2993018 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit7 14535b52a7d6747014c0d55c0bb416d7 class ComposerStaticInit7f5aff0fffa8080463f214fb2fb31d6e 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( … … 31 31 { 32 32 return \Closure::bind(function () use ($loader) { 33 $loader->prefixLengthsPsr4 = ComposerStaticInit7 14535b52a7d6747014c0d55c0bb416d::$prefixLengthsPsr4;34 $loader->prefixDirsPsr4 = ComposerStaticInit7 14535b52a7d6747014c0d55c0bb416d::$prefixDirsPsr4;35 $loader->classMap = ComposerStaticInit7 14535b52a7d6747014c0d55c0bb416d::$classMap;33 $loader->prefixLengthsPsr4 = ComposerStaticInit7f5aff0fffa8080463f214fb2fb31d6e::$prefixLengthsPsr4; 34 $loader->prefixDirsPsr4 = ComposerStaticInit7f5aff0fffa8080463f214fb2fb31d6e::$prefixDirsPsr4; 35 $loader->classMap = ComposerStaticInit7f5aff0fffa8080463f214fb2fb31d6e::$classMap; 36 36 37 37 }, null, ClassLoader::class); -
disable-media-pages/tags/3.0.4/vendor/composer/installed.php
r2971781 r2993018 1 1 <?php return array( 2 2 'root' => array( 3 'pretty_version' => 'v3.0. 3',4 'version' => '3.0. 3.0',3 'pretty_version' => 'v3.0.4', 4 'version' => '3.0.4.0', 5 5 'type' => 'library', 6 6 'install_path' => __DIR__ . '/../../', 7 7 'aliases' => array(), 8 'reference' => ' a16d808fd72d952bc2157704f796f712b5298bcb',8 'reference' => 'f369a44d7bd6e5504b5fb8726e07b5de6426a7c4', 9 9 'name' => 'joppuyo/disable-media-pages', 10 10 'dev' => false, … … 12 12 'versions' => array( 13 13 'joppuyo/disable-media-pages' => array( 14 'pretty_version' => 'v3.0. 3',15 'version' => '3.0. 3.0',14 'pretty_version' => 'v3.0.4', 15 'version' => '3.0.4.0', 16 16 'type' => 'library', 17 17 'install_path' => __DIR__ . '/../../', 18 18 'aliases' => array(), 19 'reference' => ' a16d808fd72d952bc2157704f796f712b5298bcb',19 'reference' => 'f369a44d7bd6e5504b5fb8726e07b5de6426a7c4', 20 20 'dev_requirement' => false, 21 21 ), -
disable-media-pages/trunk/README.md
r2951523 r2993018 29 29 30 30 You can also mangle any existing attachment slugs so they won't cause any issues in the future. 31 32 ## Note for WordPress 6.4 33 34 WordPress 6.4 includes [a new feature](https://make.wordpress.org/core/2023/10/16/changes-to-attachment-pages/) that allows you to disable attachment pages. However, this feature redirects attachment pages to the file URL instead of returning a 404 error. To completely disable attachment pages, you should use this plugin instead. The WP 6.4 feature also does not fix the issue where attachment pages reserve slugs for pages. 35 36 Also, it seems like this feature does not work as intended, because it will disable attachment pages only for users who are logged in. Anonymous users will still be able to access attachment pages. Also, there is not user interface to enable or disable media pages, they are automatically disabled for new sites but remain enabled for existing sites. 37 38 Because of these issues, I recommend you to use this plugin instead of the built-in feature. The plugin will be updated in the foreseeable future, at least until attachment pages are completely removed from WordPress core and older WordPress versions are no longer in use. 31 39 32 40 ## Requirements -
disable-media-pages/trunk/disable-media-pages.php
r2971781 r2993018 6 6 * Author: Johannes Siipola 7 7 * Author URI: https://siipo.la 8 * Version: 3.0. 38 * Version: 3.0.4 9 9 * License: GPL v2 or later 10 10 * Text Domain: disable-media-pages -
disable-media-pages/trunk/lib/Plugin.php
r2971781 r2993018 60 60 $wp_query->set_404(); 61 61 status_header(404); 62 63 // Handle WordPress 6.4's attachment page redirection by cancelling the redirection. 64 // https://make.wordpress.org/core/2023/10/16/changes-to-attachment-pages/ 65 global $wp_version; 66 if (version_compare($wp_version, '6.4', '>=')) { 67 return false; 68 } 69 62 70 } 63 71 return $redirect_url; -
disable-media-pages/trunk/readme.txt
r2971781 r2993018 4 4 Contributors: joppuyo 5 5 Requires at least: 5.2 6 Tested up to: 6. 36 Tested up to: 6.4 7 7 Requires PHP: 7.1 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html 10 10 Donate link: https://github.com/sponsors/joppuyo 11 Stable tag: 3.0. 311 Stable tag: 3.0.4 12 12 13 13 Completely remove "attachment" pages for WordPress media. Improve SEO and prevent conflicts between page and image permalinks. … … 32 32 33 33 You can also mangle any existing attachment slugs so they won't cause any issues in the future. 34 35 ### Note for WordPress 6.4 36 37 WordPress 6.4 includes [a new feature](https://make.wordpress.org/core/2023/10/16/changes-to-attachment-pages/) that allows you to disable attachment pages. However, this feature redirects attachment pages to the file URL instead of returning a 404 error. To completely disable attachment pages, you should use this plugin instead. The WP 6.4 feature also does not fix the issue where attachment pages reserve slugs for pages. 38 39 Also, it seems like this feature does not work as intended, because it will disable attachment pages only for users who are logged in. Anonymous users will still be able to access attachment pages. Also, there is not user interface to enable or disable media pages, they are automatically disabled for new sites but remain enabled for existing sites. 40 41 Because of these issues, I recommend you to use this plugin instead of the built-in feature. The plugin will be updated in the foreseeable future, at least until attachment pages are completely removed from WordPress core and older WordPress versions are no longer in use. 34 42 35 43 ### Thanks … … 80 88 81 89 ## Changelog 90 91 ### 3.0.4 (2023‐11‐09) 92 * Fix: WordPress 6.4 compatibility. 93 * Note for WordPress 6.4 94 * WordPress 6.4 includes [a new feature](https://make.wordpress.org/core/2023/10/16/changes-to-attachment-pages/) that allows you to disable attachment pages. However, this feature redirects attachment pages to the file URL instead of returning a 404 error. To completely disable attachment pages, you should use this plugin instead. The WP 6.4 feature also does not fix the issue where attachment pages reserve slugs for pages. 95 * Also, it seems like this feature does not work as intended, because it will disable attachment pages only for users who are logged in. Anonymous users will still be able to access attachment pages. Also, there is not user interface to enable or disable media pages, they are automatically disabled for new sites but remain enabled for existing sites. 96 * Because of these issues, I recommend you to use this plugin instead of the built-in feature. The plugin will be updated in the foreseeable future, at least until attachment pages are completely removed from WordPress core and older WordPress versions are no longer in use. 82 97 83 98 ### 3.0.3 (2023‐09‐26) -
disable-media-pages/trunk/vendor/autoload.php
r2971781 r2993018 5 5 require_once __DIR__ . '/composer/autoload_real.php'; 6 6 7 return ComposerAutoloaderInit7 14535b52a7d6747014c0d55c0bb416d::getLoader();7 return ComposerAutoloaderInit7f5aff0fffa8080463f214fb2fb31d6e::getLoader(); -
disable-media-pages/trunk/vendor/composer/InstalledVersions.php
r2653561 r2993018 327 327 $installed[] = self::$installedByVendor[$vendorDir]; 328 328 } elseif (is_file($vendorDir.'/composer/installed.php')) { 329 $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; 329 /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */ 330 $required = require $vendorDir.'/composer/installed.php'; 331 $installed[] = self::$installedByVendor[$vendorDir] = $required; 330 332 if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { 331 333 self::$installed = $installed[count($installed) - 1]; … … 339 341 // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 340 342 if (substr(__DIR__, -8, 1) !== 'C') { 341 self::$installed = require __DIR__ . '/installed.php'; 343 /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */ 344 $required = require __DIR__ . '/installed.php'; 345 self::$installed = $required; 342 346 } else { 343 347 self::$installed = array(); 344 348 } 345 349 } 346 $installed[] = self::$installed; 350 351 if (self::$installed !== array()) { 352 $installed[] = self::$installed; 353 } 347 354 348 355 return $installed; -
disable-media-pages/trunk/vendor/composer/autoload_real.php
r2971781 r2993018 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit7 14535b52a7d6747014c0d55c0bb416d5 class ComposerAutoloaderInit7f5aff0fffa8080463f214fb2fb31d6e 6 6 { 7 7 private static $loader; … … 23 23 } 24 24 25 spl_autoload_register(array('ComposerAutoloaderInit7 14535b52a7d6747014c0d55c0bb416d', 'loadClassLoader'), true, true);25 spl_autoload_register(array('ComposerAutoloaderInit7f5aff0fffa8080463f214fb2fb31d6e', 'loadClassLoader'), true, true); 26 26 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); 27 spl_autoload_unregister(array('ComposerAutoloaderInit7 14535b52a7d6747014c0d55c0bb416d', 'loadClassLoader'));27 spl_autoload_unregister(array('ComposerAutoloaderInit7f5aff0fffa8080463f214fb2fb31d6e', 'loadClassLoader')); 28 28 29 29 $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); … … 31 31 require __DIR__ . '/autoload_static.php'; 32 32 33 call_user_func(\Composer\Autoload\ComposerStaticInit7 14535b52a7d6747014c0d55c0bb416d::getInitializer($loader));33 call_user_func(\Composer\Autoload\ComposerStaticInit7f5aff0fffa8080463f214fb2fb31d6e::getInitializer($loader)); 34 34 } else { 35 35 $map = require __DIR__ . '/autoload_namespaces.php'; -
disable-media-pages/trunk/vendor/composer/autoload_static.php
r2971781 r2993018 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit7 14535b52a7d6747014c0d55c0bb416d7 class ComposerStaticInit7f5aff0fffa8080463f214fb2fb31d6e 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( … … 31 31 { 32 32 return \Closure::bind(function () use ($loader) { 33 $loader->prefixLengthsPsr4 = ComposerStaticInit7 14535b52a7d6747014c0d55c0bb416d::$prefixLengthsPsr4;34 $loader->prefixDirsPsr4 = ComposerStaticInit7 14535b52a7d6747014c0d55c0bb416d::$prefixDirsPsr4;35 $loader->classMap = ComposerStaticInit7 14535b52a7d6747014c0d55c0bb416d::$classMap;33 $loader->prefixLengthsPsr4 = ComposerStaticInit7f5aff0fffa8080463f214fb2fb31d6e::$prefixLengthsPsr4; 34 $loader->prefixDirsPsr4 = ComposerStaticInit7f5aff0fffa8080463f214fb2fb31d6e::$prefixDirsPsr4; 35 $loader->classMap = ComposerStaticInit7f5aff0fffa8080463f214fb2fb31d6e::$classMap; 36 36 37 37 }, null, ClassLoader::class); -
disable-media-pages/trunk/vendor/composer/installed.php
r2971781 r2993018 1 1 <?php return array( 2 2 'root' => array( 3 'pretty_version' => 'v3.0. 3',4 'version' => '3.0. 3.0',3 'pretty_version' => 'v3.0.4', 4 'version' => '3.0.4.0', 5 5 'type' => 'library', 6 6 'install_path' => __DIR__ . '/../../', 7 7 'aliases' => array(), 8 'reference' => ' a16d808fd72d952bc2157704f796f712b5298bcb',8 'reference' => 'f369a44d7bd6e5504b5fb8726e07b5de6426a7c4', 9 9 'name' => 'joppuyo/disable-media-pages', 10 10 'dev' => false, … … 12 12 'versions' => array( 13 13 'joppuyo/disable-media-pages' => array( 14 'pretty_version' => 'v3.0. 3',15 'version' => '3.0. 3.0',14 'pretty_version' => 'v3.0.4', 15 'version' => '3.0.4.0', 16 16 'type' => 'library', 17 17 'install_path' => __DIR__ . '/../../', 18 18 'aliases' => array(), 19 'reference' => ' a16d808fd72d952bc2157704f796f712b5298bcb',19 'reference' => 'f369a44d7bd6e5504b5fb8726e07b5de6426a7c4', 20 20 'dev_requirement' => false, 21 21 ),
Note: See TracChangeset
for help on using the changeset viewer.