We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Based on the usage of WPFoundation done in the latest projects I see that mainly configuration related things are done.
My proposal is to generate a config tree using PHP (maybe a YAML alternative could be used also, but might be limited).
Example of a basic configuration tree:
class Config { const MENU_MAIN = 'Main menu'; const VENDOR_PATH = ''; const POST_TYPE_EXHIBITION = 'exhibition'; const POST_TYPE_PAGE = 'page'; const TAXONOMY_EXHIBITION_CATEGORY = 'exhibition_category'; const TEMPLATE_PAGE_CONTACT = 'page_contact'; const TEMPLATE_PAGE_FRONT_PAGE = 'front_page'; const TEMPLATE_PAGE_GENERIC = 'generic'; } $baseOptions = [ 'has_archive' => true, 'public' => true, 'publicly_queryable' => true, 'query_var' => true, 'show_in_rest' => true, 'show_ui' => true, ]; $config = [ 'logo' => get_stylesheet_directory_uri() . '/../../themes/app/assets/images/site-login-logo.png', 'menus' => [ Config::MENU_MAIN => Translations::trans('Main menu'), ], 'assets' => [ 'jquery.sidr.min' => [ 'path' => Config::VENDOR_PATH . '/sidr', 'dependencies' => [], 'version' => '1.0.0', 'media' => 'all' ] ], 'templates' => [ 'front_page' => Translations::trans('Front Page'), 'page_contact' => Translations::trans('Contact'), 'Generic' => Translations::trans('Generic (Page builder)'), ], 'post_types' => [ Config::POST_TYPE_EXHIBITION => array_merge($baseOptions, [ 'labels' => [ 'name' => Translations::trans('Exhibitions'), 'singular_name' => Translations::trans('Exhibition'), ], 'supports' => ['title', 'editor', 'thumbnail'], ]) ], 'fields' => [ [ 'fields' => [ExhibitionPostFields::class], 'connector' => new PostTypeFieldConnector(Config::POST_TYPE_EXHIBITION) ] ] ];
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Based on the usage of WPFoundation done in the latest projects I see that mainly configuration related things are done.
My proposal is to generate a config tree using PHP (maybe a YAML alternative could be used also, but might be limited).
Example of a basic configuration tree:
The text was updated successfully, but these errors were encountered: