| @@ -2,16 +2,17 @@ | ||
| 2 | 2 | |
| 3 | 3 | defined( 'ABSPATH' ) || exit; |
| 4 | 4 | |
| 5 | 5 | class Hostinger_Admin_Actions { |
| 6 | - public const LOGO_UPLOAD = 'logo_upload'; | |
| 7 | - public const IMAGE_UPLOAD = 'image_upload'; | |
| 8 | - public const EDIT_DESCRIPTION = 'edit_description'; | |
| 9 | - public const EDIT_SITE_TITLE = 'edit_site_title'; | |
| 10 | - public const ADD_POST = 'add_post'; | |
| 11 | - public const ADD_PAGE = 'add_page'; | |
| 12 | - public const ADD_PRODUCT = 'add_product'; | |
| 13 | - public const ACTIONS_LIST = [ | |
| 6 | + public const LOGO_UPLOAD = 'logo_upload'; | |
| 7 | + public const IMAGE_UPLOAD = 'image_upload'; | |
| 8 | + public const EDIT_DESCRIPTION = 'edit_description'; | |
| 9 | + public const EDIT_SITE_TITLE = 'edit_site_title'; | |
| 10 | + public const ADD_POST = 'add_post'; | |
| 11 | + public const ADD_PAGE = 'add_page'; | |
| 12 | + public const ADD_PRODUCT = 'add_product'; | |
| 13 | + public const DOMAIN_IS_CONNECTED = 'connect_domain'; | |
| 14 | + public const ACTIONS_LIST = array( | |
| 14 | 15 | self::LOGO_UPLOAD, |
| 15 | 16 | self::IMAGE_UPLOAD, |
| 16 | 17 | self::EDIT_DESCRIPTION, |
| 17 | 18 | self::EDIT_SITE_TITLE, |
| @@ -17,22 +18,7 @@ | ||
| 17 | 18 | self::EDIT_SITE_TITLE, |
| 18 | 19 | self::ADD_POST, |
| 19 | 20 | self::ADD_PAGE, |
| 20 | 21 | self::ADD_PRODUCT, |
| 21 | - ]; | |
| 22 | - | |
| 23 | - public function __construct() { | |
| 24 | - add_action( 'admin_footer', array( $this, 'add_amplitude_action_nonce' ) ); | |
| 25 | - add_action( 'wp_head', array( $this, 'add_action_nonce' ) ); | |
| 26 | - } | |
| 27 | - | |
| 28 | - public function add_amplitude_action_nonce(): void { | |
| 29 | - wp_nonce_field( 'menu_actions', 'menu_actions_nonce' ); | |
| 30 | - } | |
| 31 | - | |
| 32 | - public function add_action_nonce(): void { | |
| 33 | - wp_nonce_field( 'hts_action_name', 'hts_action_name_nonce' ); | |
| 34 | - } | |
| 35 | - | |
| 22 | + self::DOMAIN_IS_CONNECTED, | |
| 23 | + ); | |
| 36 | 24 | } |
| 37 | - | |
| 38 | -new Hostinger_Admin_Actions(); | |