Archive Content with Archived Post Status

Descrizione

Questo plugin ti permette di archiviare gli articoli come fai abitualmente con le email.

  • Archivia i tuoi articoli senza doverli cestinare
  • Archive content is hidden from public view
  • Compatible with posts, pages, and public custom post types
  • Ideale per siti in cui alcuni contenuti non devono essere permanenti
  • Easily extended (see below)

Over 13 languages supported

Hai trovato utile questo plugin? Potresti volerlo recensire con 5 stelline.

Development of this plugin is done on GitHub. Pull requests welcome. Please see issues reported there before going to the plugin forum.

Screenshot

  • Schermata della lista degli articoli
  • Modifica Rapida
  • Metabox di pubblicazione

FAQ

Non è come usare le Bozze o gli articoli Privati?

In effetti no. Non sono la stessa cosa.

La Bozza è uno stato di “pre-pubblicazione” riservato ai contenuti ancora in elaborazione. Puoi continuare a modificare i contenuti nello stato Bozza e anche visualizzarne l’anteprima.

Lo stato Privato è un tipo particolare di pubblicazione. Significa che il contenuto è effettivamente pubblicato, ma solo alcuni utenti possono vederlo.

Lo stato Archiviato, invece, è uno stato di “post-pubblicazione”. Una volta impostato come archiviato un articolo non è più visualizzabile o modificabile.

Puoi ovviamente riportare l’articolo negli stati Pubblicato o Bozza per modificarlo nuovamente.

Non potrei semplicemente cestinare i contenuti che non mi interessano più?

Sì, non c’è nulla di male nel cestinare i vecchi contenuti. Tra l’altro lo stato Archiviato è molto simile al cestinare.

However, WordPress permanently deletes trashed posts after 30 days (see here).

È questo che rende comodo lo stato Archiviato. Puoi togliere dalla pubblicazione i contenuti senza rischiare di eliminarli per sempre

Dove trovo le opzioni per questo plugin?

This plugin does not have a settings page. However, there are numerous hooks available in the plugin so you can customize default behaviors. Many of those hooks are listed below in this FAQ.

Perché gli articoli archiviati compaiono nel front-end?

Archived content is by default viewable for users with the any user with the read_private_posts capability.

This means if you are viewing your site while being logged in as an Editor or Administrator, you will see the archived content. However, lower user roles and non-logged-in users will not see the archived content.

Per modificare i privilegi di lettura predefiniti puoi usare questo hook includendolo nel functions.php del tema in uso o come plugin MU:

function my_aps_default_read_capability( $capability ) {
    $capability = 'read';

    return $capability;
}
add_filter( 'aps_default_read_capability', 'my_aps_default_read_capability' );

Posso far comparire gli articoli archiviati nel front-end per tutti gli utenti?

Add these hooks to your theme’s functions.php file or as an MU plugin:

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 post status name, the “Archived” string, by adding the code snippet to your theme’s functions.php file or as an MU plugin:

add_filter( 'aps_archived_label_string', function( $label ) {
    $label = 'Custom Label'; // replace with your custom label
    return $label;
});

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 capability).

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.

Remove the label

add_filter( 'aps_title_label', '__return_false' );

Place the label after the title

add_filter( 'aps_title_label_before', '__return_false' );

Change the separator

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:

add_filter( 'aps_title_separator', function( $sep ) {
    $sep = ' ~ '; // replace with your separator
    return $sep;
});

Posso escludere gli articoli archiviati dal totale di “Tutti” in WP Admin come accade per gli articoli nel cestino?

Add these hooks to your theme’s functions.php file or as an MU plugin:

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

Posso fare in modo che lo stato Archiviato non sia disponibile per certi tipi di articolo?

Add this hook to your theme’s functions.php file or as an MU plugin:

function my_aps_excluded_post_types( $post_types ) {
    $post_types[] = 'my_custom_post_type';

    return $post_types;
}
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.

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

I have a feature request

Please reach out on the Github Issues or in the WordPress support forums.

Recensioni

