get_screen_ids(); if ( ! $screen || ! in_array( $screen->id, $screen_ids) ) { return; } $screen->add_help_tab( array( 'id' => 'uwp_help_support_tab', 'title' => __( 'Help & Support', 'userswp' ), 'content' => $this->get_support_tab_content() ) ); $screen->add_help_tab( array( 'id' => 'uwp_help_bugs_tab', 'title' => __( 'Found a bug?', 'userswp' ), 'content' => $this->get_bugs_tab_content() ) ); $screen->add_help_tab( array( 'id' => 'uwp_help_onboard_tab', 'title' => __( 'Setup wizard', 'userswp' ), 'content' => $this->get_onboard_tab_content() ) ); $screen->set_help_sidebar( $this->get_help_tab_sidebar_content()); $section = !empty( $_GET['section'] ) ? '_'.esc_attr($_GET['section']) : ''; do_action( 'uwp_adds_help_screen_tabs'.$section,$screen ); } public function get_support_tab_content() { $support_html = "
".sprintf(__('Should you need help understanding, using, or extending UsersWP please read our documentation. You will find all kinds of resources including snippets, tutorials and much more.,','userswp'),'https://userswp.io/documentation/?utm_source=setupwizard&utm_medium=product&utm_content=getting-started&utm_campaign=userswpplugin')."
"; $support_html .= "".sprintf(__('For further assistance with UsersWP core or with premium extensions sold by UsersWP you can use our support forums.','userswp'),'https://userswp.io/support/?utm_source=setupwizard&utm_medium=product&utm_content=docs&utm_campaign=userswpplugin')."
"; $support_html .= "".__('Before asking for help we recommend checking the system status page to identify any problems with your configuration.','userswp')."
"; $support_html .= "".__( 'System status', 'userswp' )." ".__( 'UsersWP support', 'userswp' )."
"; return apply_filters('uwp_support_help_tab_content',$support_html); } public function get_bugs_tab_content() { $bugs_html = "".sprintf(__('If you find a bug within UsersWP core you can create a ticket via Github issues. Ensure you read the contribution guide prior to submitting your report. To help us solve your issue, please be as descriptive as possible and include your system status report','userswp'),'https://github.com/UsersWP/userswp/issues?state=open','https://github.com/UsersWP/userswp/blob/master/CONTRIBUTING.md',admin_url( 'admin.php?page=uwp_status' ))."
"; $bugs_html .= "". __( 'Report a bug', 'userswp' ) ." ".__( 'System status', 'userswp' )."
"; return apply_filters('uwp_bugs_help_tab_content',$bugs_html); } public function get_onboard_tab_content() { $onboard_html = "".__('If you need to access the setup wizard again, please click on the button below.','userswp')."
"; $onboard_html .= "".__('Running the wizard again will not delete your current settings. You will have the option to change any current settings.','userswp')."
"; $onboard_html .= "".__('Setup wizard','userswp')."
"; return apply_filters('uwp_setup_wizard_help_tab_content',$onboard_html); } public function get_help_tab_sidebar_content() { $sidebar_html = '' . __( 'For more information:', 'userswp' ) . '
'; $sidebar_html .= ''.__('About UsersWP','userswp').'
'; $sidebar_html .= ''.__('WordPress.org project','userswp').'
'; $sidebar_html .= ''; $sidebar_html .= ''; return apply_filters('uwp_sidebar_help_tab_content',$sidebar_html); } } new UsersWP_Admin_Help(); }