1 | <?php |
||
14 | class Yikes_Easy_MC_Comment_Checkbox_Class extends Yikes_Easy_MC_Checkbox_Integration_Class { |
||
15 | |||
16 | /** |
||
17 | * The integration type. |
||
18 | * |
||
19 | * @var string $type |
||
20 | */ |
||
21 | protected $type = 'comment_form'; |
||
22 | |||
23 | /** |
||
24 | * Constructor. |
||
25 | */ |
||
26 | public function __construct() { |
||
27 | add_action( 'comment_post', array( $this, 'subscribe_from_comment' ), 40, 3 ); |
||
28 | add_action( 'init', array( $this, 'init' ) ); |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * Allows us to filter the filter that we're adding. |
||
33 | */ |
||
34 | public function init() { |
||
45 | |||
46 | /** |
||
47 | * Outputs a checkbox, if user is not already subscribed |
||
48 | * |
||
49 | * @param string $comment_field The content of the comment textarea field. |
||
50 | */ |
||
51 | public function output_checkbox( $comment_field ) { |
||
58 | |||
59 | /** |
||
60 | * Subscribe the user if they so chose. |
||
61 | * |
||
62 | * @param int $comment_id The comment's ID. |
||
63 | * @param string $comment_approved The comment's status. |
||
64 | * @param array $comment_data The comment data. |
||
65 | */ |
||
66 | public function subscribe_from_comment( $comment_id, $comment_approved, $comment_data ) { |
||
87 | } |
||
88 | $yikes_easy_mc_comment_checkbox_class = new Yikes_Easy_MC_Comment_Checkbox_Class(); |
||
89 |