Options configuration panel Version: 1.1.1 Author: Fernando Torros Author URI: http://cybec.com */ /* To install: 1. Upload privacy-policy.zip to the /wp-content/plugins/ directory for your blog. 2. Unzip it into /wp-content/plugins/privacy-policy/privacy-policy.php 3. Activate the plugin through the 'Plugins' menu in WordPress by clicking "Privacy Policy" 4. Go to your Options Panel and open the "Privacy Policy" submenu. /wp-admin/options-general.php?page=privacy-policy.php 5. Configure the privacy policy options you want. License: Copyright by Fernando Torros. You are free to use this plugin on any WordPress blog. No warranty is provided -- it's up to you to ensure that the privacy policy it generates is good enough for your site and/or jurisdiction. */ $privacy_policy_ver = '1.1'; $pp_default_sitename = get_bloginfo( 'name' ); $pp_default_before_heading = '

'; $pp_default_after_heading = '

'; $pp_default_before_paragraph = '

'; $pp_default_after_paragraph = '

'; $pp_default_contact = get_bloginfo( 'admin_email' ); $pp_default_title = 'AdSense Privacy Policy'; $pp_default_slug = 'privacy-policy'; $pp_default_pp_help = true; $pp_default_browser_help = true; $pp_default_credit = true; add_option( 'privacy_policy_sitename', $pp_default_sitename ); add_option( 'privacy_policy_before_heading', $pp_default_before_heading ); add_option( 'privacy_policy_after_heading', $pp_default_after_heading ); add_option( 'privacy_policy_before_paragraph', $pp_default_before_paragraph ); add_option( 'privacy_policy_after_paragraph', $pp_default_after_paragraph ); add_option( 'privacy_policy_contact', $pp_default_contact ); add_option( 'privacy_policy_title', $pp_default_title ); add_option( 'privacy_policy_slug', $pp_default_slug ); add_option( 'privacy_policy_pp_help', $pp_default_pp_help ); add_option( 'privacy_policy_browser_help', $pp_default_browser_help ); add_option( 'privacy_policy_credit', $pp_default_credit ); function privacy_policy_options_setup() { if( function_exists( 'add_options_page' ) ){ add_options_page( 'Adsense Privacy Policy', 'Adsense Privacy Policy', 8, basename(__FILE__), 'privacy_policy_options_page'); } } function privacy_policy_options_page(){ global $privacy_policy_ver; global $pp_default_sitename; global $pp_default_before_heading; global $pp_default_after_heading; global $pp_default_before_paragraph; global $pp_default_after_paragraph; global $pp_default_contact; global $pp_default_title; global $pp_default_slug; global $pp_default_pp_help; global $pp_default_browser_help; global $pp_default_credit; if( isset( $_POST[ 'set_defaults' ] ) ){ echo '

'; update_option( 'privacy_policy_sitename', $pp_default_sitename ); update_option( 'privacy_policy_before_heading', $pp_default_before_heading ); update_option( 'privacy_policy_after_heading', $pp_default_after_heading ); update_option( 'privacy_policy_before_paragraph', $pp_default_before_paragraph ); update_option( 'privacy_policy_after_paragraph', $pp_default_after_paragraph ); update_option( 'privacy_policy_contact', $pp_default_contact ); update_option( 'privacy_policy_title', $pp_default_title ); update_option( 'privacy_policy_slug', $pp_default_slug ); update_option( 'privacy_policy_pp_help', $pp_default_pp_help ); update_option( 'privacy_policy_browser_help', $pp_default_browser_help ); update_option( 'privacy_policy_credit', $pp_default_credit ); echo 'Default Privacy Policy options loaded!'; echo '

'; } else if( isset( $_POST[ 'create_page' ] ) ){ echo '

'; $title = stripslashes( (string) $_POST[ 'privacy_policy_title' ] ); $slug = stripslashes( (string) $_POST[ 'privacy_policy_slug' ] ); update_option( 'privacy_policy_title', $title ); update_option( 'privacy_policy_slug', $slug ); $post_title = $title; $post_content = ''; $post_status = 'publish'; $post_author = 1; $post_name = $slug; $post_type = 'page'; $post_data = compact( 'post_title', 'post_content', 'post_status', 'post_author', 'post_name', 'post_type' ); $postID = wp_insert_post( $post_data ); if( !$postID ){ echo 'Privacy policy page could not be created'; } else { echo 'Privacy policy page (ID ' . $postID . ') was created'; } echo '

'; } else if( isset( $_POST[ 'info_update' ] ) ){ echo '

