PluginProbe ʕ •ᴥ•ʔ
Hustle – Email Marketing, Lead Generation, Optins, Popups / 7.3.7
Hustle – Email Marketing, Lead Generation, Optins, Popups v7.3.7
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 4.7.1.1 4.8.0.0 5.0.0 5.0.1 5.0.1.1 5.0.1.2 5.1 5.1.1 5.1.2 5.1.3 5.1.3.1 5.1.3.2 5.1.4 5.1.5 6.0 6.0.1 6.0.2 6.0.3 6.0.4.2 6.0.5 6.0.6.1 6.0.7 6.0.8.1 6.0.9 7.0.0.1 7.0.2 7.0.3 7.0.4 7.1.0 7.1.1 7.2.0 7.2.1 7.3.0 7.3.1 7.3.3 7.3.5 7.3.6 7.3.7 7.4.0 7.4.1 7.4.11 7.4.13 7.4.13.1 7.4.2 7.4.3 7.4.4 7.4.5 7.4.5.1 7.4.5.2 7.4.6 7.4.7 7.5.0 7.6.0 7.6.1 7.6.3 7.6.4 7.6.6 7.7.0 7.7.1 7.8.0 7.8.1 7.8.10 7.8.10.1 7.8.10.2 7.8.11 7.8.12 7.8.12.1 7.8.2 7.8.3 7.8.4 7.8.5 7.8.6 7.8.7 7.8.8 7.8.9 7.8.9.1 7.8.9.2 7.8.9.3
wordpress-popup / inc / hustle-sshare-admin.php
wordpress-popup / inc Last commit date
display-conditions 5 years ago front 5 years ago helpers 5 years ago metas 5 years ago palettes 5 years ago provider 5 years ago providers 5 years ago templates 5 years ago update 5 years ago class-hustle-admin-page-abstract.php 5 years ago class-hustle-condition-factory.php 6 years ago class-hustle-dashboard-admin.php 5 years ago class-hustle-data.php 5 years ago class-hustle-db.php 6 years ago class-hustle-module-admin.php 5 years ago class-hustle-module-collection.php 5 years ago class-hustle-module-decorator.php 5 years ago class-hustle-module-page-abstract.php 5 years ago class-hustle-notifications.php 5 years ago class-hustle-settings-admin.php 5 years ago class-hustle-upsell-page.php 5 years ago class-hustle-wp-dashboard-page.php 5 years ago hustle-collection.php 6 years ago hustle-deletion.php 5 years ago hustle-embedded-admin.php 6 years ago hustle-entries-admin.php 5 years ago hustle-entry-model.php 5 years ago hustle-general-data-protection.php 6 years ago hustle-init.php 5 years ago hustle-mail.php 5 years ago hustle-meta.php 5 years ago hustle-migration.php 5 years ago hustle-model.php 5 years ago hustle-module-model.php 5 years ago hustle-module-widget-legacy.php 5 years ago hustle-module-widget.php 5 years ago hustle-modules-common-admin-ajax.php 5 years ago hustle-popup-admin.php 6 years ago hustle-providers-admin.php 5 years ago hustle-providers.php 6 years ago hustle-settings-admin-ajax.php 5 years ago hustle-settings-page.php 5 years ago hustle-slidein-admin.php 6 years ago hustle-sshare-admin.php 5 years ago hustle-sshare-model.php 5 years ago hustle-tracking-model.php 5 years ago opt-in-geo.php 5 years ago opt-in-utils.php 5 years ago opt-in-wpmudev-api.php 6 years ago
hustle-sshare-admin.php
80 lines
1 <?php
2
3 if ( ! class_exists( 'Hustle_SShare_Admin' ) ) :
4
5 class Hustle_SShare_Admin extends Hustle_Module_Page_Abstract {
6
7 protected function set_page_properties() {
8
9 $this->module_type = Hustle_Module_Model::SOCIAL_SHARING_MODULE;
10
11 $this->page_title = Opt_In_Utils::get_module_type_display_name( $this->module_type, false, true );
12
13 $this->page_template_path = '/admin/sshare/listing';
14 $this->page_edit_template_path = '/admin/sshare/wizard';
15 }
16
17 /**
18 * Gets the JS variables to be localized in Wizard for Social Sharing modules.
19 *
20 * @since 4.3.0
21 *
22 * @return array
23 */
24 protected function get_wizard_js_variables_to_localize() {
25 $variables = array(
26 'social_platforms' => Hustle_SShare_Model::get_social_platform_names(),
27 'social_platforms_with_endpoints' => Hustle_SShare_Model::get_sharing_endpoints(),
28 'social_platforms_with_api' => Hustle_SShare_Model::get_networks_counter_endpoint(),
29 'social_platforms_data' => array(
30 'email_message_default' => __( "I've found an excellent article on {post_url} which may interest you.", 'hustle' ),
31 ),
32 'palettes' => array(
33 'sshare_defaults' => $this->module->get_design()->defaults,
34 ),
35 );
36 return $variables;
37 }
38
39 /**
40 * Get the args for the wizard page.
41 *
42 * @since 4.0.1
43 * @return array
44 */
45 protected function get_page_edit_template_args() {
46 return array(
47 'section' => $this->get_current_section( 'services' ),
48 'module_id' => $this->module->module_id,
49 'module' => $this->module,
50 'is_active' => (bool) $this->module->active,
51 );
52 }
53
54 /**
55 * Loads preview styles used only by the Ssharing wizard.
56 *
57 * @since 4.3.1
58 */
59 protected function on_listing_and_wizard_actions() {
60 parent::on_listing_and_wizard_actions();
61
62 // Load preview scripts used only by ssharing wizard.
63 if ( $this->page_edit === $this->current_page ) {
64 add_action( 'admin_print_styles', array( $this, 'print_preview_styles' ) );
65 }
66 }
67
68 /**
69 * Prints the styles for Ssharing inline modules.
70 *
71 * @since 4.3.1
72 */
73 public function print_preview_styles() {
74 $module_types = array( Hustle_Module_Model::SOCIAL_SHARING_MODULE, Hustle_SShare_Model::INLINE_MODULE );
75 Hustle_Module_Front::print_front_styles( $module_types );
76 }
77 }
78
79 endif;
80