PluginProbe ʕ •ᴥ•ʔ
Hustle – Email Marketing, Lead Generation, Optins, Popups / 7.8.9
Hustle – Email Marketing, Lead Generation, Optins, Popups v7.8.9
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 3 years ago front 9 months ago helpers 9 months ago metas 3 years ago multisite 3 years ago palettes 3 years ago provider 3 years ago providers 9 months ago templates 3 years ago update 3 years ago class-hustle-admin-page-abstract.php 9 months ago class-hustle-black-friday-campaign.php 7 months ago class-hustle-condition-factory.php 6 years ago class-hustle-cross-sell.php 9 months ago class-hustle-dashboard-admin.php 3 years ago class-hustle-data.php 3 years ago class-hustle-db.php 2 years ago class-hustle-installer.php 4 years ago class-hustle-meta.php 3 years ago class-hustle-module-admin.php 9 months ago class-hustle-module-collection.php 3 years ago class-hustle-module-page-abstract.php 2 years ago class-hustle-notifications.php 3 years ago class-hustle-settings-admin.php 3 years ago class-hustle-tutorials-page.php 4 years ago class-hustle-wp-dashboard-page.php 3 years ago hustle-deletion.php 3 years ago hustle-embedded-admin.php 3 years ago hustle-entries-admin.php 3 years ago hustle-entry-model.php 3 years ago hustle-general-data-protection.php 3 years ago hustle-init.php 7 months ago hustle-mail.php 3 years ago hustle-migration.php 3 years ago hustle-model.php 3 years ago hustle-module-model.php 9 months ago hustle-module-widget-legacy.php 3 years ago hustle-module-widget.php 3 years ago hustle-modules-common-admin-ajax.php 9 months ago hustle-popup-admin.php 3 years ago hustle-providers-admin.php 3 years ago hustle-providers.php 3 years ago hustle-settings-admin-ajax.php 3 years ago hustle-settings-page.php 3 years ago hustle-slidein-admin.php 3 years ago hustle-sshare-admin.php 3 years ago hustle-sshare-model.php 3 years ago hustle-tracking-model.php 3 years ago opt-in-geo.php 9 months ago opt-in-utils.php 3 years ago opt-in-wpmudev-api.php 3 years ago
hustle-sshare-admin.php
91 lines
1 <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
2 /**
3 * Hustle_SShare_Admin
4 *
5 * @package Hustle
6 */
7
8 if ( ! class_exists( 'Hustle_SShare_Admin' ) ) :
9
10 /**
11 * Class Hustle_SShare_Admin
12 */
13 class Hustle_SShare_Admin extends Hustle_Module_Page_Abstract {
14
15 /**
16 * Set page properties
17 */
18 protected function set_page_properties() {
19
20 $this->module_type = Hustle_Module_Model::SOCIAL_SHARING_MODULE;
21
22 $this->page_title = Opt_In_Utils::get_module_type_display_name( $this->module_type, false, true );
23
24 $this->page_template_path = '/admin/sshare/listing';
25 $this->page_edit_template_path = '/admin/sshare/wizard';
26 }
27
28 /**
29 * Gets the JS variables to be localized in Wizard for Social Sharing modules.
30 *
31 * @since 4.3.0
32 *
33 * @return array
34 */
35 protected function get_wizard_js_variables_to_localize() {
36 $variables = array(
37 'social_platforms' => Hustle_SShare_Model::get_social_platform_names(),
38 'social_platforms_with_endpoints' => Hustle_SShare_Model::get_sharing_endpoints(),
39 'social_platforms_with_api' => Hustle_SShare_Model::get_networks_counter_endpoint(),
40 'social_platforms_data' => array(
41 'email_message_default' => __( "I've found an excellent article on {post_url} which may interest you.", 'hustle' ),
42 ),
43 'palettes' => array(
44 'sshare_defaults' => $this->module->get_design()->get_defaults(),
45 ),
46 );
47 return $variables;
48 }
49
50 /**
51 * Get the args for the wizard page.
52 *
53 * @since 4.0.1
54 * @return array
55 */
56 protected function get_page_edit_template_args() {
57 return array(
58 'section' => $this->get_current_section( 'services' ),
59 'module_id' => $this->module->module_id,
60 'module' => $this->module,
61 'is_active' => (bool) $this->module->active,
62 );
63 }
64
65 /**
66 * Loads preview styles used only by the Ssharing wizard.
67 *
68 * @since 4.3.1
69 */
70 protected function on_listing_and_wizard_actions() {
71 parent::on_listing_and_wizard_actions();
72
73 // Load preview scripts used only by ssharing wizard.
74 if ( $this->page_edit === $this->current_page ) {
75 add_action( 'admin_print_styles', array( $this, 'print_preview_styles' ) );
76 }
77 }
78
79 /**
80 * Prints the styles for Ssharing inline modules.
81 *
82 * @since 4.3.1
83 */
84 public function print_preview_styles() {
85 $module_types = array( Hustle_Module_Model::SOCIAL_SHARING_MODULE, Hustle_SShare_Model::INLINE_MODULE );
86 Hustle_Module_Front::print_front_styles( $module_types );
87 }
88 }
89
90 endif;
91