setup_hooks(); } private function setup_hooks() { add_action( 'admin_menu', array( $this, 'create_menu' ) ); } public function create_menu() { if ( is_child_theme() ) { $theme = wp_get_theme()->parent(); } else { $theme = wp_get_theme(); } /* translators: %s: Theme Name. */ $theme_page_name = sprintf( esc_html__( '%s Options', 'foodhunt' ), $theme->Name ); $page = add_theme_page( $theme_page_name, $theme_page_name, 'edit_theme_options', 'foodhunt-options', array( $this, 'option_page', ) ); } public function option_page() { if ( is_child_theme() ) { $theme = wp_get_theme()->parent(); } else { $theme = wp_get_theme(); } ?>
Name ); ?>