add_menu(); } // Add all the functionalities of the plugin to the plugin admin menu public function add_menu() { // Adding 123privacy stuff to the admin menu add_action( 'admin_menu', array( $this, 'admin_add_menu' ) ); // Adding 123privacy stuff to the frontend right before the tag add_action( 'wp_footer', array( $this, 'body_add_data' ) ); // Adding 123privacy stuff to the front end inside the add_action( 'wp_head', array( $this, 'head_add_data' ) ); // Adding AddThis stuff to the posts (only if selected by user in the form) if ( get_option( 'addthis_button_show' ) == 1 ) add_action( 'the_content', array( $this, 'addthis_button_onpost' ) ); } public function admin_add_menu() { // Add options page to the admin menu add_options_page( '123privacy', '123privacy', 'administrator', 'privacy_to_wordpress', array( $this, 'options' ) ); } /** * Retrieve 123privacy information to be added to the section */ public function data_save_body() { // First validate that the content of the form comes from the location on the current site and not somewhere else if ( wp_verify_nonce( $_POST['form_content_validator'], 'validate_form_content' ) ) { // Process content if valid if ( isset( $_POST['body_submitter'] ) && ( ! empty( $_POST['body_submitter'] ) ) ) { $option_name_body = 'add_to_body'; $options_body['data'][0] = $_POST['body_data']; if ( get_option( $option_name_body ) ) { // Update user information if user information is present update_option( $option_name_body, $options_body ); } else { // Add user information if user information is empty add_option( $option_name_body, $options_body ); } } } } public function body_add_data() { /** * Adding 123privacy information to the section */ $options_body = get_option( 'add_to_body' ); $output_body = $options_body['data'][0]; // Filter out any inserted HTML-code for added security $output_body = wp_filter_nohtml_kses( $output_body ); // Code to output to the frontend $output_body = "\n\n\n\n"; // Echo the code echo stripslashes( $output_body ); } /** * Retrieve 123privacy information to be added to the section */ public function data_save_head() { // First validate that the content of the form comes from the location on the current site and not somewhere else if ( wp_verify_nonce( $_POST['form_content_validator'], 'validate_form_content' ) ) { // Process content if valid if ( isset( $_POST['head_submitter'] ) && ( ! empty( $_POST['head_submitter'] ) ) ) { $option_name_head = 'add_to_head'; $options_head['data'][0] = $_POST['head_data']; if ( get_option($option_name_head) ) { // Update user information if user information is present update_option( $option_name_head, $options_head ); } else { // Add user information if user information is empty add_option( $option_name_head, $options_head ); } } } } public function head_add_data() { /** * Adding 123privacy information to the section */ $options_head = get_option( 'add_to_head' ); $output_head = $options_head['data'][0]; // Filter out any inserted HTML-code for added security $output_head = wp_filter_nohtml_kses( $output_head ); if ( ! isset( $output_head ) || empty( $output_head ) ) { // Do not add anything to the frontend if no information was entered by user return false; } else { // Code to output to the frontend $output_head = "\n\n\n\n\n"; // Echo the code echo stripslashes( $output_head ); } } public function addthis_button_onpost( $post_content ) { /** * Adding 'AddThis' buttons to the posts */ if ( is_single() ) { /* Code to add to the posts */ $output = "\n\n\n
\n"; // Facebook button if ( get_option( 'addthis_button_showfacebook' ) == '1' ) { $output .= "\n"; } // Tweet button if ( get_option( 'addthis_button_showtwitter' ) == '1' ) { $output .= "\n"; } // Hyves Respect button if ( get_option( 'addthis_button_showhyves' ) == '1' ) { $output .= "\n"; } // Google +1 button if ( get_option( 'addthis_button_showgoogle' ) == '1' ) { $output .= "\n"; } $output .= "
\n\n\n\n"; // Put buttons to the bottom of the posts - left or right depending on the users choice if ( get_option( 'addthis_button_vp' ) == 'bottom' ) { $output = $post_content . "\n\n

" . $output . "

\n\n\n"; // Put buttons at the top of the posts - left or right depending on the users choice } elseif ( get_option( 'addthis_button_vp' ) == 'top' ) { $output = "\n\n
" . $output . "

\n\n\n" . $post_content; } } // Return values to be saved return $output; } public function options() { // Saving 123privacy data for the section privacy_to_wordpress::data_save_body(); $options_body = get_option( 'add_to_body' ); // Saving 123privacy data for the section privacy_to_wordpress::data_save_head(); $options_head = get_option( 'add_to_head' ); ?>

123privacy → instellingen

1. Voer hieronder uw eigen unieke code voor uw website in. Oftewel: uw serial/website_id

Voorbeeld: a12b3456-1234-56ab-7c89-123456a78b12


Opmerking: U hoeft hierboven enkel uw eigen unieke serial/website_id in te voeren. De overige code die in de <head> en <body> moet komen, wordt automatsch door deze plugin ingeladen.

U kunt uw unieke serial/website_id vinden in uw persoonlijke profiel op 123privacy.nl.

2. Voer hieronder uw eigen unieke Google Analytics accountnummer in

Voorbeeld: UA-01234567-89


Belangrijk: Indien u gebruik maakt van een andere plugin om de Google Analytics code aan uw website toe te voegen, dient u deze eerst te deactiveren en/of te verwijderen!

Opmerking: Indien u geen gebruik maakt van Google Analytics of liever een andere plugin gebruikt om Google Analytics in uw website te integreren, hoeft u hier uiteraard niets in te vullen.

3. Help ons mee door een link naar 123privacy.nl op uw website te plaatsen

Voorbeeld: [123privacy_tekst] Voorbeeld: [123privacy_url]
Resultaat: Dé oplossing voor de nieuwe cookiewet Resultaat: 123privacy.nl


Werkwijze: Plaats bovenstaande code [inclusief haakjes] op de plek waar u wilt dat de link verschijnt. Dit kan ergens in één of meerdere pagina's en/of artikelen zijn.
Het is voor de werking niet nodig om eerst over te schakelen naar 'HTML-modus' in de teksteditor van WordPress.

Opmerking: De code werkt ook wanneer deze in een (tekst)widget wordt geplaatst.

Extra optie: aangepaste AddThis buttons in alle berichten

Inschakelen voor berichten />
Horizontale plaatsing
Verticale plaatsing
Buttons (de)activeren
Facebook button />
Tweet button />
Hyves button />
Google +1 button />


Tip

Voor een cookievrije Twitter volg knop kunt u gebruik maken van de 'Twitter Button' widget. Deze widget is te vinden in het overzicht van beschikbare widgets in het hoofdmenu onder 'Weergave' of 'Appearance'.

Voorbeeld van de Twitter volg knop:

'; ?>

De Twitter Button widget maakt dankbaar gebruik van de gratis functionaliteit van twitterbutton.nl.