Title: Protected Posts Logout Button
Author: Nate Reist
Published: <strong>16 Μαΐου  2012</strong>
Last modified: 16 Φεβρουαρίου  2023

---

Αναζήτηση πρόσθετων

Αυτό το πρόσθετο **δεν έχει δοκιμασθεί με τις 3 τελευταίες κύριες εκδόσεις του WordPress**.
Μπορεί να μην αναπτύσσεται ή να υποστηρίζεται άλλο και να έχει προβλήματα συμβατότητας
με τις πιο πρόσφατες εκδόσεις του WordPress.

![](https://s.w.org/plugins/geopattern-icon/protected-posts-logout-button.svg)

# Protected Posts Logout Button

 Από [Nate Reist](https://profiles.wordpress.org/natereist/)

[Λήψη](https://downloads.wordpress.org/plugin/protected-posts-logout-button.1.4.6.zip)

 * [Λεπτομέρειες](https://el.wordpress.org/plugins/protected-posts-logout-button/#description)
 * [Κριτικές](https://el.wordpress.org/plugins/protected-posts-logout-button/#reviews)
 *  [Εγκατάσταση](https://el.wordpress.org/plugins/protected-posts-logout-button/#installation)
 * [Ανάπτυξη](https://el.wordpress.org/plugins/protected-posts-logout-button/#developers)

 [Υποστήριξη](https://wordpress.org/support/plugin/protected-posts-logout-button/)

## Περιγραφή

This plugin simply adds a logout button to the content of any password protected
post. Sometimes clients want a password protected page to share information with
privileged individuals and the default 10 days for the cookie to expire is too long
for their liking. So I wrote a little plugin to do this with AJAX and set the cookie
to expire immediately, well actually 10 days in the past.

 * Works logged in or out as a WordPress user.
 * Uses the same functionality WordPress uses to set post cookies.
 * Has a simple settings page to make everything easier.
 * Allows you to alert user they have logged out.

## Στιγμιότυπα

[⌊Admin Screen for simple settings⌉⌊Admin Screen for simple settings⌉[

Admin Screen for simple settings

[⌊Optional alert⌉⌊Optional alert⌉[

Optional alert

[⌊Button added to the content⌉⌊Button added to the content⌉[

Button added to the content

## Εγκατάσταση

 1. Upload `pplb_logout_button.zip` to the `/wp-content/plugins/` directory
 2. Ενεργοποιήστε το πρόσθετο μέσω του μενού “Πρόσθετα” στο WordPress
 3. Customize your settings.
 4. Confirm it is working & you’re done!

## Συχνές Ερωτήσεις

### The logout button shows up, but nothing happens when clicked, what’s wrong?

Does your theme have `<?php wp_head(); ?>` and `<?php wp_footer(); ?>` installed
correctly? This plugin uses some javascript that gets embedded automatically in 
the header or footer, and requires it to work properly.

### This button is so ugly?! What can I do?

Well, this button is setup to be no intrusive on your theme, so it adapts to the
styles that come with you theme.

That being said, you can style the button as you wish using a css class you define
on the settings page, or add your themes button class.

### I get more than one button on my page when I am logged in to a protected post, what gives?

Well that logout button gets added to the function `the_content()` but only when
the function `in_the_loop()` returns true (as of version 1.2).
 if your theme is
using `apply_filters('the_content', $some_str);` it is possible it will show up 
more than once.

## Κριτικές

![](https://secure.gravatar.com/avatar/737fdf0cbe9017f58805695defdcddfd173346cb20c1f00919f9908bf5cfc309?
s=60&d=retro&r=g)

### 󠀁[Excellent Plugin](https://wordpress.org/support/topic/excellent-plugin-6640/)󠁿

 [qamar0786](https://profiles.wordpress.org/qamar0786/) 7 Ιανουαρίου 2021

Thank you for this excellent plugin. It does what it says on the tin perfectly!

![](https://secure.gravatar.com/avatar/69b74a8b449201f3e9e4c562803d8ede0bb97bd5ad04af631f12d6a7cac673ea?
s=60&d=retro&r=g)

### 󠀁[Great little plugin](https://wordpress.org/support/topic/great-little-plugin-165/)󠁿

 [danielepais](https://profiles.wordpress.org/danielepais/) 28 Σεπτεμβρίου 2017

Efficient and time saver. This plugin does exactly what it says in the tin…Logout..!

![](https://secure.gravatar.com/avatar/de5f68f2c0079e8c21d20ec3fb7cc31396282003773faa865d139e906021d5c6?
s=60&d=retro&r=g)

### 󠀁[Good](https://wordpress.org/support/topic/good-1899/)󠁿

 [spanizhfly](https://profiles.wordpress.org/spanizhfly/) 3 Σεπτεμβρίου 2016 2 απαντήσεις

Works well, but expiry doesnt work. Any idea? I’ve set the expiry 300 Seconds but
it doesnt log out.

![](https://secure.gravatar.com/avatar/27a55322233850b89f5ef896fe3ddae55a3648e0a0a96d3de3fe52ae5103fdd0?
s=60&d=retro&r=g)

### 󠀁[Simply works](https://wordpress.org/support/topic/simply-works-109/)󠁿

 [Sonnenbad](https://profiles.wordpress.org/sonnenbad/) 3 Σεπτεμβρίου 2016

Just activate and that is it. Great.

![](https://secure.gravatar.com/avatar/9e851ff511c53d283b4fff365ccfe91715c731a6d4641f26cbd3c55501173060?
s=60&d=retro&r=g)

### 󠀁[Very easy to use and works.](https://wordpress.org/support/topic/very-easy-to-use-and-works/)󠁿

 [Kandi Carpenter](https://profiles.wordpress.org/kandi-carpenter/) 3 Σεπτεμβρίου
2016

This worked perfectly for my needs. Thank you so much for making it so simple.

 [ Ανάγνωση όλων των 12 κριτικών ](https://wordpress.org/support/plugin/protected-posts-logout-button/reviews/)

## Συνεισφέροντες & Προγραμματιστές

“Protected Posts Logout Button” είναι λογισμικό ανοιχτού κώδικα. Οι παρακάτω έχουν
συνεισφέρει στη δημιουργία του.

Συντελεστές

 *   [ Nate Reist ](https://profiles.wordpress.org/natereist/)

[Μεταφράστε το “Protected Posts Logout Button” στην γλώσσα σας.](https://translate.wordpress.org/projects/wp-plugins/protected-posts-logout-button)

### Ενδιαφέρεστε για την ανάπτυξη;

[Περιηγηθείτε στον κώδικα](https://plugins.trac.wordpress.org/browser/protected-posts-logout-button/),
ανατρέξτε στο [αποθετήριο SVN](https://plugins.svn.wordpress.org/protected-posts-logout-button/)
ή εγγραφείτε στο [αρχείο καταγραφής αλλαγών ανάπτυξης](https://plugins.trac.wordpress.org/log/protected-posts-logout-button/)
μέσω [RSS](https://plugins.trac.wordpress.org/log/protected-posts-logout-button/?limit=100&mode=stop_on_copy&format=rss).

## Σύνοψη αλλαγών

#### 1.4.6

 * Fixed vulnerabilities in option saving function, not allowing unescaped user 
   input and checking user role

#### 1.4.5

 * Tested with WordPress 6.1.1
 * Added nonce verification for updating options.

#### 1.4.4

 * Tested with WordPress 5.2.2
 * Added option for positioning button after content.

#### 1.4.3

 * Tested with WordPress 5.1.1
 * Added support for multisite by adding COOKIE_DOMAIN to the logout function. Thanks
   to @rcreactor, @gahapati, and @gserafini

#### 1.4.2

 * Tested with WordPress 5.0.3
 * Added filters `pplb_button_text` & `pplb_button_html` for manipulating text and
   HTML button output.

#### 1.4.1

 * Added an option for changing the button text
 * re added the function `pplb_logout_button` to fix potential PHP errors

#### 1.4.0

 * Refactored code into a class
 * Moved the options page to a template
 * Tested with version 4.4.2

#### 1.3.2.1

 * Moving javascript to footers
 * Checking to see if logout cookie option is numeric

#### 1.3.2

 * Added a optional debug to the send response to the console.log function ( only
   for debugging use should not be used in production. )
 * Added a check to see the `message` is not of type “undefined”
 * Added an option to the options page for turning on or off debug.
 * Tested with version 4.0!

#### 1.3.1

 * Added the ability to change the default WordPress postpass cookie in the admin
   area.
 * Cleaned up some logic and php code.

#### 1.3

 * Added conditional logic to the allow admin to disable the automatic filter.
 * Added a shortcode to allow users to place the button inside posts and a php function
   to place it in template files or hook it.

#### 1.2

Added conditional logic to the filter to only add the button inside of the loop.

#### 1.1

Fixed a bug with javascript enqueue that was causing a 404 file not found for `logout.
js`.

#### 1.0

Original Release: uses `wp_enqueue_scripts` and ajax to logout password protected
posts by setting the cookie to expire immediately.

## Μεταστοιχεία

 *  Version **1.4.6**
 *  Τελευταία ενημέρωση: **πριν από 3 έτη**
 *  Ενεργές εγκαταστάσεις: **1,000+**
 *  Έκδοση WordPress: ** 2.8 ή νεότερη **
 *  Δοκιμασμένο μέχρι: **6.1.10**
 *  Language
 * [English (US)](https://wordpress.org/plugins/protected-posts-logout-button/)
 * Ετικέτες:
 * [logout](https://el.wordpress.org/plugins/tags/logout/)[wordpress security](https://el.wordpress.org/plugins/tags/wordpress-security/)
 *  [Σύνθετη Προβολή](https://el.wordpress.org/plugins/protected-posts-logout-button/advanced/)

## Αξιολογήσεις

 4.9 out of 5 stars.

 *  [  12 5-star reviews     ](https://wordpress.org/support/plugin/protected-posts-logout-button/reviews/?filter=5)
 *  [  1 4-star review     ](https://wordpress.org/support/plugin/protected-posts-logout-button/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/protected-posts-logout-button/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/protected-posts-logout-button/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/protected-posts-logout-button/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/protected-posts-logout-button/reviews/#new-post)

[Δείτε όλες τις κριτικές](https://wordpress.org/support/plugin/protected-posts-logout-button/reviews/)

## Συντελεστές

 *   [ Nate Reist ](https://profiles.wordpress.org/natereist/)

## Υποστήριξη

Έχετε κάτι να πείτε; Χρειάζεστε βοήθεια;

 [Φόρουμ υποστήριξης](https://wordpress.org/support/plugin/protected-posts-logout-button/)

## Δωρεά

Θα θέλατε να υποστηρίξετε την προαγωγή αυτού του πρόσθετου;

 [ Κάντε δωρεά σε αυτό το πρόσθετο ](http://omfgitsnater.com/protected-posts-logout-button/)