'; update_option( 'privacy_policy_sitename', stripslashes( (string) $_POST['privacy_policy_sitename' ] )); update_option( 'privacy_policy_before_heading', stripslashes( (string) $_POST['privacy_policy_before_heading' ] )); update_option( 'privacy_policy_after_heading', stripslashes( (string) $_POST['privacy_policy_after_heading' ] )); update_option( 'privacy_policy_before_paragraph', stripslashes( (string) $_POST['privacy_policy_before_paragraph' ] )); update_option( 'privacy_policy_after_paragraph', stripslashes( (string) $_POST['privacy_policy_after_paragraph' ] )); update_option( 'privacy_policy_contact', stripslashes( (string) $_POST['privacy_policy_contact' ] )); update_option( 'privacy_policy_title', stripslashes( (string) $_POST['privacy_policy_title' ] )); update_option( 'privacy_policy_slug', stripslashes( (string) $_POST['privacy_policy_slug' ] )); update_option( 'privacy_policy_pp_help', (bool) $_POST['privacy_policy_pp_help'] ); update_option( 'privacy_policy_browser_help', (bool) $_POST['privacy_policy_browser_help'] ); update_option( 'privacy_policy_credit', (bool) $_POST['privacy_policy_credit'] ); echo 'Configuration updated!'; echo '

'; } ?>

AdSense Privacy Policy

The AdSense Privacy Policy Plugin for WordPress automatically generates a privacy policy for your blog that is compliant with the AdSense terms and conditions. The policy is also general enough to be used even if you're not displaying AdSense ads.

To use the plugin, insert the trigger text <!-- privacy-policy --> into an existing page. The trigger will be automatically replaced with a complete privacy policy.

For your convenience, the plugin can also create a new privacy page for you. Simply fill in the title and slug (path) details and press the "Create Page" button to create the privacy page. The trigger text will be added automatically to the new page.

">
Details
Site Name
Contact
Formatting
Heading (before) Heading (after)
Paragraph (before) Paragraph (after)
Options
Page Creation
Page Title
Page Slug
"; // Quickly leave if nothing to replace if( strpos( $content, $tag ) == false ) return $content; // Otherwise generate the privacy policy and sub it in return str_replace( $tag, privacy_policy_html(), $content ); } function privacy_policy_html(){ $sitename = get_option( 'privacy_policy_sitename' ); $beginheading = get_option( 'privacy_policy_before_heading' ); $endheading = get_option( 'privacy_policy_after_heading' ); $beginpara = get_option( 'privacy_policy_before_paragraph' ); $endpara = get_option( 'privacy_policy_after_paragraph' ); $contact = get_option( 'privacy_policy_contact' ); $link_pp_help = get_option( 'privacy_policy_pp_help' ); $link_browser_help = get_option( 'privacy_policy_browser_help' ); $link_credit = get_option( 'privacy_policy_credit' ); $pp = $beginpara . "$sitename takes your privacy seriously. This " . 'privacy policy describes what personal information we collect and ' . 'how we use it.' . ( $link_pp_help ? ' See this privacy policy primer to learn more about privacy policies in general.' : '' ) . $endpara . "\n" . $beginheading . 'Routine Information Collection' . $endheading . "\n" . $beginpara . 'All web servers track basic information about their ' . 'visitors. This information includes, but is not limited to, IP ' . 'addresses, browser details, timestamps and referring ' . 'pages. None of this information can personally identify specific ' . 'visitors to this site. The information is tracked for routine ' . 'administration and maintenance purposes.' . $endpara . "\n" . $beginheading . 'Cookies and Web Beacons' . $endheading . "\n" . $beginpara . "Where necessary, $sitename uses cookies to store " . 'information about a visitor\'s preferences and history in order ' . 'to better serve the visitor and/or present the visitor with ' . 'customized content.' . $endpara . "\n" . $beginpara . 'Advertising partners and other third parties may also use ' . 'cookies, scripts and/or web beacons to track visitors to our site ' . 'in order to display advertisements and other useful information. ' . 'Such tracking is done directly by the third parties through their ' . 'own servers and is subject to their own privacy policies. ' . $endpara . "\n" . $beginheading . 'Controlling Your Privacy' . $endheading . "\n" . $beginpara . 'Note that you can change your browser settings to disable ' . 'cookies if you have privacy concerns. Disabling cookies for ' . 'all sites is not recommended as it may interfere with your ' . 'use of some sites. The best option is to disable or enable ' . 'cookies on a per-site basis. Consult your browser documentation ' . 'for instructions on how to block cookies and other tracking ' . 'mechanisms.' . ( $link_browser_help ? ' This list of web browser privacy management links may also be useful.' : '' ) . $endpara . "\n" . $beginheading . 'Special Note About Google Advertising' . $endheading . "\n" . $beginpara . 'Any advertisements served by Google, Inc., and affiliated companies may be controlled using cookies. ' . 'These cookies allow Google to display ads based on your visits to ' . 'this site and other sites that use Google advertising services. ' . 'Learn how to opt out of Google\'s cookie usage. ' . 'As mentioned above, any tracking done by Google through cookies and other ' . 'mechanisms is subject to Google\'s own privacy policies. ' . $endpara . "\n" . $beginheading . 'Contact Information' . $endheading . "\n" . $beginpara . 'Concerns or questions about this privacy policy can be ' . "directed to $contact for further clarification." . $endpara . "\n" ; if( $link_credit ){ $pp .= $beginpara . 'This privacy policy was generated by the ' . 'Privacy' . ' Policy for WordPress plugin.' . $endpara . "\n"; } return $pp; } add_filter('the_content', 'privacy_policy_process'); add_action('admin_menu', 'privacy_policy_options_setup'); ?>