Documentation / Tutorials / Awesome Enterprise

Understanding Awesome Core

/ Awesome Enterprise / Understanding Awesome Core

The Awesome Core collection is used to configure and register defaults for Awesome Enterprise powered websites. Here are some of the slugs that are needed for Awesome based websites to work properly.

  1. register:  If you want to register the custom post type, menu positions, taxonomies, etc. then you can use this. It is always executed at WordPress init hook.
  2. init: If you want to run something only in the frontend during init hook you can use this.
  3. backend-init: if you want to run something during admin_init hook you can put that code within.
  4. services: It is used to register various services that will be used across the website. To register a service you have to create a ‘services ‘ array as shown below

    Eg db is the slug of the service, label is used for display, post_type is used to map the service to a post type and desc is just used to describe the purpose of the service being registered.  Currently, you have to create the post types yourself. Awesome enterprise will not create them for you.
  5. scripts:  If you need to run something during wp_head hook of WordPress you can use this. This is ideally suited for scripts and styles. You can add app specific scripts and styles to the app config.
  6. footer-scripts: If you need to run something when WordPress fires wp_footer hook then this is for you. It is currently global.
  7. header: This is used by monomyth to show the common header for the theme, it can be overridden at app level to show the different header.
  8. footer: This is used by monomyth to show common footer for the theme, it can be overridden at app level to show different footer.
  9. settings: This slug is used to hold all the global settings of the website. The settings are stored in custom fields as meta_key and value. They are available via [env.settings meta_key] and [settings.meta_key]
  10. single-content-layout:  This module is used to give default single-page layout, you can access current post object using [current_post.<property>] , It can be overridden at the app level, by creating the same slug in app config.
  11. apphelp-content-layout: It is used to create the layout for apps help module, it is used for all the apps. It has been removed and not used any more in Awesome Enterprise 3.0
  12. archive-content-layout: It is used to give the layout for various archive pages, like taxonomy, date, tags, author pages. It can be overridden by the app.
  13. $post_type . ‘-archive-content-layout: we can also have specific post-type archive layout if desired.
  14. blog-content-layout: It is used by monomyth theme to show the blog post landing page layout. It is used within home.php file.
  15. layout: This slug is used to create the default layout for all the app pages. This is the fall-back for page layouts. It is equivalent to custom-layout of awesome studio.
  16. gutenberg-blocks: This support was added from 1.3.5, It is used to register all the awesome Gutenberg blocks. It also requires ACF PRO plugin.
  17. content-types: It is used to register Content Types. It’s was introduced in Awesome Enterprise 3.0 .
  18. less-variables: With Awesome Enterprise 3.0, we moved registration the registration of Less Variables to this module.

     
Categories
Most Popular

Leave a Reply

Your email address will not be published. Required fields are marked *