=== Aura Header Footer for Elementor ===
Contributors:      joynall
Tags:              header footer builder, elementor header footer, custom header, custom footer, elementor
Requires at least: 6.0
Tested up to:      7.0
Requires PHP:      7.4
Requires Plugins:  elementor
Stable tag:        1.0.0
License:           GPL-2.0-or-later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html

Create custom headers and footers with Elementor, including display conditions and sticky header support.

== Description ==

**Aura Header Footer for Elementor** lets you design custom headers and footers with Elementor's full drag-and-drop editor, then control exactly where they appear using flexible display conditions.

= How It Works =

1. Go to **Aura HFE → Header Templates** or **Footer Templates**.
2. Click **Add New Header Template** — a clean modal popup appears.
3. Set the template name, display condition, include/exclude pages, and sticky options.
4. Click **Create** — you land directly in the Elementor editor.
5. Design your template, publish, and it's live.

= Key Features =

* **Modal creation flow** — configure everything before opening Elementor.
* **Separate Header & Footer pages** — clean dedicated admin pages for each type.
* **Display Conditions** — Entire Site, Front Page, Blog, Archives, Search, 404, All Singular, or Specific Pages.
* **Page Exclusions** — hide a template on selected pages regardless of include rule.
* **Sticky Header** — make any header sticky on scroll with optional slide animation.
* **Inline Active Toggle** — enable/disable templates without leaving the list.
* **AJAX Delete** — remove templates without a page reload.
* **Performance First** — one DB query per template type per page, per-request memory cache, assets only loaded when a template is active on the current page.

= Theme Integration =

Place these hooks in your theme to output templates:

`<?php do_action( 'aura_hfe_header' ); ?>`  — in `header.php`
`<?php do_action( 'aura_hfe_footer' ); ?>`  — in `footer.php`

= For Developers =

**Action hooks:** `aura_hfe_loaded`, `aura_hfe_activated`, `aura_hfe_deactivated`, `aura_hfe_meta_saved`, `aura_hfe_template_created`

**Filter hooks:** `aura_hfe_header_hook`, `aura_hfe_footer_hook`, `aura_hfe_resolved_template`, `aura_hfe_template_matches`, `aura_hfe_include_rule_options`, `aura_hfe_evaluate_include_rule`, `aura_hfe_sticky_offset`, `aura_hfe_render_post_id`, `aura_hfe_cpt_args`, `aura_hfe_active_templates_query`

**Add a custom display condition:**

`add_filter( 'aura_hfe_include_rule_options', function( $opts ) {
    $opts['woo_shop'] = __( 'WooCommerce Shop', 'your-domain' );
    return $opts;
} );

add_filter( 'aura_hfe_evaluate_include_rule', function( $result, $rule, $pages ) {
    if ( 'woo_shop' === $rule ) {
        return function_exists( 'is_shop' ) && is_shop();
    }
    return $result;
}, 10, 3 );`

== Installation ==

1. Install and activate [Elementor](https://wordpress.org/plugins/elementor/) (free, v3.5.0+) **first**.
2. Upload the `aura-header-footer-elementor` folder to `/wp-content/plugins/`, or install directly via **Plugins → Add New**.
3. Activate the plugin through **Plugins → Installed Plugins**.
4. Navigate to **Aura HFE** in the WordPress admin sidebar.
5. Optionally add `do_action('aura_hfe_header')` and `do_action('aura_hfe_footer')` to your theme for hook-based rendering.

== Frequently Asked Questions ==

= How do I add a custom display condition? =

Use the `aura_hfe_include_rule_options` filter to add the label and `aura_hfe_evaluate_include_rule` to handle the logic. See the For Developers section above.

= Is the plugin translation-ready? =

Yes. All strings use WordPress i18n functions with the `aura-header-footer-elementor` text domain, and a `.pot` file is included in the `/languages` folder.

= What happens to my templates if I delete the plugin? =

The uninstall routine removes all Aura HFE template posts and the plugin version option. Your other WordPress content is never touched.

= Does this work with any WordPress theme? =

Yes. The plugin outputs templates via WordPress action hooks. Add `do_action('aura_hfe_header')` in your theme's `header.php` and `do_action('aura_hfe_footer')` in `footer.php`. You can change the hook names via the `aura_hfe_header_hook` and `aura_hfe_footer_hook` filters.

= Can I activate the plugin without Elementor? =

No. Elementor is a required dependency. The plugin will block activation and show a helpful message if Elementor is not installed or activated. Install the free Elementor plugin first, then activate Aura Header Footer for Elementor.

= Can I show different headers on different pages? =

Yes. Create multiple header templates, each with different display conditions. The first matching active template is rendered per page.

= Is Elementor Pro required? =

No. The free Elementor plugin (v3.5.0+) is all you need. Elementor Pro widgets will work if you have it.


== Changelog ==

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.0 =
Initial release.