Skip to content

Commit

Permalink
Release v3.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
joppuyo committed Mar 26, 2024
1 parent 92c1089 commit e40a4c6
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 8 deletions.
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,27 @@ This plugin works by automatically setting all attachment slugs to an unique id,

You can also mangle any existing attachment slugs so they won't cause any issues in the future.

## WP CLI support

The plugin supports WP CLI.

### Mangle existing attachment slugs

```
wp disable-media-pages mangle
```

### Restore attachment slugs

```
wp disable-media-pages restore
```


## Note for WordPress 6.4

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.

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. You can follow the progress of this issue on [WordPress Trac](https://core.trac.wordpress.org/ticket/59866).

Also, there is no user interface to enable or disable media pages, they are automatically disabled for new sites but remain enabled for existing sites.

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.
Expand Down
2 changes: 1 addition & 1 deletion disable-media-pages.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Description: Plugin to disable "attachment" pages for WordPress media.
* Author: Johannes Siipola
* Author URI: https://siipo.la
* Version: 3.1.0
* Version: 3.1.1
* License: GPL v2 or later
* Text Domain: disable-media-pages
*/
Expand Down
14 changes: 9 additions & 5 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Requires PHP: 7.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Donate link: https://github.com/sponsors/joppuyo
Stable tag: 3.1.0
Stable tag: 3.1.1

Completely remove "attachment" pages for WordPress media. Improve SEO and prevent conflicts between page and image permalinks.

Expand Down Expand Up @@ -38,15 +38,15 @@ The plugin supports WP CLI.

#### Mangle existing attachment slugs

```
`
wp disable-media-pages mangle
```
`

#### Restore attachment slugs

```
`
wp disable-media-pages restore
```
`

### Note for WordPress 6.4

Expand Down Expand Up @@ -104,6 +104,10 @@ Yes, check out the [GitHub repository.](https://github.com/joppuyo/disable-media

## Changelog

### 3.1.1 (2024‐03‐26)
* Fix: Removed unnecessary debugging statements
* Fix: improve readme formatting

### 3.1.0 (2024‐03‐24)
* Feature: Add WP CLI support

Expand Down

0 comments on commit e40a4c6

Please sign in to comment.