Skip to content

Commit e40a4c6

Browse files
committedMar 26, 2024·
Release v3.1.1
1 parent 92c1089 commit e40a4c6

File tree

3 files changed

+27
-8
lines changed

3 files changed

+27
-8
lines changed
 

‎README.md

+17-2
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,27 @@ This plugin works by automatically setting all attachment slugs to an unique id,
2929

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

32+
## WP CLI support
33+
34+
The plugin supports WP CLI.
35+
36+
### Mangle existing attachment slugs
37+
38+
```
39+
wp disable-media-pages mangle
40+
```
41+
42+
### Restore attachment slugs
43+
44+
```
45+
wp disable-media-pages restore
46+
```
47+
48+
3249
## Note for WordPress 6.4
3350

3451
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.
3552

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

4055
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.

‎disable-media-pages.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Description: Plugin to disable "attachment" pages for WordPress media.
66
* Author: Johannes Siipola
77
* Author URI: https://siipo.la
8-
* Version: 3.1.0
8+
* Version: 3.1.1
99
* License: GPL v2 or later
1010
* Text Domain: disable-media-pages
1111
*/

‎readme.txt

+9-5
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Requires PHP: 7.1
88
License: GPLv2 or later
99
License URI: http://www.gnu.org/licenses/gpl-2.0.html
1010
Donate link: https://github.com/sponsors/joppuyo
11-
Stable tag: 3.1.0
11+
Stable tag: 3.1.1
1212

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

@@ -38,15 +38,15 @@ The plugin supports WP CLI.
3838

3939
#### Mangle existing attachment slugs
4040

41-
```
41+
`
4242
wp disable-media-pages mangle
43-
```
43+
`
4444

4545
#### Restore attachment slugs
4646

47-
```
47+
`
4848
wp disable-media-pages restore
49-
```
49+
`
5050

5151
### Note for WordPress 6.4
5252

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

105105
## Changelog
106106

107+
### 3.1.1 (2024‐03‐26)
108+
* Fix: Removed unnecessary debugging statements
109+
* Fix: improve readme formatting
110+
107111
### 3.1.0 (2024‐03‐24)
108112
* Feature: Add WP CLI support
109113

0 commit comments

Comments
 (0)
Please sign in to comment.