UtilsLocal::get_images_support(), ]; } public function get_post_creation_data() { $sources = UtilsLocal::get_source_options(); $taxonomies = Utils::get_taxonomy_options(); $faq_groups = Utils::get_faq_groups_options(); $menus = Utils::get_menu_options(); return [ "success" => ! ! $taxonomies, "data" => [ "sources" => $sources, "taxonomies" => $taxonomies, "faq_groups" => $faq_groups, "menus" => $menus, ], ]; } public function render_preview( $settings, $post_id ) { $renderer = new MenuRenderer( $settings, $post_id ); $html = $renderer->render(); return [ "html" => $html, ]; } /** * Return an instance of this class. * * @return object A single instance of this class. * @since 1.0.0 * */ public static function get_instance() { // If the single instance hasn't been set, set it now. if ( null == self::$instance ) { self::$instance = new self; self::$instance->do_hooks(); } return self::$instance; } }