commons
6 years ago
dashboard
6 years ago
dialogs
6 years ago
email-lists
6 years ago
embedded
6 years ago
footer
6 years ago
integrations
6 years ago
integrations-page
6 years ago
notices
6 years ago
popup
6 years ago
settings
6 years ago
slidein
6 years ago
sshare
6 years ago
dashboard.php
6 years ago
entries.php
6 years ago
integrations.php
6 years ago
new-optin_success.php
6 years ago
new-social-group.php
6 years ago
settings.php
6 years ago
settings.php
140 lines
| 1 | <?php |
| 2 | /** |
| 3 | * @var Opt_In $this |
| 4 | */ |
| 5 | |
| 6 | $sections = array( |
| 7 | 'analytics' => array( |
| 8 | 'label' => __( 'Dashboard Analytics', 'wordpress-popup' ), |
| 9 | 'status' => 'hide', |
| 10 | 'data' => array( |
| 11 | 'settings' => isset( $hustle_settings['analytics'] ) ? $hustle_settings['analytics'] : array(), |
| 12 | ), |
| 13 | ), |
| 14 | 'emails' => array( |
| 15 | 'label' => __( 'Emails', 'wordpress-popup' ), |
| 16 | 'status' => 'show', |
| 17 | 'data' => array( |
| 18 | 'settings' => isset( $hustle_settings['emails'] ) ? $hustle_settings['emails'] : array(), |
| 19 | ), |
| 20 | ), |
| 21 | 'privacy' => array( |
| 22 | 'label' => __( 'Viewer\'s Privacy', 'wordpress-popup' ), |
| 23 | 'status' => 'show', |
| 24 | 'data' => array( |
| 25 | 'settings' => isset( $hustle_settings['privacy'] ) ? $hustle_settings['privacy'] : array(), |
| 26 | ), |
| 27 | ), |
| 28 | 'permissions' => array( |
| 29 | 'label' => __( 'Permissions', 'wordpress-popup' ), |
| 30 | 'status' => 'hide', |
| 31 | 'data' => array( |
| 32 | 'filter' => $filter, |
| 33 | 'modules' => $modules, |
| 34 | 'modules_count' => $modules_count, |
| 35 | 'modules_limit' => $modules_limit, |
| 36 | 'modules_page' => $modules_page, |
| 37 | 'modules_show_pager' => $modules_show_pager, |
| 38 | 'modules_edit_roles' => $modules_edit_roles, |
| 39 | 'hustle_settings' => $hustle_settings, |
| 40 | 'roles' => Opt_In_Utils::get_user_roles(), |
| 41 | ), |
| 42 | ), |
| 43 | 'recaptcha' => array( |
| 44 | 'label' => __( 'reCAPTCHA', 'wordpress-popup' ), |
| 45 | 'status' => 'show', |
| 46 | 'data' => array( |
| 47 | 'settings' => isset( $hustle_settings['recaptcha'] ) ? $hustle_settings['recaptcha'] : array(), |
| 48 | ), |
| 49 | ), |
| 50 | 'accessibility' => array( |
| 51 | 'label' => __( 'Accessibility', 'wordpress-popup' ), |
| 52 | 'status' => 'show', |
| 53 | 'data' => array( |
| 54 | 'settings' => isset( $hustle_settings['accessibility'] ) ? $hustle_settings['accessibility'] : array(), |
| 55 | ), |
| 56 | ), |
| 57 | 'metrics' => array( |
| 58 | 'label' => __( 'Top Metrics', 'wordpress-popup' ), |
| 59 | 'status' => 'hide', |
| 60 | 'data' => array( |
| 61 | 'hustle_settings' => $hustle_settings, |
| 62 | ), |
| 63 | ), |
| 64 | 'unsubscribe' => array( |
| 65 | 'label' => __( 'Unsubscribe', 'wordpress-popup' ), |
| 66 | 'status' => 'show', |
| 67 | 'data' => array( |
| 68 | 'messages' => $unsubscription_messages, |
| 69 | 'email' => $unsubscription_email, |
| 70 | ), |
| 71 | ), |
| 72 | ); |
| 73 | |
| 74 | |
| 75 | ?> |
| 76 | <main class="<?php echo implode( ' ', apply_filters( 'hustle_sui_wrap_class', null ) ); ?>"> |
| 77 | <div class="sui-header"> |
| 78 | <h1 class="sui-header-title"><?php esc_html_e( 'Settings', 'wordpress-popup' ); ?></h1> |
| 79 | <?php $this->render( 'admin/commons/view-documentation' ); ?> |
| 80 | </div> |
| 81 | <div class="sui-row-with-sidenav"> |
| 82 | <div class="sui-sidenav"> |
| 83 | <ul class="sui-vertical-tabs sui-sidenav-hide-md"> |
| 84 | <?php |
| 85 | foreach ( $sections as $key => $value ) { |
| 86 | if ( 'hide' === $value['status'] ) { |
| 87 | continue; |
| 88 | } |
| 89 | $classes = array( |
| 90 | 'sui-vertical-tab', |
| 91 | ); |
| 92 | if ( $section === $key ) { |
| 93 | $classes[] = 'current'; |
| 94 | } |
| 95 | printf( |
| 96 | '<li class="%s"><a href="#" data-tab="%s">%s</a></li>', |
| 97 | esc_attr( implode( ' ', $classes ) ), |
| 98 | esc_attr( $key ), |
| 99 | esc_html( $value['label'] ) |
| 100 | ); |
| 101 | } |
| 102 | ?> |
| 103 | </ul> |
| 104 | </div> |
| 105 | <?php |
| 106 | foreach ( $sections as $key => $value ) { |
| 107 | if ( 'hide' === $value['status'] ) { |
| 108 | continue; |
| 109 | } |
| 110 | $data = isset( $value['data'] )? $value['data']:array(); |
| 111 | $data['section'] = $section; |
| 112 | $template = sprintf( 'admin/settings/tab-%s', esc_attr( $key ) ); |
| 113 | $this->render( $template, $data ); |
| 114 | } |
| 115 | ?> |
| 116 | </div> |
| 117 | |
| 118 | <?php |
| 119 | // Global Footer |
| 120 | $this->render( 'admin/footer/footer' ); ?> |
| 121 | |
| 122 | <?php |
| 123 | // DIALOG: Delete All IPs |
| 124 | $this->render( 'admin/settings/privacy/remove-ips-dialog', array() ); ?> |
| 125 | |
| 126 | <?php |
| 127 | // NOTICE: Delete All IPs |
| 128 | $this->render( 'admin/notices/notice-delete-all-ips', array() ); |
| 129 | // NOTICE: Delete selected IPs |
| 130 | $this->render( 'admin/notices/notice-delete-ips', array() ); |
| 131 | |
| 132 | // DIALOG: Dissmiss migrate tracking notice modal confirmation. |
| 133 | if ( Hustle_Module_Admin::is_show_migrate_tracking_notice() ) { |
| 134 | $this->render( 'admin/dashboard/dialogs/migrate-dismiss-confirmation' ); |
| 135 | } |
| 136 | |
| 137 | ?> |
| 138 | |
| 139 | </main> |
| 140 |