Plugin Directory

Changeset 2993018


Ignore:
Timestamp:
11/09/2023 09:31:21 AM (2 years ago)
Author:
joppuyo
Message:

Update to version 3.0.4 from GitHub

Location:
disable-media-pages
Files:
18 edited
1 copied

Legend:

Unmodified
Added
Removed
  • disable-media-pages/tags/3.0.4/README.md

    r2951523 r2993018  
    2929
    3030You 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
     34WordPress 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
     36Also, 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
     38Because 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.
    3139
    3240## Requirements
  • disable-media-pages/tags/3.0.4/disable-media-pages.php

    r2971781 r2993018  
    66 * Author: Johannes Siipola
    77 * Author URI: https://siipo.la
    8  * Version: 3.0.3
     8 * Version: 3.0.4
    99 * License: GPL v2 or later
    1010 * Text Domain: disable-media-pages
  • disable-media-pages/tags/3.0.4/lib/Plugin.php

    r2971781 r2993018  
    6060            $wp_query->set_404();
    6161            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
    6270        }
    6371        return $redirect_url;
  • disable-media-pages/tags/3.0.4/readme.txt

    r2971781 r2993018  
    44Contributors: joppuyo
    55Requires at least: 5.2
    6 Tested up to: 6.3
     6Tested up to: 6.4
    77Requires PHP: 7.1
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
    1010Donate link: https://github.com/sponsors/joppuyo
    11 Stable tag: 3.0.3
     11Stable tag: 3.0.4
    1212
    1313Completely remove "attachment" pages for WordPress media. Improve SEO and prevent conflicts between page and image permalinks.
     
    3232
    3333You 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
     37WordPress 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
     39Also, 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
     41Because 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.
    3442
    3543### Thanks
     
    8088
    8189## 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.
    8297
    8398### 3.0.3 (2023‐09‐26)
  • disable-media-pages/tags/3.0.4/vendor/autoload.php

    r2971781 r2993018  
    55require_once __DIR__ . '/composer/autoload_real.php';
    66
    7 return ComposerAutoloaderInit714535b52a7d6747014c0d55c0bb416d::getLoader();
     7return ComposerAutoloaderInit7f5aff0fffa8080463f214fb2fb31d6e::getLoader();
  • disable-media-pages/tags/3.0.4/vendor/composer/InstalledVersions.php

    r2653561 r2993018  
    327327                    $installed[] = self::$installedByVendor[$vendorDir];
    328328                } 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;
    330332                    if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
    331333                        self::$installed = $installed[count($installed) - 1];
     
    339341            // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
    340342            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;
    342346            } else {
    343347                self::$installed = array();
    344348            }
    345349        }
    346         $installed[] = self::$installed;
     350
     351        if (self::$installed !== array()) {
     352            $installed[] = self::$installed;
     353        }
    347354
    348355        return $installed;
  • disable-media-pages/tags/3.0.4/vendor/composer/autoload_real.php

    r2971781 r2993018  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInit714535b52a7d6747014c0d55c0bb416d
     5class ComposerAutoloaderInit7f5aff0fffa8080463f214fb2fb31d6e
    66{
    77    private static $loader;
     
    2323        }
    2424
    25         spl_autoload_register(array('ComposerAutoloaderInit714535b52a7d6747014c0d55c0bb416d', 'loadClassLoader'), true, true);
     25        spl_autoload_register(array('ComposerAutoloaderInit7f5aff0fffa8080463f214fb2fb31d6e', 'loadClassLoader'), true, true);
    2626        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
    27         spl_autoload_unregister(array('ComposerAutoloaderInit714535b52a7d6747014c0d55c0bb416d', 'loadClassLoader'));
     27        spl_autoload_unregister(array('ComposerAutoloaderInit7f5aff0fffa8080463f214fb2fb31d6e', 'loadClassLoader'));
    2828
    2929        $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
     
    3131            require __DIR__ . '/autoload_static.php';
    3232
    33             call_user_func(\Composer\Autoload\ComposerStaticInit714535b52a7d6747014c0d55c0bb416d::getInitializer($loader));
     33            call_user_func(\Composer\Autoload\ComposerStaticInit7f5aff0fffa8080463f214fb2fb31d6e::getInitializer($loader));
    3434        } else {
    3535            $map = require __DIR__ . '/autoload_namespaces.php';
  • disable-media-pages/tags/3.0.4/vendor/composer/autoload_static.php

    r2971781 r2993018  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInit714535b52a7d6747014c0d55c0bb416d
     7class ComposerStaticInit7f5aff0fffa8080463f214fb2fb31d6e
    88{
    99    public static $prefixLengthsPsr4 = array (
     
    3131    {
    3232        return \Closure::bind(function () use ($loader) {
    33             $loader->prefixLengthsPsr4 = ComposerStaticInit714535b52a7d6747014c0d55c0bb416d::$prefixLengthsPsr4;
    34             $loader->prefixDirsPsr4 = ComposerStaticInit714535b52a7d6747014c0d55c0bb416d::$prefixDirsPsr4;
    35             $loader->classMap = ComposerStaticInit714535b52a7d6747014c0d55c0bb416d::$classMap;
     33            $loader->prefixLengthsPsr4 = ComposerStaticInit7f5aff0fffa8080463f214fb2fb31d6e::$prefixLengthsPsr4;
     34            $loader->prefixDirsPsr4 = ComposerStaticInit7f5aff0fffa8080463f214fb2fb31d6e::$prefixDirsPsr4;
     35            $loader->classMap = ComposerStaticInit7f5aff0fffa8080463f214fb2fb31d6e::$classMap;
    3636
    3737        }, null, ClassLoader::class);
  • disable-media-pages/tags/3.0.4/vendor/composer/installed.php

    r2971781 r2993018  
    11<?php return array(
    22    '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',
    55        'type' => 'library',
    66        'install_path' => __DIR__ . '/../../',
    77        'aliases' => array(),
    8         'reference' => 'a16d808fd72d952bc2157704f796f712b5298bcb',
     8        'reference' => 'f369a44d7bd6e5504b5fb8726e07b5de6426a7c4',
    99        'name' => 'joppuyo/disable-media-pages',
    1010        'dev' => false,
     
    1212    'versions' => array(
    1313        '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',
    1616            'type' => 'library',
    1717            'install_path' => __DIR__ . '/../../',
    1818            'aliases' => array(),
    19             'reference' => 'a16d808fd72d952bc2157704f796f712b5298bcb',
     19            'reference' => 'f369a44d7bd6e5504b5fb8726e07b5de6426a7c4',
    2020            'dev_requirement' => false,
    2121        ),
  • disable-media-pages/trunk/README.md

    r2951523 r2993018  
    2929
    3030You 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
     34WordPress 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
     36Also, 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
     38Because 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.
    3139
    3240## Requirements
  • disable-media-pages/trunk/disable-media-pages.php

    r2971781 r2993018  
    66 * Author: Johannes Siipola
    77 * Author URI: https://siipo.la
    8  * Version: 3.0.3
     8 * Version: 3.0.4
    99 * License: GPL v2 or later
    1010 * Text Domain: disable-media-pages
  • disable-media-pages/trunk/lib/Plugin.php

    r2971781 r2993018  
    6060            $wp_query->set_404();
    6161            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
    6270        }
    6371        return $redirect_url;
  • disable-media-pages/trunk/readme.txt

    r2971781 r2993018  
    44Contributors: joppuyo
    55Requires at least: 5.2
    6 Tested up to: 6.3
     6Tested up to: 6.4
    77Requires PHP: 7.1
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
    1010Donate link: https://github.com/sponsors/joppuyo
    11 Stable tag: 3.0.3
     11Stable tag: 3.0.4
    1212
    1313Completely remove "attachment" pages for WordPress media. Improve SEO and prevent conflicts between page and image permalinks.
     
    3232
    3333You 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
     37WordPress 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
     39Also, 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
     41Because 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.
    3442
    3543### Thanks
     
    8088
    8189## 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.
    8297
    8398### 3.0.3 (2023‐09‐26)
  • disable-media-pages/trunk/vendor/autoload.php

    r2971781 r2993018  
    55require_once __DIR__ . '/composer/autoload_real.php';
    66
    7 return ComposerAutoloaderInit714535b52a7d6747014c0d55c0bb416d::getLoader();
     7return ComposerAutoloaderInit7f5aff0fffa8080463f214fb2fb31d6e::getLoader();
  • disable-media-pages/trunk/vendor/composer/InstalledVersions.php

    r2653561 r2993018  
    327327                    $installed[] = self::$installedByVendor[$vendorDir];
    328328                } 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;
    330332                    if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
    331333                        self::$installed = $installed[count($installed) - 1];
     
    339341            // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
    340342            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;
    342346            } else {
    343347                self::$installed = array();
    344348            }
    345349        }
    346         $installed[] = self::$installed;
     350
     351        if (self::$installed !== array()) {
     352            $installed[] = self::$installed;
     353        }
    347354
    348355        return $installed;
  • disable-media-pages/trunk/vendor/composer/autoload_real.php

    r2971781 r2993018  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInit714535b52a7d6747014c0d55c0bb416d
     5class ComposerAutoloaderInit7f5aff0fffa8080463f214fb2fb31d6e
    66{
    77    private static $loader;
     
    2323        }
    2424
    25         spl_autoload_register(array('ComposerAutoloaderInit714535b52a7d6747014c0d55c0bb416d', 'loadClassLoader'), true, true);
     25        spl_autoload_register(array('ComposerAutoloaderInit7f5aff0fffa8080463f214fb2fb31d6e', 'loadClassLoader'), true, true);
    2626        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
    27         spl_autoload_unregister(array('ComposerAutoloaderInit714535b52a7d6747014c0d55c0bb416d', 'loadClassLoader'));
     27        spl_autoload_unregister(array('ComposerAutoloaderInit7f5aff0fffa8080463f214fb2fb31d6e', 'loadClassLoader'));
    2828
    2929        $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
     
    3131            require __DIR__ . '/autoload_static.php';
    3232
    33             call_user_func(\Composer\Autoload\ComposerStaticInit714535b52a7d6747014c0d55c0bb416d::getInitializer($loader));
     33            call_user_func(\Composer\Autoload\ComposerStaticInit7f5aff0fffa8080463f214fb2fb31d6e::getInitializer($loader));
    3434        } else {
    3535            $map = require __DIR__ . '/autoload_namespaces.php';
  • disable-media-pages/trunk/vendor/composer/autoload_static.php

    r2971781 r2993018  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInit714535b52a7d6747014c0d55c0bb416d
     7class ComposerStaticInit7f5aff0fffa8080463f214fb2fb31d6e
    88{
    99    public static $prefixLengthsPsr4 = array (
     
    3131    {
    3232        return \Closure::bind(function () use ($loader) {
    33             $loader->prefixLengthsPsr4 = ComposerStaticInit714535b52a7d6747014c0d55c0bb416d::$prefixLengthsPsr4;
    34             $loader->prefixDirsPsr4 = ComposerStaticInit714535b52a7d6747014c0d55c0bb416d::$prefixDirsPsr4;
    35             $loader->classMap = ComposerStaticInit714535b52a7d6747014c0d55c0bb416d::$classMap;
     33            $loader->prefixLengthsPsr4 = ComposerStaticInit7f5aff0fffa8080463f214fb2fb31d6e::$prefixLengthsPsr4;
     34            $loader->prefixDirsPsr4 = ComposerStaticInit7f5aff0fffa8080463f214fb2fb31d6e::$prefixDirsPsr4;
     35            $loader->classMap = ComposerStaticInit7f5aff0fffa8080463f214fb2fb31d6e::$classMap;
    3636
    3737        }, null, ClassLoader::class);
  • disable-media-pages/trunk/vendor/composer/installed.php

    r2971781 r2993018  
    11<?php return array(
    22    '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',
    55        'type' => 'library',
    66        'install_path' => __DIR__ . '/../../',
    77        'aliases' => array(),
    8         'reference' => 'a16d808fd72d952bc2157704f796f712b5298bcb',
     8        'reference' => 'f369a44d7bd6e5504b5fb8726e07b5de6426a7c4',
    99        'name' => 'joppuyo/disable-media-pages',
    1010        'dev' => false,
     
    1212    'versions' => array(
    1313        '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',
    1616            'type' => 'library',
    1717            'install_path' => __DIR__ . '/../../',
    1818            'aliases' => array(),
    19             'reference' => 'a16d808fd72d952bc2157704f796f712b5298bcb',
     19            'reference' => 'f369a44d7bd6e5504b5fb8726e07b5de6426a7c4',
    2020            'dev_requirement' => false,
    2121        ),
Note: See TracChangeset for help on using the changeset viewer.