11<?php
2-
32/**
4- * @wordpress-plugin
53 * Plugin Name: React Admin Page Example
64 * Plugin URI: https://github.com/wellmann/wp-react-admin-page-example
75 * Description: WordPress admin page developed with React and Gutenberg components.
1210 * Text Domain: wp-react-admin-page-example
1311 * Domain Path: /lang
1412 * GitHub Plugin URI: https://github.com/wellmann/wp-react-admin-page-example
13+ *
14+ * @package kwio/wp-react-admin-page-example
1515 */
1616
17- namespace KWIO \ReactAdminPage ;
17+ namespace KWIO \React_Admin_Page ;
1818
19- if (! defined ('ABSPATH ' ) ) {
20- exit ;
19+ if ( ! defined ( 'ABSPATH ' ) ) {
20+ exit ;
2121}
2222
23- define (__NAMESPACE__ . '\\MAIN_FILE ' , __FILE__ );
24- define (__NAMESPACE__ . '\\BASENAME ' , plugin_basename (MAIN_FILE ));
25- define (__NAMESPACE__ . '\\DIR_PATH ' , plugin_dir_path (MAIN_FILE ));
26- define (__NAMESPACE__ . '\\DIR_URL ' , plugin_dir_url (MAIN_FILE ));
27- define (__NAMESPACE__ . '\\ADMIN_PAGE_SLUG ' , 'kwio-react-page ' );
23+ define ( __NAMESPACE__ . '\\MAIN_FILE ' , __FILE__ );
24+ define ( __NAMESPACE__ . '\\BASENAME ' , plugin_basename ( MAIN_FILE ) );
25+ define ( __NAMESPACE__ . '\\DIR_PATH ' , plugin_dir_path ( MAIN_FILE ) );
26+ define ( __NAMESPACE__ . '\\DIR_URL ' , plugin_dir_url ( MAIN_FILE ) );
27+ define ( __NAMESPACE__ . '\\ADMIN_PAGE_SLUG ' , 'kwio-react-page ' );
28+
29+ if ( file_exists ( DIR_PATH . 'vendor/autoload.php ' ) ) {
30+ require_once DIR_PATH . 'vendor/autoload.php ' ;
31+ }
2832
29- if (file_exists (DIR_PATH . 'vendor/autoload.php ' )) {
30- require_once DIR_PATH . 'vendor/autoload.php ' ;
31- }
33+ require_once DIR_PATH . 'src/hooks.php ' ;
0 commit comments