PluginProbe
Datafeedr API / 1.1.2
Datafeedr API v1.1.2
1.4.2 1.0.125 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.19 1.0.2 1.0.20 1.0.21 1.0.22 1.0.23 1.0.24 1.0.25 1.0.26 1.0.27 1.0.28 1.0.29 1.0.3 1.0.30 1.0.31 1.0.32 1.0.33 All 181 releases
datafeedr-api / classes / class-dfrapi-help.php

class-dfrapi-help.php in Datafeedr API 1.1.2, at classes/class-dfrapi-help.php

56 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
5 if ( ! class_exists( 'Dfrapi_Admin_Help' ) ) :
6
7 /**
8 * Dfrapi_Admin_Help Class
9 */
10 class Dfrapi_Admin_Help {
11
12 /**
13 * Hook in tabs.
14 */
15 public function __construct() {
16 add_action( "current_screen", array( $this, 'add_tabs' ), 50 );
17 }
18
19 /**
20 * Add help tabs
21 */
22 public function add_tabs() {
23
24 $screen = get_current_screen();
25
26 /*
27 [id] => toplevel_page_dfrapi
28 [id] => datafeedr-api_page_dfrapi_networks
29 [id] => datafeedr-api_page_dfrapi_merchants
30 [id] => datafeedr-api_page_dfrapi_tools
31 [id] => datafeedr-api_page_dfrapi_export
32 [id] => datafeedr-api_page_dfrapi_import
33 [id] => datafeedr-api_page_dfrapi_account
34 */
35 $possible_screens = array(
36 'toplevel_page_dfrapi',
37 'datafeedr-api_page_dfrapi_networks',
38 'datafeedr-api_page_dfrapi_merchants',
39 'datafeedr-api_page_dfrapi_tools',
40 'datafeedr-api_page_dfrapi_export',
41 'datafeedr-api_page_dfrapi_import',
42 'datafeedr-api_page_dfrapi_account',
43 );
44
45 if ( ! in_array( $screen->id, $possible_screens ) ) { return; }
46
47 // The following tabs appear on ALL screens.
48 dfrapi_help_tab( $screen );
49
50
51 }
52 }
53
54 endif;
55
56 return new Dfrapi_Admin_Help();