20 Aprile 2020
Es o fue un gran plugin. El problema es que lleva sin actualizarse mucho tiempo, y las opciones de configuración son también mínimas sin poder cambiar la nota de archivado. Existen plugins mas actualizado que funcionan mejor en las nuevas versiones. El problema es que con el nuevo editor de gutenberg, no podremos archivar los posts. Poniendo de nuevo el clásico edito no lo he probado, pero bueno, os recomiendo usar otros plugins que hagan la misma función pues estará mejor adaptado.
19 Gennaio 2018
So I was initially concerned because I saw the archived posts while I was logged in but the good news is no one who is not an admin see them. This is perfect for posts you don’t want to fully trash but don’t want them clogging up your drafts!
Leggi tutte le recensioni di 34

Contributi e sviluppo

“Archive Content with Archived Post Status” è un software open source. Le persone che hanno contribuito allo sviluppo di questo plugin sono indicate di seguito.

Collaboratori

“Archive Content with Archived Post Status” è stato tradotto in 12 lingue. Grazie ai traduttori per i loro contributi.

Traduci “Archive Content with Archived Post Status” nella tua lingua.

Ti interessa lo sviluppo?

Esplora il codice segui il repository SVN, segui il log delle modifiche tramite RSS.

Changelog (registro delle modifiche)

0.3.9.1 – January 19, 2024

  • Fixing version numbers in files, missing from 0.3.9 release.

0.3.9 – January 19, 2024

  • Fix deprecated php warning on filter_input, using native WP functions for escaping & getting query var. Fixes another issue, where archived posts couldn’t be trashed (Closes #35)
  • Add aps_archived_label_string filter to modify the “Archived” string used for the label.
  • Add aps_title_separator and aps_title_label to filter the post title prefix and separator, defaults to ‘Archived’ with a : separator. Disable the title label entirely by using add_filter( 'aps_title_prefix', '__return_false' ); in your functions.php file or custom plugin file. Closes #21
  • Added aps_title_label_before filter, defaults to true – pass false to have the label appear after the title instead of before it. This change along with the label string filter above closes #31
  • Add PHPUnit tests & github actions.
  • Update some comments and documentation, readmes, etc

0.3.8 – December 15, 2023

Ownership of this plugin is being transferred to Joshua David Nelson. A huge thank you to @fjarrett for his work on this plugin to this point. More info to come soon, keep an eye on the Github Repository!

This update includes:
– Tested up to WordPress 6.4.2
– Added minimum PHP of 7.4
– Bumped minimum WordPress to 5.3
– Added Github actions for deployment to WP repo
– Updated contributors in readmes
– Added PHPStan and PHPCS Github actions

0.3.7 – December 23, 2016

  • Tweak: Indicate support for WordPress 4.7.

0.3.6 – April 13, 2016

  • Fix: Bug causing Archived status label to always appear on edit screen.

Props fjarrett

0.3.5 – April 13, 2016

  • New: Indicate support for WordPress 4.5.
  • New: Added language support for cs_CZ.
  • New: Add filter to allow Archived content to be editable (#12).

Props fjarrett

0.3.4 – December 14, 2015

  • New: Indicate support for WordPress 4.4.
  • Fix: Broken title when post format icon is present (#9).

Props fjarrett, brandbrilliance

0.3.3 – September 12, 2015

  • New: Indicate support for WordPress 4.3.

Props fjarrett

0.3.2 – March 25, 2015

  • Fix: Non-object warnings when $post is null (#6).

Props fjarrett, stevethemechanic, edwin-yard

0.3.1 – January 27, 2015

  • New: Added language support for nl_NL.
  • Tweak: Refreshed existing language files.
  • Fix: Missing argument warning on the_title filter.

Props fjarrett, RavanH, htrex

0.3.0 – January 26, 2015

  • New: Added language support for de_DE, es_ES, fr_FR, pt_PT and ru_RU.
  • New: Users with the read_private_posts capability can now view Archived content.
  • New: Automatically close comments and pings when content is archived.
  • Tweak: Allow mulitple post states to exist alongside Archived in edit screen.
  • Fix: The aps_excluded_post_types filter now works as expected on Edit screens.

Props fjarrett

0.2.0 – January 21, 2015

  • New: Make Archived content read-only.

Props fjarrett, pollyplummer

0.1.0 – January 4, 2015

  • Initial release.

Props fjarrett