yit-privacy-plugin-abstract.php
29 lines
| 1 | <?php |
| 2 | !defined( 'ABSPATH' ) && exit; // Exit if accessed directly |
| 3 | |
| 4 | if ( !class_exists( 'YITH_Privacy_Plugin_Abstract' ) ) { |
| 5 | class YITH_Privacy_Plugin_Abstract { |
| 6 | private $_name; |
| 7 | |
| 8 | public function __construct( $name ) { |
| 9 | $this->_name = $name; |
| 10 | $this->init(); |
| 11 | } |
| 12 | |
| 13 | protected function init() { |
| 14 | add_filter( 'yith_plugin_fw_privacy_guide_content', array( $this, 'add_message_in_section' ), 10, 2 ); |
| 15 | } |
| 16 | |
| 17 | public function add_message_in_section( $html, $section ) { |
| 18 | if ( $message = $this->get_privacy_message( $section ) ) { |
| 19 | $html .= "<p class='privacy-policy-tutorial'><strong>{$this->_name}</strong></p>"; |
| 20 | $html .= $message; |
| 21 | } |
| 22 | return $html; |
| 23 | } |
| 24 | |
| 25 | public function get_privacy_message( $section ) { |
| 26 | return ''; |
| 27 | } |
| 28 | } |
| 29 | } |