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, less variables, menu positions 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
    [arr.create set='services'] 
      [db_service label='DB Services' post_type='db_service' desc='database services' /]
      [search_service label='Search Service' post_type='search_service' desc='search services' /]
      [form_control label='Form Control Service' post_type='form_control' desc='Form Control Services' /]
      [ui label='UI Service' post_type='ui' desc='UI Services' /]
      [notification_service label='Notification Service' post_type='notification_service' desc='Notification Services' /]
      [chart_service label='Chart Service' post_type='chart_service' desc='Chart Service' /]
      [test_service label='Test Service' services_folder='test_service' desc='Test Services' ignore=true/]
      [samples label='Sample Service' app='samples' desc='Sample Services' /]

    Eg db_service 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.
  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.
Most Popular

Leave a Reply

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