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
class-hustle-tutorials-page.php
59 lines
| 1 | <?php |
| 2 | /** |
| 3 | * File for Hustle_Admin_Page_Abstract class. |
| 4 | * |
| 5 | * @package Hustle |
| 6 | * @since 4.4.6 |
| 7 | */ |
| 8 | |
| 9 | /** |
| 10 | * Class Hustle_Tutorials_Page |
| 11 | * |
| 12 | * @since 4.4.6 |
| 13 | */ |
| 14 | class Hustle_Tutorials_Page extends Hustle_Admin_Page_Abstract { |
| 15 | |
| 16 | /** |
| 17 | * Initiates the page's properties |
| 18 | * |
| 19 | * @since 4.4.6 |
| 20 | */ |
| 21 | public function init() { |
| 22 | |
| 23 | $this->page = 'hustle_tutorials'; |
| 24 | |
| 25 | $this->page_title = __( 'Tutorials', 'hustle' ); |
| 26 | |
| 27 | $this->page_menu_title = __( 'Tutorials', 'hustle' ); |
| 28 | |
| 29 | $this->page_capability = 'hustle_menu'; |
| 30 | |
| 31 | $this->page_template_path = 'admin/tutorials'; |
| 32 | |
| 33 | add_action( 'wp_ajax_hustle_hide_tutorials', array( $this, 'hide_tutorials' ) ); |
| 34 | } |
| 35 | |
| 36 | /** |
| 37 | * Hide tutorials. |
| 38 | */ |
| 39 | public function hide_tutorials() { |
| 40 | check_ajax_referer( 'hustle_dismiss_notification' ); |
| 41 | |
| 42 | update_option( 'hustle-hide_tutorials', true ); |
| 43 | |
| 44 | wp_send_json_success(); |
| 45 | } |
| 46 | |
| 47 | |
| 48 | /** |
| 49 | * Get the arguments used when rendering the main page. |
| 50 | * |
| 51 | * @since 4.4.6 |
| 52 | * @return array |
| 53 | */ |
| 54 | public function get_page_template_args() { |
| 55 | return array(); |
| 56 | } |
| 57 | |
| 58 | } |
| 59 |