Aged Content Message

Beschreibung

This simple WordPress plugin displays a message in any single post that has been published x years ago from the current time or earlier. The default time to count back is 1 year. Minimal post age as well as message text, HTML, and CSS are fully customizable via settings.

Sprachen

  • English (en_US) (default)
  • Deutsch (de_DE)
  • Deutsch – Sie (de_DE_formal)

Screenshots

  • “The times, they are a-chagin’”: Message on a single post view informing about content that might be outdated.

  • Settings page

Installation

If you don’t know how to install a plugin for WordPress, here’s how.

FAQ

Ich kann die Einstellungsseite nicht finden, wo ist sie?

It’s right there, under General Settings in your admin menu. Configurable settings are:

  • Activate Message: By default, no message will show up on your website until you activate it here.
  • Minimal Post Age: Set a number of years for posts to be considered aged. Default: 1.
  • Message Heading: Heading text. Default: The times, they are a-changin’. (Dylan, google him.)
  • Message Body (Singular): Singular form of the message text, for 1 year-old posts.
  • Message Body (Plural): Plural form of the message text, for 2+ year-old posts.
  • Message Class Attribute: CSS class name(s) applied upon the message’s wrapping <div>.
  • Message HTML: HTML template for the message. You can completely control its output via this field if you want, or use placeholders for heading and text.
  • Message CSS: Customize the visual styling of your message right here. Or not.

Kann ich Standard-Stile deaktivieren?

Sure, just empty the CSS field and no styles shall be applied. If you want to add styles to your theme instead, this might get you started:

/* Default styles */
.aged-content-message {
    background: #f7f7f7;
    border-left: 5px solid #f39c12;
    font-family: inherit;
    font-size: .875rem;
    line-height: 1.5;
    margin: 1.5rem 0;
    padding: 1.5rem;
}
.aged-content-message h5 {
    font-family: inherit;
    font-size: .8125rem;
    font-weight: bold;
    line-height: 2;
    margin: 0;
    padding: 0;
    text-transform: uppercase;
}
.aged-content-message p {
    margin: 0;
    padding: 0;
}

Wohin sind all die Filter verschwunden?

You can still use those good old filters from v1.3, like for this conditional handbrake that doesn’t have a setting (yet):

/* Set condition for displaying message to include pages. */
function yourprefix_aged_content_message__the_content_condition() {
    return ! is_single() && ! is_page();
}
add_action( 'aged_content_message__the_content_condition',
    'yourprefix_aged_content_message__the_content_condition' );

Rezensionen

20. Februar 2019 1 Antwort
This is great little helper! 🙂 The settings are easy and it does nothing without you configuring it. If you need more customizations, then you can use filters to further prevent or show the message. You can style it yourself if you know CSS, but it ships with a generic CSS styling which works in most cases. Recommended little plugin with a responsive author and a Github repo for issues or PRs. Open source can be fun with such great little helper plugins. This is the reason why this directory exists. Hopefully the „[Discontinued]“ text on the Github repo is a mistake …
3. September 2016 1 Antwort
This plugin works great for me, just what I needed to mark all those old posts which I have imported. Thank you!!
Alle 3 Rezensionen lesen

Mitwirkende & Entwickler

„Aged Content Message“ ist Open-Source-Software. Folgende Menschen haben an diesem Plugin mitgewirkt:

Mitwirkende

„Aged Content Message“ wurde in 2 Sprachen übersetzt. Danke an die Übersetzerinnen und Übersetzer für ihre Mitwirkung.

Übersetze „Aged Content Message“ in deine Sprache.

Interessiert an der Entwicklung?

Durchstöbere den Code, sieh dir das SVN Repository an oder abonniere das Entwicklungsprotokoll per RSS.

Änderungsprotokoll

1.4.4

  • Changed ownership
  • Tested compatibility with WordPress 6.4.

1.4.3

  • Tested compatibility with WordPress 5.0.3.

1.4.2

  • Tested compatibility with WordPress 4.6.

1.4.1

  • Added setting for message class attribute.
  • Fixed missing filter argument.

1.4

  • Added settings. Because.
  • Added an admin notice after plugin activation.
  • Added formal German translation.
  • Added composer.json to GitHub repo, props @Chrico!
  • Updated plugin license to GPLv3

1.3

  • Simplified calculation by introducing core constant YEAR_IN_SECONDS, props @sergejmueller!

1.2

  • Improved post aging calculation, props @Kau-Boy!

1.1.1

  • Fixed minor formatting issues, props @bueltge!

1.1

  • Fixed a broken link in readme.txt.

1.0

  • Erstveröffentlichung