1 <?php
 2 /**
 3  * Add some content to the help tab.
 4  *
 5  * @author      WooThemes
 6  * @category    Admin
 7  * @package     WooCommerce/Admin
 8  * @version     2.1.0
 9  */
10 
11 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
12 
13 if ( ! class_exists( 'WC_Admin_Help' ) ) :
14 
15 /**
16  * WC_Admin_Help Class
17  */
18 class WC_Admin_Help {
19 
20     /**
21      * Hook in tabs.
22      */
23     public function __construct() {
24         add_action( "current_screen", array( $this, 'add_tabs' ), 50 );
25     }
26 
27     /**
28      * Add help tabs
29      */
30     public function add_tabs() {
31         $screen = get_current_screen();
32 
33         if ( ! in_array( $screen->id, wc_get_screen_ids() ) )
34             return;
35 
36         $screen->add_help_tab( array(
37             'id'    => 'woocommerce_docs_tab',
38             'title' => __( 'Documentation', 'woocommerce' ),
39             'content'   =>
40 
41                 '<p>' . __( 'Thank you for using WooCommerce :) Should you need help using or extending WooCommerce please read the documentation.', 'woocommerce' ) . '</p>' .
42 
43                 '<p><a href="' . 'http://docs.woothemes.com/documentation/plugins/woocommerce/' . '" class="button button-primary">' . __( 'WooCommerce Documentation', 'woocommerce' ) . '</a> <a href="' . 'http://docs.woothemes.com/wc-apidocs/' . '" class="button">' . __( 'Developer API Docs', 'woocommerce' ) . '</a></p>'
44 
45         ) );
46 
47         $screen->add_help_tab( array(
48             'id'    => 'woocommerce_support_tab',
49             'title' => __( 'Support', 'woocommerce' ),
50             'content'   =>
51 
52                 '<p>' . sprintf(__( 'After <a href="%s">reading the documentation</a>, for further assistance you can use the <a href="%s">community forum</a>, or if you have access as a WooThemes customer, <a href="%s">our support desk</a>.', 'woocommerce' ), 'http://docs.woothemes.com/documentation/plugins/woocommerce/', 'http://wordpress.org/support/plugin/woocommerce', 'http://support.woothemes.com' ) . '</p>' .
53 
54                 '<p>' . __( 'Before asking for help we recommend checking the status page to identify any problems with your configuration.', 'woocommerce' ) . '</p>' .
55 
56                 '<p><a href="' . admin_url('admin.php?page=wc-status') . '" class="button button-primary">' . __( 'System Status', 'woocommerce' ) . '</a> <a href="' . 'http://wordpress.org/support/plugin/woocommerce' . '" class="button">' . __( 'Community Support', 'woocommerce' ) . '</a> <a href="' . 'http://support.woothemes.com' . '" class="button">' . __( 'Customer Support', 'woocommerce' ) . '</a></p>'
57 
58         ) );
59 
60         $screen->add_help_tab( array(
61             'id'    => 'woocommerce_bugs_tab',
62             'title' => __( 'Found a bug?', 'woocommerce' ),
63             'content'   =>
64 
65                 '<p>' . sprintf(__( 'If you find a bug within WooCommerce core you can create a ticket via <a href="%s">Github issues</a>. Ensure you read the <a href="%s">contribution guide</a> prior to submitting your report. Be as descriptive as possible and please include your <a href="%s">system status report</a>.', 'woocommerce' ), 'https://github.com/woothemes/woocommerce/issues?state=open', 'https://github.com/woothemes/woocommerce/blob/master/CONTRIBUTING.md', admin_url( 'admin.php?page=wc-status' ) ) . '</p>' .
66 
67                 '<p><a href="https://github.com/woothemes/woocommerce/issues?state=open" class="button button-primary">' . __( 'Report a bug', 'woocommerce' ) . '</a> <a href="' . admin_url('admin.php?page=wc-status') . '" class="button">' . __( 'System Status', 'woocommerce' ) . '</a></p>'
68 
69         ) );
70 
71 
72         $screen->set_help_sidebar(
73             '<p><strong>' . __( 'For more information:', 'woocommerce' ) . '</strong></p>' .
74             '<p><a href="http://www.woothemes.com/woocommerce/" target="_blank">' . __( 'About WooCommerce', 'woocommerce' ) . '</a></p>' .
75             '<p><a href="http://wordpress.org/extend/plugins/woocommerce/" target="_blank">' . __( 'Project on WordPress.org', 'woocommerce' ) . '</a></p>' .
76             '<p><a href="https://github.com/woothemes/woocommerce" target="_blank">' . __( 'Project on Github', 'woocommerce' ) . '</a></p>' .
77             '<p><a href="http://www.woothemes.com/product-category/woocommerce-extensions/" target="_blank">' . __( 'Official Extensions', 'woocommerce' ) . '</a></p>' .
78             '<p><a href="http://www.woothemes.com/product-category/themes/woocommerce/" target="_blank">' . __( 'Official Themes', 'woocommerce' ) . '</a></p>'
79         );
80     }
81 
82 }
83 
84 endif;
85 
86 return new WC_Admin_Help();
WooCommerce API documentation generated by ApiGen 2.8.0