Achtung: Ich erkläre mich damit einverstanden, dass alle eingegebenen Daten und meine IP-Adresse nur zum Zweck der Spamvermeidung durch das Programm Akismet in den USA überprüft und gespeichert werden.
Weitere Informationen zu Akismet und Widerrufsmöglichkeiten.'; // default for error message, if checkbox is not active on comment form public $error_message = '

Achtung: Du hast die datenschutzrechtlichen Hinweise nicht akzeptiert.

'; // default style to float checkbox public $style = 'input#akismet_privacy_check { float: left; margin: 7px 7px 7px 0; width: 13px; }'; /** * construct * * @uses add_filter * @access public * @since 0.0.1 * @return \Akismet_Privacy_Policies */ public function __construct() { // The plugin is only helpful on german blogs if ( 'de_DE' !== get_locale() ) { return; } register_deactivation_hook( __FILE__, array( &$this, 'unregister_settings' ) ); register_uninstall_hook( __FILE__, array( 'Akismet_Privacy_Policies', 'unregister_settings' ) ); add_filter( 'comment_form_defaults', array( $this, 'add_comment_notice' ), 11, 1 ); add_action( 'akismet_privacy_policies', array( $this, 'add_comment_notice' ) ); $options = get_option( 'akismet_privacy_notice_settings' ); if ( empty( $options[ 'checkbox' ] ) ) { $options[ 'checkbox' ] = $this->checkbox; } if ( $options[ 'checkbox' ] ) { add_action( 'pre_comment_on_post', array( $this, 'error_message' ) ); } if ( ! isset( $options[ 'style' ] ) ) { $options[ 'style' ] = $this->style; } if ( $options[ 'style' ] ) { add_action( 'wp_head', array( $this, 'add_style' ) ); } // for settings add_action( 'admin_menu', array( $this, 'add_settings_page' ) ); add_filter( 'plugin_action_links', array( $this, 'plugin_action_links' ), 10, 2 ); add_action( 'admin_init', array( $this, 'register_settings' ) ); } /** * Handler for the action 'init'. Instantiates this class. * * @since 0.0.2 * @access public * @return \Akismet_Privacy_Policies $classobj */ public static function get_object() { if ( NULL === self::$classobj ) { self::$classobj = new self; } return self::$classobj; } /** * return plugin comment data * * @since 0.0.2 * @access public * * @param $value string, default = 'Version' * Name, PluginURI, Version, Description, Author, AuthorURI, TextDomain, DomainPath, Network, Title * * @return string */ public function get_plugin_data( $value = 'Version' ) { $plugin_data = get_plugin_data( __FILE__ ); $plugin_value = $plugin_data[ $value ]; return $plugin_value; } /** * return content for policies include markup * use filter hook akismet_privacy_notice_options for change markup or notice * * @access public * @uses apply_filters * @since 0.0.1 * * @param array string $arr_comment_defaults * * @return array | string $arr_comment_defaults or 4html */ public function add_comment_notice( $arr_comment_defaults ) { if ( is_user_logged_in() ) { return $arr_comment_defaults; } $options = get_option( 'akismet_privacy_notice_settings' ); if ( ! isset( $options[ 'checkbox' ] ) || empty( $options[ 'checkbox' ] ) && 0 != $options[ 'checkbox' ] ) { $options[ 'checkbox' ] = $this->checkbox; } if ( empty( $options[ 'notice' ] ) ) { $options[ 'notice' ] = $this->notice; } $defaults = array( 'css_class' => 'privacy-notice', 'html_element' => 'p', 'text' => $options[ 'notice' ], 'checkbox' => $options[ 'checkbox' ], 'position' => 'comment_notes_after' ); // Make it filterable $params = apply_filters( 'akismet_privacy_notice_options', $defaults ); // Create the output $html = "\n" . '<' . $params[ 'html_element' ]; if ( ! empty( $params[ 'css_class' ] ) ) { $html .= ' class="' . $params[ 'css_class' ] . '"'; } $html .= '>' . "\n"; if ( (bool) $params[ 'checkbox' ] ) { $html .= '' . "\n"; $html .= ''; } $html .= '' . "\n"; // Add the text to array if ( isset( $arr_comment_defaults[ 'comment_notes_after' ] ) ) { $arr_comment_defaults[ 'comment_notes_after' ] .= $html; return $arr_comment_defaults; } else { // for custom hook in theme $arr_comment_defaults = $html; echo $arr_comment_defaults; } return NULL; } /** * Return Message on inactive checkbox * Use filter akismet_privacy_error_message for change text or markup * * @uses wp_die * @access public * @since 0.0.2 * @return void */ public function error_message() { if ( is_user_logged_in() ) { return NULL; } $options = get_option( 'akismet_privacy_notice_settings' ); if ( empty( $options[ 'error_message' ] ) ) { $options[ 'error_message' ] = $this->error_message; } // check for checkbox active if ( isset( $_POST[ 'comment' ] ) && ( ! isset( $_POST[ 'akismet_privacy_check' ] ) ) ) { $message = apply_filters( 'akismet_privacy_error_message', $options[ 'error_message' ] ); wp_die( $message ); } } /** * Echo style in wp_head * * @uses get_option, plugin_action_links, plugin_basename * @access public * @since 0.0.2 * @return string $links */ public function add_style() { if ( is_user_logged_in() ) { return NULL; } $options = get_option( 'akismet_privacy_notice_settings' ); if ( empty( $options[ 'style' ] ) ) { $options[ 'style' ] = $this->style; } echo ''; } /** * Add settings link on plugins.php in backend * * @uses plugin_basename * @access public * * @param array $links , string $file * * @param $file * * @since 0.0.2 * @return string $links */ public function plugin_action_links( $links, $file ) { if ( plugin_basename( dirname( __FILE__ ) . '/akismet-privacy-policies.php' ) == $file ) { $links[ ] = '' . __( 'Settings' ) . ''; } return $links; } /** * Add settings page in WP backend * * @uses add_options_page * @access public * @since 0.0.2 * @return void */ public function add_settings_page() { add_options_page( 'Akismet Privacy Policies Settings', 'Akismet Privacy Policies', 'manage_options', 'akismet_privacy_notice_settings_group', array( $this, 'get_settings_page' ) ); add_action( 'contextual_help', array( $this, 'contextual_help' ), 10, 2 ); } /** * Return form and markup on settings page * * @uses settings_fields, normalize_whitespace * @access public * @since 0.0.2 * @return void */ public function get_settings_page() { ?>

