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 .= '' . $params[ 'html_element' ] . '>' . "\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() { ?><strong>Akismet Anti-Spam</strong>
Diese Seite nutzt das <a href="http://akismet.com/">Akismet-Plugin der <a href="http://automattic.com/">Automattic</a> Inc., 60 29th Street #343, San Francisco, CA 94110-4929, USA. Mit Hilfe dieses Plugins werden Kommentare von echten Menschen von Spam-Kommentaren unterschieden. Dazu werden alle Kommentarangaben an einen Server in den USA verschickt, wo sie analysiert und für Vergleichszwecke vier Tage lang gespeichert werden. Ist ein Kommentar als Spam eingestuft worden, werden die Daten über diese Zeit hinaus gespeichert. Zu diesen Angaben gehören der eingegebene Name, die Emailadresse, die IP-Adresse, der Kommentarinhalt, der Referrer, Angaben zum verwendeten Browser sowie dem Computersystem und die Zeit des Eintrags. Sie können gerne Pseudonyme nutzen, oder auf die Eingabe des Namens oder der Emailadresse verzichten. Sie können die Übertragung der Daten komplett verhindern, in dem Sie unser Kommentarsystem nicht nutzen. Das wäre schade, aber leider sehen wir sonst keine Alternativen, die ebenso effektiv arbeiten. Sie können der Nutzung Ihrer Daten für die Zukunft unter <a href="mailto:support@wordpress.com" target="_blank">support@wordpress.com</a>, Betreff “Deletion of Data stored by Akismet” unter Angabe/Beschreibung der gespeicherten Daten widersprechen.'
) . '