first commit
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @author OnTheGo Systems
|
||||
*/
|
||||
class WPML_Core_Privacy_Content extends WPML_Privacy_Content {
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
protected function get_plugin_name() {
|
||||
return 'WPML';
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string|array
|
||||
*/
|
||||
protected function get_privacy_policy() {
|
||||
return array(
|
||||
__( 'WPML uses cookies to identify the visitor’s current language, the last visited language and the language of users who have logged in.', 'sitepress' ),
|
||||
__( 'While you use the plugin, WPML will share data regarding the site through Installer. No data from the user itself will be shared.', 'sitepress' ),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @author OnTheGo Systems
|
||||
*/
|
||||
class WPML_Privacy_Content_Factory implements IWPML_Backend_Action_Loader {
|
||||
/**
|
||||
* @return IWPML_Action
|
||||
*/
|
||||
public function create() {
|
||||
return new WPML_Core_Privacy_Content();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @author OnTheGo Systems
|
||||
*/
|
||||
abstract class WPML_Privacy_Content implements IWPML_Action {
|
||||
|
||||
public function add_hooks() {
|
||||
add_action( 'admin_init', array( $this, 'privacy_policy' ) );
|
||||
}
|
||||
|
||||
public function privacy_policy() {
|
||||
if ( ! function_exists( 'wp_add_privacy_policy_content' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$policy_text_content = $this->get_privacy_policy();
|
||||
if ( $policy_text_content ) {
|
||||
if ( is_array( $policy_text_content ) ) {
|
||||
$policy_text_content = '<p>' . implode( '</p><p>', $policy_text_content ) . '</p>';
|
||||
}
|
||||
wp_add_privacy_policy_content( $this->get_plugin_name(), $policy_text_content );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
abstract protected function get_plugin_name();
|
||||
|
||||
/**
|
||||
* @return string|array a single or an array of strings (plain text or HTML). Array items will be wrapped by a paragraph tag.
|
||||
*/
|
||||
abstract protected function get_privacy_policy();
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @author OnTheGo Systems
|
||||
*/
|
||||
class WPML_TM_Privacy_Content_Factory implements IWPML_Backend_Action_Loader {
|
||||
|
||||
/**
|
||||
* @return IWPML_Action
|
||||
*/
|
||||
public function create() {
|
||||
if ( class_exists( 'WPML_Privacy_Content' ) ) {
|
||||
return new WPML_TM_Privacy_Content();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @author OnTheGo Systems
|
||||
*/
|
||||
class WPML_TM_Privacy_Content extends WPML_Privacy_Content {
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
protected function get_plugin_name() {
|
||||
return 'WPML Translation Management';
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string|array
|
||||
*/
|
||||
protected function get_privacy_policy() {
|
||||
return __( 'WPML Translation Management will send the email address and name of each manager and assigned translator as well as the content itself to Advanced Translation Editor and to the translation services which are used.', 'wpml-translation-management' );
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user