PluginProbe
Hustle – Email Marketing, Lead Generation, Optins, Popups / 7.8.14.2
Hustle – Email Marketing, Lead Generation, Optins, Popups v7.8.14.2
7.8.14.2 7.8.14 7.8.14.1 7.8.13 7.8.13.1 trunk 3.0 3.1 3.1.1 3.1.2 3.1.3 3.1.4 4.3.2 4.4.4 4.4.5 4.4.5.1 4.4.5.4 4.6 4.6.1.1 4.6.1.4 4.7.0.2 4.7.0.3 4.7.0.7 4.7.0.9 4.7.1.0 All 103 releases
wordpress-popup / inc / metas / class-hustle-meta-base-content.php
class-hustle-meta-base-content.php
63 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * File for Hustle_Meta_Base_Content class.
4 *
5 * @package Hustle
6 * @since 4.2.0
7 */
8
9 /**
10 * Hustle_Meta_Base_Content is the base class for the "content" meta of modules.
11 * This class should handle what's related to the "content" meta.
12 *
13 * @since 4.2.0
14 */
15 class Hustle_Meta_Base_Content extends Hustle_Meta {
16
17 /**
18 * Get the defaults for this meta.
19 *
20 * @since 4.0.0
21 * @return array
22 */
23 public function get_defaults() {
24 $data = array(
25 'module_name' => '',
26 'title' => '',
27 'sub_title' => '',
28 'main_content' => '',
29 'feature_image' => '',
30 'background_image' => '',
31 'show_never_see_link' => '0',
32 'never_see_link_text' => __( 'Never see this message again.', 'hustle' ),
33 'show_cta' => '0',
34 'cta_label' => '',
35 'cta_url' => '',
36 'cta_target' => 'blank',
37 'cta_two_label' => 'Close',
38 'cta_two_url' => '',
39 'cta_two_target' => 'close',
40 'cta_helper_show' => '0',
41 'cta_helper_text' => '',
42 );
43
44 if ( ! empty( $this->module->module_type ) && 'embedded' === $this->module->module_type ) {
45 $data['cta_two_label'] = '';
46 $data['cta_two_target'] = 'blank';
47 }
48
49 return $data;
50 }
51
52 /**
53 * Returns whether the module has CTA active.
54 *
55 * @since 4.3.1
56 *
57 * @return boolean
58 */
59 public function has_cta() {
60 return '1' === $this->data['show_cta'];
61 }
62 }
63