get_plugin_data( 'Name' ); ?>

checkbox; } if ( empty( $options[ 'notice' ] ) ) { $options[ 'notice' ] = normalize_whitespace( $this->notice ); } if ( empty( $options[ 'error_message' ] ) ) { $options[ 'error_message' ] = normalize_whitespace( $this->error_message ); } if ( empty( $options[ 'style' ] ) ) { $options[ 'style' ] = normalize_whitespace( $this->style ); } ?>
/>

Hinweis: HTML möglich
Achtung: Im Hinweistext musst du manuell den Link zu deiner Datenschutzerklärung einfügen. Einen Mustertext für die Datenschutzerklärung findest du im Reiter "Hilfe", rechts oben auf dieser Seite.
Beispiel: notice ); ?>

Hinweis: HTML möglich
Beispiel: error_message ); ?>

Hinweis: CSS notwendig
Beispiel: style ); ?>

Weitere Informationen zum Thema findest du in der WordPress Deutschland FAQ. Dieses Plugin wurde entwickelt von der Inpsyde GmbH mit rechtlicher Unterstützung durch die Rechtsanwaltskanzlei SCHWENKE & DRAMBURG.

' . __( 'Das Plugin ergänzt das Kommentarformular um datenschutzrechtliche Hinweise, die erforderlich sind, wenn du das Plugin Akismet einsetzt.' ) . '

' . ''; return normalize_whitespace( $contextual_help ); } } // end class if ( function_exists( 'add_action' ) && class_exists( 'Akismet_Privacy_Policies' ) ) { add_action( 'plugins_loaded', array( 'Akismet_Privacy_Policies', 'get_object' ) ); } else { header( 'Status: 403 Forbidden' ); header( 'HTTP/1.1 403 Forbidden' ); exit(); }