| 1 |
<?php |
| 2 |
|
| 3 |
// Exit if accessed directly |
| 4 |
namespace JP\CC\Admin; |
| 5 |
|
| 6 |
if ( ! defined( 'ABSPATH' ) ) { |
| 7 |
exit; |
| 8 |
} |
| 9 |
|
| 10 |
/** |
| 11 |
* Class Pages |
| 12 |
* @package JP\CC\Admin |
| 13 |
*/ |
| 14 |
class Pages { |
| 15 |
|
| 16 |
/** |
| 17 |
* |
| 18 |
*/ |
| 19 |
public static function init() { |
| 20 |
add_action( 'admin_menu', array( __CLASS__, 'register_pages' ), 999 ); |
| 21 |
} |
| 22 |
|
| 23 |
/** |
| 24 |
* Register admin options pages. |
| 25 |
*/ |
| 26 |
public static function register_pages() { |
| 27 |
global $jp_cc_settings_page; |
| 28 |
|
| 29 |
$jp_cc_settings_page = add_options_page( __( 'Content Control', 'content-control' ), __( 'Content Control', 'content-control' ), 'manage_options', 'jp-cc-settings', array( |
| 30 |
'\\JP\CC\Admin\Settings', |
| 31 |
'page', |
| 32 |
) ); |
| 33 |
|
| 34 |
return $jp_cc_settings_page; |
| 35 |
} |
| 36 |
|
| 37 |
|
| 38 |
} |
| 39 |
|