Skip to content

Commit

Permalink
update readmes
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuadavidnelson committed Jan 20, 2024
1 parent 426f0c8 commit 93432b8
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 38 deletions.
52 changes: 29 additions & 23 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

[![WordPress Plugin Version](https://img.shields.io/wordpress/plugin/v/archived-post-status)](https://wordpress.org/plugins/archived-post-status/) ![Downloads](https://img.shields.io/wordpress/plugin/dt/archived-post-status.svg) ![Rating](https://img.shields.io/wordpress/plugin/r/archived-post-status.svg)

[![WP compatibility](https://plugintests.com/plugins/wporg/archived-post-status/wp-badge.svg)](https://plugintests.com/plugins/wporg/archived-post-status/latest) [![PHP compatibility](https://plugintests.com/plugins/wporg/archived-post-status/php-badge.svg)](https://plugintests.com/plugins/wporg/archived-post-status/latest)

Allows posts and pages to be archived so you can unpublish content without having to trash it.

**Contributors:** [joshuadavidnelson](https://github.com/joshuadavidnelson), [fjarrett](https://profiles.wordpress.org/fjarrett)
Expand All @@ -19,10 +21,12 @@ Allows posts and pages to be archived so you can unpublish content without havin

This plugin allows you to archive your WordPress content similar to the way you archive your e-mail.

* Makes a new post status available in the dropdown called Archived
* Unpublish your posts and pages without having to trash them
* Compatible with posts, pages and custom post types
* Archives content, making it hidden from public view
* Compatible with posts, pages and call public ustom post types
* Ideal for sites where certain kinds of content is not meant to be evergreen
* Easily extended (see walkthroughs below)


**[Over 13](https://translate.wordpress.org/projects/wp-plugins/archived-post-status/)** languages supported

Expand Down Expand Up @@ -50,7 +54,7 @@ Of course, you can always change the status back to Draft or Publish if you want

Yes, there is nothing wong with trashing old content. And the behavior of the Archived status is very similar to that of trashing.

However, WordPress automatically purges trashed posts every 7 days (by [default]()).
However, WordPress permanently deletes trashed posts after 30 days ([see here](https://codex.wordpress.org/Trash_status#Default_Days_before_Permanently_Deleted)).

This is what makes the Archived post status handy. You can unpublish content without having to delete it forever.

Expand All @@ -74,9 +78,18 @@ function my_aps_default_read_capability( $capability ) {
add_filter( 'aps_default_read_capability', 'my_aps_default_read_capability' );
```

### Can I make Archived posts appear on the front-end for all users?
Yes, add these hooks to your theme's `functions.php` file or as an [MU plugin](http://codex.wordpress.org/Must_Use_Plugins):

```php
add_filter( 'aps_status_arg_public', '__return_true' );
add_filter( 'aps_status_arg_private', '__return_false' );
add_filter( 'aps_status_arg_exclude_from_search', '__return_false' );
```

### Can I change the status name?

You can change the "Archived" string used for the custom status name by adding the code snippet to your theme's `functions.php` file or as an [MU plugin](http://codex.wordpress.org/Must_Use_Plugins):
You can change the post status name, the "Archived" string, by adding the code snippet to your theme's `functions.php` file or as an [MU plugin](http://codex.wordpress.org/Must_Use_Plugins):

```
add_filter( 'aps_archived_label_string', function( $label ) {
Expand All @@ -85,13 +98,13 @@ add_filter( 'aps_archived_label_string', function( $label ) {
});
```

This will change the label used on the admin and on the post title label (see below).
This will change the name used in the admin and on the post title label (see below).

### How to modify or disable the "Archived" label added to the post title

This plugin automatically adds `Archived:` to the title of archived content. (Note that archived content is only viewable to logged in users with the [`read_private_posts`](http://codex.wordpress.org/Roles_and_Capabilities#read_private_posts) capability).

You can modify the label text, the separator, whether it appears before or after the title, or completely disable it.
You can modify the label text, the separator, whether it appears before or after the title, or disable it entirely.

Follow the examples below, adding the code snippet to your theme's `functions.php` file or as an [MU plugin](http://codex.wordpress.org/Must_Use_Plugins).

Expand All @@ -105,7 +118,7 @@ Follow the examples below, adding the code snippet to your theme's `functions.ph

#### Change the separator

The separator is the string that separates the "Archived" label and the post title, _including spaces_. When the label appears before the title, the separator is a colon and space `: `, if the label is placed after the title it is a dash with spaces on each side ` - `.
The separator is the string between the "Archived" label and the post title, _including spaces_. When the label appears before the title, the separator is a colon and space `: `, if the label is placed after the title it is a dash with spaces on each side ` - `.

You can customize the separator with the following filter:
```
Expand All @@ -115,28 +128,21 @@ add_filter( 'aps_title_separator', function( $sep ) {
});
```

### Can I make Archived posts appear on the front-end for all users?
Yes, simply add these hooks to your theme's `functions.php` file or as an [MU plugin](http://codex.wordpress.org/Must_Use_Plugins):

```php
add_filter( 'aps_status_arg_public', '__return_true' );
add_filter( 'aps_status_arg_private', '__return_false' );
add_filter( 'aps_status_arg_exclude_from_search', '__return_false' );
```

### Can I make Archived posts hidden from the "All" list in the WP Admin, similar to Trashed posts?
Yes, simply add these hooks to your theme's `functions.php` file or as an [MU plugin](http://codex.wordpress.org/Must_Use_Plugins):

Add these hooks to your theme's `functions.php` file or as an [MU plugin](http://codex.wordpress.org/Must_Use_Plugins):

```php
add_filter( 'aps_status_arg_public', '__return_false' );
add_filter( 'aps_status_arg_private', '__return_false' );
add_filter( 'aps_status_arg_show_in_admin_all_list', '__return_false' );
```

Please note that there is a [bug in core](https://core.trac.wordpress.org/ticket/24415) that requires public and private to be set to false in order for the `aps_status_arg_show_in_admin_all_list` to also be false. There are many bugs in core surrounding registering custom post statuses, so if something doesn't work the way you want on the first try be prepared to do some digging through trac :-)
Please note that there is a [bug in core](https://core.trac.wordpress.org/ticket/24415) that requires public and private to be set to false in order for the `aps_status_arg_show_in_admin_all_list` to also be false.

### Can I exclude the Archived status from appearing on certain post types?
Yes, simply add this hook to your theme's `functions.php` file or as an [MU plugin](http://codex.wordpress.org/Must_Use_Plugins):

Add this hook to your theme's `functions.php` file or as an [MU plugin](http://codex.wordpress.org/Must_Use_Plugins):

```php
function my_aps_excluded_post_types( $post_types ) {
Expand All @@ -149,13 +155,13 @@ add_filter( 'aps_excluded_post_types', 'my_aps_excluded_post_types' );

### My archived posts have disappeared when I deactivate the plugin!

Don't worry, your content is not __gone__ it's just __inaccessible__. Unfortunately, using a custom post status like `archive` is only going to work while the plugin is active.
Don't worry, your content is _not_ gone it's just __inaccessible__. Unfortunately, using a custom post status like `archive` is only going to work while the plugin is active.

If you have archived content and deativate or delete this plugin, that content will disappear from __view__. You're content is in the database - WordPress just no longer recognizes the `post_status` because this plugin is not there to set this post status up.
If you have archived content and deactivate or delete this plugin, that content will disappear from _view_. Your content is in the database - WordPress just no longer recognizes the `post_status` because this plugin is not there to set this post status up.

If you no longer need the plugin but want to retain your archived content:
1. (Re)activate this plugin
2. Switch all the archived posts/pages/cpts to a native post status, like 'draft' or 'publish'
1. Activate this plugin
2. Switch all the archived posts/pages/post types to a native post status, like 'draft' or 'publish'
3. THEN deactivate/delete the plugin.


Expand Down
31 changes: 16 additions & 15 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ Use an "Archived" status to unpublish content without having to trash it.

This plugin allows you to archive your WordPress content similar to the way you archive your e-mail.

* Makes a new post status available in the dropdown called "Archived"
* Unpublish your posts and pages without having to trash them
* Compatible with posts, pages, and custom post types
* Archives content, making it hidden from public view
* Compatible with posts, pages and call public ustom post types
* Ideal for sites where certain kinds of content is not meant to be evergreen
* Easily extended (see walkthroughs below)

**[Over 13](https://translate.wordpress.org/projects/wp-plugins/archived-post-status/)** languages supported

Expand All @@ -43,7 +44,7 @@ Of course, you can always change the status back to Draft or Publish if you want

Yes, there is nothing wong with trashing old content. And the behavior of the Archived status is very similar to that of trashing.

However, WordPress automatically purges trashed posts every 7 days (by default).
However, WordPress permanently deletes trashed posts after 30 days ([see here](https://codex.wordpress.org/Trash_status#Default_Days_before_Permanently_Deleted)).

This is what makes the Archived post status handy. You can unpublish content without having to delete it forever.

Expand Down Expand Up @@ -80,7 +81,7 @@ add_filter( 'aps_status_arg_exclude_from_search', '__return_false' );

= Can I change the status name? =

You can change the "Archived" string used for the custom status name by adding the code snippet to your theme's `functions.php` file or as an [MU plugin](http://codex.wordpress.org/Must_Use_Plugins):
You can change the post status name, the "Archived" string, by adding the code snippet to your theme's `functions.php` file or as an [MU plugin](http://codex.wordpress.org/Must_Use_Plugins):

```
add_filter( 'aps_archived_label_string', function( $label ) {
Expand All @@ -89,13 +90,13 @@ add_filter( 'aps_archived_label_string', function( $label ) {
});
```

This will change the label used on the admin and on the post title label (see below).
This will change the name used in the admin and on the post title label (see below).

= How to modify or disable the "Archived" label added to the post title =

This plugin automatically adds `Archived:` to the title of archived content. (Note that archived content is only viewable to logged in users with the [`read_private_posts`](http://codex.wordpress.org/Roles_and_Capabilities#read_private_posts) capability).

You can modify the label text, the separator, whether it appears before or after the title, or completely disable it.
You can modify the label text, the separator, whether it appears before or after the title, or disable it entirely.

Follow the examples below, adding the code snippet to your theme's `functions.php` file or as an [MU plugin](http://codex.wordpress.org/Must_Use_Plugins).

Expand All @@ -109,7 +110,7 @@ Follow the examples below, adding the code snippet to your theme's `functions.ph

**Change the separator**

The separator is the string that separates the "Archived" label and the post title, _including spaces_. When the label appears before the title, the separator is a colon and space `: `, if the label is placed after the title it is a dash with spaces on each side ` - `.
The separator is the string between the "Archived" label and the post title, _including spaces_. When the label appears before the title, the separator is a colon and space `: `, if the label is placed after the title it is a dash with spaces on each side ` - `.

You can customize the separator with the following filter:
```
Expand All @@ -129,7 +130,7 @@ add_filter( 'aps_status_arg_private', '__return_false' );
add_filter( 'aps_status_arg_show_in_admin_all_list', '__return_false' );
</pre>

Please note that there is a [bug in core](https://core.trac.wordpress.org/ticket/24415) that requires public and private to be set to false in order for the `aps_status_arg_show_in_admin_all_list` to also be false. There are many bugs in core surrounding registering custom post statuses, so if something doesn't work the way you want on the first try be prepared to do some digging through trac :-)
Please note that there is a [bug in core](https://core.trac.wordpress.org/ticket/24415) that requires public and private to be set to false in order for the `aps_status_arg_show_in_admin_all_list` to also be false.

= Can I exclude the Archived status from appearing on certain post types? =

Expand All @@ -146,22 +147,22 @@ add_filter( 'aps_excluded_post_types', 'my_aps_excluded_post_types' );

= My archived posts have disappeared when I deactivate the plugin! =

Don't worry, your content is not __gone__ it's just __inaccessible__. Unfortunately, using a custom post status like `archive` is only going to work while the plugin is active.
Don't worry, your content is _not_ gone it's just __inaccessible__. Unfortunately, using a custom post status like `archive` is only going to work while the plugin is active.

If you have archived content and deativate or delete this plugin, that content will disappear from __view__. You're content is in the database - WordPress just no longer recognizes the `post_status` because this plugin is not there to set this post status up.
If you have archived content and deactivate or delete this plugin, that content will disappear from _view_. Your content is in the database - WordPress just no longer recognizes the `post_status` because this plugin is not there to set this post status up.

If you no longer need the plugin but want to retain your archived content:
1. (Re)activate this plugin
2. Switch all the archived posts/pages/cpts to a native post status, like 'draft' or 'publish'
3. Then deactivate/delete the plugin.
1. Activate this plugin
2. Switch all the archived posts/pages/post types to a native post status, like 'draft' or 'publish'
3. THEN deactivate/delete the plugin.

= Help! I need support =

Please reach out on the Github Issues or in the WordPress support forums.
Please reach out on the [Github Issues](https://github.com/joshuadavidnelson/archived-post-status/issues) or in the WordPress [support forums](https://wordpress.org/support/plugin/archived-post-status/).

= I have a feature request =

Please reach out on the Github Issues or in the WordPress support forums.
Please reach out on the [Github Issues](https://github.com/joshuadavidnelson/archived-post-status/issues) or in the WordPress [support forums](https://wordpress.org/support/plugin/archived-post-status/).

== Screenshots ==

Expand Down

0 comments on commit 93432b8

Please sign in to comment.