Offentlig forhåndsvisning av innlegg

Beskrivelse

Del en lenke til anonyme brukere så de kan forhåndsvise en kladd til et innlegg (eller annet offentlig innhold) før det publiseres.

Har du noen gang skrevet et innlegg med hjelp fra noen som ikke har adgang til ditt nettsted og har hatt behov for å gi dem muligheten til å forhåndsvise det før publisering? Denne utvidelsen tar seg av det ved å generere en URL med en innebygget kode som utløper, og som kan utgis for offentlig forhåndsvisning.

Tidligere ble denne utvidelsen vedlikehold av Matt Martz var etter en idé av Jonathan Dingman. Takk til Hans Dinkelberg for hans foto.

Bruk

  • For å aktivere offentlig forhåndsvining av innlegg krysser du av i boksen i ruta for innleggsredigering.
  • Lenken vil bli vist hvis det er krysset av i boksen, bare kopier og del lenken med dine venner.
  • For å deaktivere forhåndsvisning fjerner du avkrysningen i boksen.

Skjermskudd

  • Rediger innlegg-siden

Installasjon

Merk: Det vil ikke være noen side med innstillinger.

For automatisk installasjon gjennom WordPress:

  1. Go to the ‘Add New’ plugins screen in your WordPress admin area
  2. Søk etter ‘Public Post Preview’
  3. Click ‘Install Now’ and activate the plugin

For a manual installation via FTP:

  1. Upload the public-post-preview directory to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ screen in your WordPress admin area

To upload the plugin through WordPress, instead of FTP:

  1. Upload the downloaded zip file on the ‘Add New’ plugins screen (see the ‘Upload’ tab) in your WordPress admin area and activate.

FAQ

Jeg kan ikke finne innstillingen for forhåndviningslenker. Hvor er den?

Avkrysningsboksen er bare tilgjengelig for upubliserte innlegg straks et innlegg er lagret som kladd.

Etter en vis tid returnerer forhåndsvisningslenken meldingen «This link has expired!». Hvorfor?

Utvidelsen genererer en URL med en implisitt kode som utløper. Som standard «lever» en lenke i 48 timer. Etter 48 timer er lenken utløpt og du du trenger f\da kopiere og dele en lenke som er automatisk generert på samme sted i redigeringsverktøyet.

48 timer er ikke nok for meg. Kan jeg forlenge utløpstiden?

Ja, selvfølgelig. Du kan bruke filteret ppp_nonce_life. For eksempel 5 dager:

add_filter( 'ppp_nonce_life', 'my_nonce_life' );
function my_nonce_life() {
    return 5 * DAY_IN_SECONDS;
}

Eller bruk Konfigurering av offentlig forhåndsvisning

Vurderinger

7. februar, 2024
Just used for a nice way for a client to approve new WooCommerce products. Easy-peasy.
29. mars, 2023
I have been using this plugin for a very long time and like it. but I just don't understand why there is no setting where I can specify the validity period of the link. That would be so easy. Instead, I have to either manually mess around in the code or install a SEPARATE PLUGIN that does this really very simple job. The plugin is really great, but apparently they just stopped at the crucial point. Really a great pity.
20. november, 2022
This is a great plugin that should be officially incorporated into WordPress.
12. august, 2022
I like the plugin, a lot. But it could be SO MUCH better if you could just extend the 48 hours to let's say, a week or even two. Because let's face it, most of us use this tool for clients so that they can see the work, before approving it. The thing is that they receive the preview mail and aren't able to check the preview in such a short time period. Add weekend and different time zones to that, and it makes this plugin pretty much useless because you keep sending preview links back and forth over and over again. The short timeframe makes the plugin so much worse than it could be. I really don't understand this choice. Yes, there is code that you can manually add. But the whole point of a plugin is to stay away from manual coding. And yes, there is also another plugin that lets you extend the preview time. But that means another plugin to keep up-to-date, more drag on the server and increasing security risks. So please. You can make this plugin 90% better just by increasing the timeframe, or letting the user decide the timeframe.
Les alle 72 vurderinger

Bidragsytere og utviklere

“Offentlig forhåndsvisning av innlegg” er programvare med åpen kildekode. Følgende personer har bidratt til denne utvidelsen.

Bidragsytere

“Offentlig forhåndsvisning av innlegg” har blitt oversatt til 24 språk. Takk til oversetterne for deres bidrag.

Oversett “Offentlig forhåndsvisning av innlegg” til ditt språk.

Interessert i utvikling?

Bla gjennom koden, sjekk ut SVN-repositoriet, eller abonner på utviklingsloggen med RSS.

Endringslogg

2.10.0 (2022-11-19):

  • Compatibility with WordPress 6.1.
  • Integrate with User Switching: Direct the user to the public preview of a post when they switch off from the post editing screen. Props @johnbillion.

2.9.3 (2021-03-12):

  • Compatibility with WordPress 5.7.
  • Create a fresh preview URL when enabling public preview.
  • Add check for possibly undefined PHP «superglobals». Props @waviaei.

For more see CHANGELOG.md.