Astra_Ext_Advanced_Hooks_Meta::get_instance()

Initiator


Description


Source

File: addons/advanced-hooks/classes/class-astra-ext-advanced-hooks-meta.php

		public static function get_instance() {
			if ( ! isset( self::$instance ) ) {
				self::$instance = new self();
			}

			/**
			 * Filter for the 'Layouts' in Custom Layouts selection.
			 *
			 * @since 1.5.0
			 */
			$layouts = array(
				'header'   => array(
					'title' => __( 'Header', 'astra-addon' ),
				),
				'footer'   => array(
					'title' => __( 'Footer', 'astra-addon' ),
				),
				'404-page' => array(
					'title' => __( '404 Page', 'astra-addon' ),
				),
				'hooks'    => array(
					'title' => __( 'Hooks', 'astra-addon' ),
				),
				'content'  => array(
					'title' => __( 'Inside Post/Page Content', 'astra-addon' ),
				),
			);

			/**
			 * Filter for the 'Hooks' in Custom Layouts selection.
			 *
			 * @since 1.5.0
			 */
			$hooks = array(
				'head'    => array(
					'title' => __( 'Head', 'astra-addon' ),
					'hooks' => array(
						'astra_html_before' => array(
							'title'       => 'html_before',
							'description' => __( 'astra_html_before - Action to add your content or snippet just before the opening of <html> tag.', 'astra-addon' ),
						),
						'astra_head_top'    => array(
							'title'       => 'head_top',
							'description' => __( 'astra_head_top - Action to add your content or snippet at top of the <head> tag.', 'astra-addon' ),
						),
						'astra_head_bottom' => array(
							'title'       => 'head_bottom',
							'description' => __( 'astra_head_bottom - Action to add your content or snippet at bottom of the <head> tag.', 'astra-addon' ),
						),
						'wp_head'           => array(
							'title'       => 'wp_head',
							'description' => __( 'wp_head - Action to add custom style, script and meta at the bottom of <head> tag.', 'astra-addon' ),
						),
					),
				),
				'header'  => array(
					'title' => __( 'Header', 'astra-addon' ),
					'hooks' => array(
						'astra_body_top'               => array(
							'title'       => 'body_top',
							'description' => __( 'astra_body_top - Action to add your content or snippet at top of the <body> tag.', 'astra-addon' ),
						),
						'astra_header_before'          => array(
							'title'       => 'header_before',
							'description' => __( 'astra_header_before - Action to add your content or snippet just before the opening <header> tag.', 'astra-addon' ),
						),
						'astra_masthead_top'           => array(
							'title'       => 'masthead_top',
							'description' => __( 'astra_masthead_top - Action to add your content or snippet at  top of the <header> tag.', 'astra-addon' ),
						),
						'astra_main_header_bar_top'    => array(
							'title'       => 'main_header_bar_top',
							'description' => __( 'astra_main_header_bar_top - Action to add your content or snippet at top of the Main header.', 'astra-addon' ),
						),
						'astra_masthead_content'       => array(
							'title'       => 'masthead_content',
							'description' => __( 'astra_masthead_content - Action to add your content or snippet in <header> tag.', 'astra-addon' ),
						),
						'astra_masthead_toggle_buttons_before' => array(
							'title'       => 'masthead_toggle_buttons_before',
							'description' => __( 'astra_masthead_toggle_buttons_before - Action to add your content or snippet before responsive menu toggle button.', 'astra-addon' ),
						),
						'astra_masthead_toggle_buttons_after' => array(
							'title'       => 'masthead_toggle_buttons_after',
							'description' => __( 'astra_masthead_toggle_buttons_after - Action to add your content or snippet after responsive menu toggle button.', 'astra-addon' ),
						),
						'astra_main_header_bar_bottom' => array(
							'title'       => 'main_header_bar_bottom',
							'description' => __( 'astra_main_header_bar_bottom - Action to add your content or snippet after at bottom of the Main header.', 'astra-addon' ),
						),
						'astra_masthead_bottom'        => array(
							'title'       => 'masthead_bottom',
							'description' => __( 'astra_masthead_bottom - Action to add your content or snippet at  bottom of the <header> tag.', 'astra-addon' ),
						),
						'astra_header_after'           => array(
							'title'       => 'header_after',
							'description' => __( 'astra_header_after - Action to add your content or snippet after the closing <header> tag.', 'astra-addon' ),
						),
					),
				),
				'content' => array(
					'title' => __( 'Content', 'astra-addon' ),
					'hooks' => array(
						'astra_content_before'             => array(
							'title'       => 'content_before',
							'description' => __( 'astra_content_before - Action to add your content or snippet before main content.', 'astra-addon' ),
						),
						'astra_content_top'                => array(
							'title'       => 'content_top',
							'description' => __( 'astra_content_top - Action to add your content or snippet at top of main content.', 'astra-addon' ),
						),
						'astra_primary_content_top'        => array(
							'title'       => 'primary_content_top',
							'description' => __( 'astra_primary_content_top - Action to add your content or snippet at top of the primary content.', 'astra-addon' ),
						),
						'astra_content_loop'               => array(
							'title'       => 'content_loop',
							'description' => __( 'astra_content_loop - Action to add your content or snippet at top of the primary content loop.', 'astra-addon' ),
						),
						'astra_template_parts_content_none' => array(
							'title'       => 'template_parts_content_none',
							'description' => __( 'astra_template_parts_content_none - Action to add your content or snippet at top of the primary content.', 'astra-addon' ),
						),
						'astra_content_while_before'       => array(
							'title'       => 'content_while_before',
							'description' => __( 'astra_content_while_before - Action to add your content or snippet before loop start.', 'astra-addon' ),
						),
						'astra_template_parts_content_top' => array(
							'title'       => 'template_parts_content_top',
							'description' => __( 'astra_template_parts_content_top - Action to add your content or snippet at top of the primary template content.', 'astra-addon' ),
						),
						'astra_template_parts_content'     => array(
							'title'       => 'template_parts_content',
							'description' => __( 'astra_template_parts_content - Action to add your content or snippet at top of the primary template content.', 'astra-addon' ),
						),
						'astra_entry_before'               => array(
							'title'       => 'entry_before',
							'description' => __( 'astra_entry_before - Action to add your content or snippet before <article> tag.', 'astra-addon' ),
						),
						'astra_entry_top'                  => array(
							'title'       => 'entry_top',
							'description' => __( 'astra_entry_top - Action to add your content or snippet at top of the <article> tag.', 'astra-addon' ),
						),
						'astra_single_header_before'       => array(
							'title'       => 'single_header_before',
							'description' => __( 'astra_single_header_before - Action to add your content or snippet before single post header.', 'astra-addon' ),
						),
						'astra_single_header_top'          => array(
							'title'       => 'single_header_top',
							'description' => __( 'astra_single_header_top - Action to add your content or snippet at top of the single post header.', 'astra-addon' ),
						),
						'astra_single_post_title_after'    => array(
							'title'       => 'single_post_title_after',
							'description' => __( 'astra_single_post_title_after - Action to add your content after post title for singular post', 'astra-addon' ),
						),
						'astra_single_header_bottom'       => array(
							'title'       => 'single_header_bottom',
							'description' => __( 'astra_single_header_bottom - Action to add your content or snippet at bottom of the single post header.', 'astra-addon' ),
						),
						'astra_single_header_after'        => array(
							'title'       => 'single_header_after',
							'description' => __( 'astra_single_header_after - Action to add your content or snippet after single post header.', 'astra-addon' ),
						),
						'astra_entry_content_before'       => array(
							'title'       => 'entry_content_before',
							'description' => __( 'astra_entry_content_before - Action to add your content or snippet before post content.', 'astra-addon' ),
						),
						'astra_entry_content_after'        => array(
							'title'       => 'entry_content_after',
							'description' => __( 'astra_entry_content_after - Action to add your content or snippet after post content', 'astra-addon' ),
						),
						'astra_entry_bottom'               => array(
							'title'       => 'entry_bottom',
							'description' => __( 'astra_entry_bottom - Action to add your content or snippet at bottom of the <article> tag.', 'astra-addon' ),
						),
						'astra_entry_after'                => array(
							'title'       => 'entry_after',
							'description' => __( 'astra_entry_after - Action to add your content or snippet after closing <article> tag.', 'astra-addon' ),
						),
						'astra_template_parts_content_bottom' => array(
							'title'       => 'template_parts_content_bottom',
							'description' => __( 'astra_template_parts_content_bottom - Action to add your content or snippet after closing <article> tag.', 'astra-addon' ),
						),
						'astra_primary_content_bottom'     => array(
							'title'       => 'primary_content_bottom',
							'description' => __( 'astra_primary_content_bottom - Action to add your content or snippet at bottom of the primary content.', 'astra-addon' ),
						),
						'astra_content_while_after'        => array(
							'title'       => 'content_while_after',
							'description' => __( 'astra_content_while_after - Action to add your content or snippet after loop end.', 'astra-addon' ),
						),
						'astra_content_bottom'             => array(
							'title'       => 'content_bottom',
							'description' => __( 'astra_content_bottom - Action to add your content or snippet at bottom of the main content.', 'astra-addon' ),
						),
						'astra_content_after'              => array(
							'title'       => 'content_after',
							'description' => __( 'astra_content_after - Action to add your content or snippet after main content.', 'astra-addon' ),
						),
					),
				),
				'comment' => array(
					'title' => __( 'Comment', 'astra-addon' ),
					'hooks' => array(
						'astra_comments_before' => array(
							'title'       => 'comments_before',
							'description' => __( 'astra_comments_before - Action to add your content or snippet before opening of comment start.', 'astra-addon' ),
						),
						'astra_comments_after'  => array(
							'title'       => 'comments_after',
							'description' => __( 'astra_comments_after - Action to add your content or snippet after closing of comment wrapper.', 'astra-addon' ),
						),
					),
				),
				'sidebar' => array(
					'title' => __( 'Sidebar', 'astra-addon' ),
					'hooks' => array(
						'astra_sidebars_before' => array(
							'title'       => 'sidebars_before',
							'description' => __( 'astra_sidebars_before - Action to add your content or snippet before opening of sidebar wrapper.', 'astra-addon' ),
						),
						'astra_sidebars_after'  => array(
							'title'       => 'sidebars_after',
							'description' => __( 'astra_sidebars_after - Action to add your content or snippet after closing of sidebar wrapper.', 'astra-addon' ),
						),
					),
				),
				'footer'  => array(
					'title' => __( 'Footer', 'astra-addon' ),
					'hooks' => array(
						'astra_footer_before'         => array(
							'title'       => 'footer_before',
							'description' => __( 'astra_footer_before - Action to add your content or snippet before the opening <footer> tag.', 'astra-addon' ),
						),
						'astra_footer_content_top'    => array(
							'title'       => 'footer_content_top',
							'description' => __( 'astra_footer_content_top - Action to add your content or snippet at top in the <footer> tag.', 'astra-addon' ),
						),
						'astra_footer_inside_container_top' => array(
							'title'       => 'footer_inside_container_top',
							'description' => __( 'astra_footer_inside_container_top - Action to add your content or snippet at top of the footer container.', 'astra-addon' ),
						),
						'astra_footer_inside_container_bottom' => array(
							'title'       => 'footer_inside_container_bottom',
							'description' => __( 'astra_footer_inside_container_bottom - Action to add your content or snippet at bottom of the footer container.', 'astra-addon' ),
						),
						'astra_footer_content_bottom' => array(
							'title'       => 'footer_content_bottom',
							'description' => __( 'astra_footer_content_bottom - Action to add your content or snippet at bottom in the <footer> tag.', 'astra-addon' ),
						),
						'astra_footer_after'          => array(
							'title'       => 'footer_after',
							'description' => __( 'astra_footer_after - Action to add your content or snippet after the closing <footer> tag.', 'astra-addon' ),
						),
						'astra_body_bottom'           => array(
							'title'       => 'body_bottom',
							'description' => __( 'astra_body_bottom - Action to add your content or snippet at bottom of the <body> tag.', 'astra-addon' ),
						),
						'wp_footer'                   => array(
							'title'       => 'wp_footer',
							'description' => __( 'wp_footer - Action to add your content or snippet at end of the document.', 'astra-addon' ),
						),
					),
				),
			);

			// If plugin - 'WooCommerce'.
			if ( class_exists( 'WooCommerce' ) ) {
				$hooks['woo-global'] = array(
					'title' => __( 'WooCommerce - Global', 'astra-addon' ),
					'hooks' => array(
						'woocommerce_before_main_content'  => array(
							'title'       => 'before_main_content',
							'description' => __( 'Action to add your content before the WooCommerce main content.', 'astra-addon' ),
						),
						'woocommerce_after_main_content'   => array(
							'title'       => 'after_main_content',
							'description' => __( 'Action to add your content after the WooCommerce main content.', 'astra-addon' ),
						),
						'woocommerce_sidebar'              => array(
							'title'       => 'sidebar',
							'description' => __( 'Action to add your content on WooCommerce sidebar action.', 'astra-addon' ),
						),
						'woocommerce_breadcrumb'           => array(
							'title'       => 'breadcrumb',
							'description' => __( 'Action to add your content on WooCommerce breadcrumb action.', 'astra-addon' ),
						),
						'woocommerce_before_template_part' => array(
							'title'       => 'before_template_part',
							'description' => __( 'Action to add your content before WooCommerce template part.', 'astra-addon' ),
						),
						'woocommerce_after_template_part'  => array(
							'title'       => 'after_template_part',
							'description' => __( 'Action to add your content after WooCommerce template part.', 'astra-addon' ),
						),
					),
				);

				$hooks['woo-shop'] = array(
					'title' => __( 'WooCommerce - Shop', 'astra-addon' ),
					'hooks' => array(
						'woocommerce_archive_description'  => array(
							'title'       => 'archive_description',
							'description' => __( 'Action to add your content on archive_description action.', 'astra-addon' ),
						),
						'woocommerce_before_shop_loop'     => array(
							'title'       => 'before_shop_loop',
							'description' => __( 'Action to add your content before WooCommerce shop loop.', 'astra-addon' ),
						),
						'woocommerce_before_shop_loop_item_title' => array(
							'title'       => 'before_shop_loop_item_title',
							'description' => __( 'Action to add your content before WooCommerce shop loop item.', 'astra-addon' ),
						),
						'woocommerce_after_shop_loop_item_title' => array(
							'title'       => 'after_shop_loop_item_title',
							'description' => __( 'Action to add your content after WooCommerce shop loop item.', 'astra-addon' ),
						),
						'astra_woo_shop_category_before'   => array(
							'title'       => 'woo_shop_category_before',
							'description' => __( 'Action to add your content before WooCommerce shop category.', 'astra-addon' ),
						),
						'astra_woo_shop_category_after'    => array(
							'title'       => 'woo_shop_category_after',
							'description' => __( 'Action to add your content after WooCommerce shop category.', 'astra-addon' ),
						),
						'astra_woo_shop_title_before'      => array(
							'title'       => 'woo_shop_title_before',
							'description' => __( 'Action to add your content before WooCommerce shop title.', 'astra-addon' ),
						),
						'astra_woo_shop_title_after'       => array(
							'title'       => 'woo_shop_title_after',
							'description' => __( 'Action to add your content after WooCommerce shop title.', 'astra-addon' ),
						),
						'astra_woo_shop_rating_before'     => array(
							'title'       => 'woo_shop_rating_before',
							'description' => __( 'Action to add your content before WooCommerce shop rating.', 'astra-addon' ),
						),
						'astra_woo_shop_rating_after'      => array(
							'title'       => 'woo_shop_rating_after',
							'description' => __( 'Action to add your content after WooCommerce shop rating.', 'astra-addon' ),
						),
						'astra_woo_shop_price_before'      => array(
							'title'       => 'woo_shop_price_before',
							'description' => __( 'Action to add your content before WooCommerce shop price.', 'astra-addon' ),
						),
						'astra_woo_shop_price_after'       => array(
							'title'       => 'woo_shop_price_after',
							'description' => __( 'Action to add your content after WooCommerce shop price.', 'astra-addon' ),
						),
						'astra_woo_shop_add_to_cart_before' => array(
							'title'       => 'woo_shop_add_to_cart_before',
							'description' => __( 'Action to add your content before WooCommerce shop cart.', 'astra-addon' ),
						),
						'astra_woo_shop_add_to_cart_after' => array(
							'title'       => 'woo_shop_add_to_cart_after',
							'description' => __( 'Action to add your content after WooCommerce shop cart.', 'astra-addon' ),
						),
						'woocommerce_after_shop_loop'      => array(
							'title'       => 'after_shop_loop',
							'description' => __( 'Action to add your content after WooCommerce shop loop.', 'astra-addon' ),
						),
					),
				);

				$hooks['woo-product'] = array(
					'title' => __( 'WooCommerce - Product', 'astra-addon' ),
					'hooks' => array(
						'woocommerce_before_single_product' => array(
							'title'       => 'before_single_product',
							'description' => __( 'Action to add your content before WooCommerce single product.', 'astra-addon' ),
						),
						'woocommerce_before_single_product_summary' => array(
							'title'       => 'before_single_product_summary',
							'description' => __( 'Action to add your content before WooCommerce single product summary.', 'astra-addon' ),
						),

						'woocommerce_single_product_summary' => array(
							'title'       => 'single_product_summary',
							'description' => __( 'Action to add your content on WooCommerce single product summary action.', 'astra-addon' ),
						),
						'woocommerce_after_single_product_summary' => array(
							'title'       => 'after_single_product_summary',
							'description' => __( 'Action to add your content after WooCommerce single product summary.', 'astra-addon' ),
						),
						'woocommerce_simple_add_to_cart'   => array(
							'title'       => 'simple_add_to_cart',
							'description' => __( 'Action to add your content on simple add to cart action.', 'astra-addon' ),
						),
						'woocommerce_before_add_to_cart_form' => array(
							'title'       => 'before_add_to_cart_form',
							'description' => __( 'Action to add your content before WooCommerce add to cart form.', 'astra-addon' ),
						),
						'woocommerce_before_add_to_cart_button' => array(
							'title'       => 'before_add_to_cart_button',
							'description' => __( 'Action to add your content before WooCommerce add to cart button.', 'astra-addon' ),
						),
						'woocommerce_before_add_to_cart_quantity' => array(
							'title'       => 'before_add_to_cart_quantity',
							'description' => __( 'Action to add your content before WooCommerce add to cart quantity.', 'astra-addon' ),
						),
						'woocommerce_after_add_to_cart_quantity' => array(
							'title'       => 'after_add_to_cart_quantity',
							'description' => __( 'Action to add your content after WooCommerce add to cart quantity.', 'astra-addon' ),
						),
						'woocommerce_after_add_to_cart_button' => array(
							'title'       => 'after_add_to_cart_button',
							'description' => __( 'Action to add your content after WooCommerce add to cart button.', 'astra-addon' ),
						),
						'woocommerce_after_add_to_cart_form' => array(
							'title'       => 'after_add_to_cart_form',
							'description' => __( 'Action to add your content after WooCommerce add to cart form.', 'astra-addon' ),
						),
						'woocommerce_product_meta_start'   => array(
							'title'       => 'product_meta_start',
							'description' => __( 'Action to add your content on WooCommerce product meta start action.', 'astra-addon' ),
						),
						'woocommerce_product_meta_end'     => array(
							'title'       => 'product_meta_end',
							'description' => __( 'Action to add your content on WooCommerce product meta end action.', 'astra-addon' ),
						),
						'woocommerce_share'                => array(
							'title'       => 'share',
							'description' => __( 'Action to add your content on share action.', 'astra-addon' ),
						),
						'woocommerce_after_single_product' => array(
							'title'       => 'after_single_product',
							'description' => __( 'Action to add your content after WooCommerce single product.', 'astra-addon' ),
						),
					),
				);

				$hooks['woo-cart'] = array(
					'title' => __( 'WooCommerce - Cart', 'astra-addon' ),
					'hooks' => array(
						'woocommerce_check_cart_items'     => array(
							'title'       => 'check_cart_items',
							'description' => __( 'Action to add your content on check cart items action.', 'astra-addon' ),
						),
						'woocommerce_cart_reset'           => array(
							'title'       => 'cart_reset',
							'description' => __( 'Action to add your content on cart reset.', 'astra-addon' ),
						),
						'woocommerce_cart_updated'         => array(
							'title'       => 'cart_updated',
							'description' => __( 'Action to add your content on cart update.', 'astra-addon' ),
						),
						'woocommerce_cart_is_empty'        => array(
							'title'       => 'cart_is_empty',
							'description' => __( 'Action to add your content on check cart is empty.', 'astra-addon' ),
						),
						'woocommerce_before_calculate_totals' => array(
							'title'       => 'before_calculate_totals',
							'description' => __( 'Action to add your content before WooCommerce calculate totals.', 'astra-addon' ),
						),
						'woocommerce_cart_calculate_fees'  => array(
							'title'       => 'cart_calculate_fees',
							'description' => __( 'Action to add your content on cart calculate fees.', 'astra-addon' ),
						),
						'woocommerce_after_calculate_totals' => array(
							'title'       => 'after_calculate_totals',
							'description' => __( 'Action to add your content after WooCommerce calculate totals.', 'astra-addon' ),
						),
						'woocommerce_before_cart'          => array(
							'title'       => 'before_cart',
							'description' => __( 'Action to add your content before WooCommerce cart.', 'astra-addon' ),
						),
						'woocommerce_before_cart_table'    => array(
							'title'       => 'before_cart_table',
							'description' => __( 'Action to add your content before WooCommerce cart table.', 'astra-addon' ),
						),
						'woocommerce_before_cart_contents' => array(
							'title'       => 'before_cart_contents',
							'description' => __( 'Action to add your content before WooCommerce cart contents.', 'astra-addon' ),
						),
						'woocommerce_cart_contents'        => array(
							'title'       => 'cart_contents',
							'description' => __( 'Action to add your content on cart contents.', 'astra-addon' ),
						),
						'woocommerce_after_cart_contents'  => array(
							'title'       => 'after_cart_contents',
							'description' => __( 'Action to add your content after WooCommerce cart contents.', 'astra-addon' ),
						),
						'woocommerce_cart_coupon'          => array(
							'title'       => 'cart_coupon',
							'description' => __( 'Action to add your content on cart coupon.', 'astra-addon' ),
						),
						'woocommerce_cart_actions'         => array(
							'title'       => 'cart_actions',
							'description' => __( 'Action to add your content on cart actions.', 'astra-addon' ),
						),
						'woocommerce_after_cart_table'     => array(
							'title'       => 'after_cart_table',
							'description' => __( 'Action to add your content after WooCommerce cart table.', 'astra-addon' ),
						),
						'woocommerce_cart_collaterals'     => array(
							'title'       => 'cart_collaterals',
							'description' => __( 'Action to add your content on cart collaterals.', 'astra-addon' ),
						),
						'woocommerce_before_cart_totals'   => array(
							'title'       => 'before_cart_totals',
							'description' => __( 'Action to add your content before WooCommerce cart totals.', 'astra-addon' ),
						),
						'woocommerce_cart_totals_before_order_total' => array(
							'title'       => 'cart_totals_before_order_total',
							'description' => __( 'Action to add your content before WooCommerce order total.', 'astra-addon' ),
						),
						'woocommerce_cart_totals_after_order_total' => array(
							'title'       => 'cart_totals_after_order_total',
							'description' => __( 'Action to add your content after WooCommerce order total.', 'astra-addon' ),
						),
						'woocommerce_proceed_to_checkout'  => array(
							'title'       => 'proceed_to_checkout',
							'description' => __( 'Action to add your content on proceed to checkout action.', 'astra-addon' ),
						),
						'woocommerce_after_cart_totals'    => array(
							'title'       => 'after_cart_totals',
							'description' => __( 'Action to add your content after WooCommerce cart totals.', 'astra-addon' ),
						),
						'woocommerce_after_cart'           => array(
							'title'       => 'after_cart',
							'description' => __( 'Action to add your content after WooCommerce cart.', 'astra-addon' ),
						),
					),
				);

				$hooks['woo-checkout'] = array(
					'title' => __( 'WooCommerce - Checkout', 'astra-addon' ),
					'hooks' => array(
						'woocommerce_before_checkout_form' => array(
							'title'       => 'before_checkout_form',
							'description' => __( 'Action to add your content before WooCommerce checkout form.', 'astra-addon' ),
						),
						'woocommerce_checkout_before_customer_details' => array(
							'title'       => 'checkout_before_customer_details',
							'description' => __( 'Action to add your content before WooCommerce customer details.', 'astra-addon' ),
						),
						'woocommerce_checkout_after_customer_details' => array(
							'title'       => 'checkout_after_customer_details',
							'description' => __( 'Action to add your content after WooCommerce customer details.', 'astra-addon' ),
						),
						'woocommerce_checkout_billing'     => array(
							'title'       => 'checkout_billing',
							'description' => __( 'Action to add your content on checkout billing.', 'astra-addon' ),
						),
						'woocommerce_before_checkout_billing_form' => array(
							'title'       => 'before_checkout_billing_form',
							'description' => __( 'Action to add your content before WooCommerce checkout billing form.', 'astra-addon' ),
						),
						'woocommerce_after_checkout_billing_form' => array(
							'title'       => 'after_checkout_billing_form',
							'description' => __( 'Action to add your content after WooCommerce checkout billing form.', 'astra-addon' ),
						),
						'woocommerce_before_order_notes'   => array(
							'title'       => 'before_order_notes',
							'description' => __( 'Action to add your content before WooCommerce order notes.', 'astra-addon' ),
						),
						'woocommerce_after_order_notes'    => array(
							'title'       => 'after_order_notes',
							'description' => __( 'Action to add your content after WooCommerce order notes.', 'astra-addon' ),
						),
						'woocommerce_checkout_shipping'    => array(
							'title'       => 'checkout_shipping',
							'description' => __( 'Action to add your content on checkout shipping action.', 'astra-addon' ),
						),
						'woocommerce_checkout_before_order_review' => array(
							'title'       => 'checkout_before_order_review',
							'description' => __( 'Action to add your content before WooCommerce checkout order review.', 'astra-addon' ),
						),
						'woocommerce_checkout_order_review' => array(
							'title'       => 'checkout_order_review',
							'description' => __( 'Action to add your content on checkout order review action.', 'astra-addon' ),
						),
						'woocommerce_review_order_before_cart_contents' => array(
							'title'       => 'review_order_before_cart_contents',
							'description' => __( 'Action to add your content before WooCommerce review order cart contents.', 'astra-addon' ),
						),
						'woocommerce_review_order_after_cart_contents' => array(
							'title'       => 'review_order_after_cart_contents',
							'description' => __( 'Action to add your content after WooCommerce review order cart contents.', 'astra-addon' ),
						),
						'woocommerce_review_order_before_order_total' => array(
							'title'       => 'review_order_before_order_total',
							'description' => __( 'Action to add your content before WooCommerce review order total.', 'astra-addon' ),
						),
						'woocommerce_review_order_after_order_total' => array(
							'title'       => 'review_order_after_order_total',
							'description' => __( 'Action to add your content after WooCommerce review order total.', 'astra-addon' ),
						),
						'woocommerce_review_order_before_payment' => array(
							'title'       => 'review_order_before_payment',
							'description' => __( 'Action to add your content before WooCommerce order payment.', 'astra-addon' ),
						),
						'woocommerce_review_order_before_submit' => array(
							'title'       => 'review_order_before_submit',
							'description' => __( 'Action to add your content before WooCommerce order submit.', 'astra-addon' ),
						),
						'woocommerce_review_order_after_submit' => array(
							'title'       => 'review_order_after_submit',
							'description' => __( 'Action to add your content after WooCommerce order submit.', 'astra-addon' ),
						),
						'woocommerce_review_order_after_payment' => array(
							'title'       => 'review_order_after_payment',
							'description' => __( 'Action to add your content after WooCommerce order payment.', 'astra-addon' ),
						),
						'woocommerce_checkout_after_order_review' => array(
							'title'       => 'checkout_after_order_review',
							'description' => __( 'Action to add your content after WooCommerce checkout order review.', 'astra-addon' ),
						),
						'woocommerce_after_checkout_form'  => array(
							'title'       => 'after_checkout_form',
							'description' => __( 'Action to add your content after WooCommerce checkout form.', 'astra-addon' ),
						),
					),
				);

				$hooks['woo-distraction-checkout'] = array(
					'title' => __( 'WooCommerce - Distraction Free Checkout', 'astra-addon' ),
					'hooks' => array(
						'astra_woo_checkout_masthead_top' => array(
							'title'       => 'woo_checkout_masthead_top',
							'description' => __( 'Action to add your content on WooCommerce checkout masthead top.', 'astra-addon' ),
						),
						'astra_woo_checkout_main_header_bar_top' => array(
							'title'       => 'astra_woo_checkout_main_header_bar_top',
							'description' => __( 'Action to add your content on WooCommerce checkout main header bar top.', 'astra-addon' ),
						),
						'astra_woo_checkout_main_header_bar_bottom' => array(
							'title'       => 'astra_woo_checkout_main_header_bar_bottom',
							'description' => __( 'Action to add your content on WooCommerce checkout main header bar bottom.', 'astra-addon' ),
						),
						'astra_woo_checkout_masthead_bottom' => array(
							'title'       => 'woo_checkout_masthead_bottom',
							'description' => __( 'Action to add your content on WooCommerce checkout masthead bottom.', 'astra-addon' ),
						),
						'astra_woo_checkout_footer_content_top' => array(
							'title'       => 'woo_checkout_footer_content_top',
							'description' => __( 'Action to add your content on WooCommerce checkout footer content top.', 'astra-addon' ),
						),
						'astra_woo_checkout_footer_content_bottom' => array(
							'title'       => 'woo_checkout_footer_content_bottom',
							'description' => __( 'Action to add your content on WooCommerce checkout footer content bottom.', 'astra-addon' ),
						),
					),
				);

				$hooks['woo-account'] = array(
					'title' => __( 'WooCommerce - Account', 'astra-addon' ),
					'hooks' => array(
						'woocommerce_before_account_navigation' => array(
							'title'       => 'before_account_navigation',
							'description' => __( 'Action to add your content before WooCommerce account navigation.', 'astra-addon' ),
						),
						'woocommerce_account_navigation' => array(
							'title'       => 'account_navigation',
							'description' => __( 'Action to add your content on WooCommerce account navigation.', 'astra-addon' ),
						),
						'woocommerce_after_account_navigation' => array(
							'title'       => 'after_account_navigation',
							'description' => __( 'Action to add your content after WooCommerce account navigation.', 'astra-addon' ),
						),
					),
				);
			}

			if ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) {

				unset( $hooks['header']['hooks']['astra_main_header_bar_top'] );
				unset( $hooks['header']['hooks']['astra_masthead_content'] );
				unset( $hooks['header']['hooks']['astra_masthead_toggle_buttons_after'] );
				unset( $hooks['header']['hooks']['astra_masthead_toggle_buttons_before'] );
				unset( $hooks['header']['hooks']['astra_main_header_bar_bottom'] );
				unset( $hooks['footer']['hooks']['astra_footer_content_top'] );
				unset( $hooks['footer']['hooks']['astra_footer_inside_container_top'] );
				unset( $hooks['footer']['hooks']['astra_footer_inside_container_bottom'] );
				unset( $hooks['footer']['hooks']['astra_footer_content_bottom'] );

				/**
				 * Above Header
				 */

				$insert_above_bar_before = array(
					'astra_header_above_container_before' => array(
						'title'       => 'header_above_container_before',
						'description' => __( 'astra_header_above_container_before - Action to add your content or snippet at top of the Above header.', 'astra-addon' ),
					),
				);

				// Add new array 'astra_header_above_container_after' at position 3.
				$above_offset_before      = 3;
				$mast_head_before         = array_slice( $hooks['header']['hooks'], 0, $above_offset_before, true ) + $insert_above_bar_before + array_slice( $hooks['header']['hooks'], $above_offset_before, null, true );
				$hooks['header']['hooks'] = $mast_head_before;

				$insert_above_bar_after = array(
					'astra_header_above_container_after' => array(
						'title'       => 'header_above_container_after',
						'description' => __( 'astra_header_above_container_after - Action to add your content or snippet at bottom of the Above header.', 'astra-addon' ),
					),
				);

				// Add new array 'astra_header_above_container_after' at position 4.
				$above_offset_after       = 4;
				$mast_head_after          = array_slice( $hooks['header']['hooks'], 0, $above_offset_after, true ) + $insert_above_bar_after + array_slice( $hooks['header']['hooks'], $above_offset_after, null, true );
				$hooks['header']['hooks'] = $mast_head_after;

				/**
				 * Primary Header
				 */

				$insert_main_bar_before = array(
					'astra_header_primary_container_before' => array(
						'title'       => 'header_primary_container_before',
						'description' => __( 'astra_header_primary_container_before - Action to add your content or snippet at top of the Primary header.', 'astra-addon' ),
					),
				);

				// Add new array 'astra_header_primary_container_after' at position 5.
				$offset_before            = 5;
				$mast_head_before         = array_slice( $hooks['header']['hooks'], 0, $offset_before, true ) + $insert_main_bar_before + array_slice( $hooks['header']['hooks'], $offset_before, null, true );
				$hooks['header']['hooks'] = $mast_head_before;

				$insert_main_bar_after = array(
					'astra_header_primary_container_after' => array(
						'title'       => 'header_primary_container_after',
						'description' => __( 'astra_header_primary_container_after - Action to add your content or snippet at bottom of the Primary header.', 'astra-addon' ),
					),
				);

				// Add new array 'astra_header_primary_container_after' at position 6.
				$offset_after             = 6;
				$mast_head_after          = array_slice( $hooks['header']['hooks'], 0, $offset_after, true ) + $insert_main_bar_after + array_slice( $hooks['header']['hooks'], $offset_after, null, true );
				$hooks['header']['hooks'] = $mast_head_after;

				/**
				 * Below Header
				 */

				$insert_below_bar_before = array(
					'astra_header_below_container_before' => array(
						'title'       => 'header_below_container_before',
						'description' => __( 'astra_header_below_container_before - Action to add your content or snippet at top of the Below header.', 'astra-addon' ),
					),
				);

				// Add new array 'header_below_container_before' at position 7.
				$below_offset_before      = 7;
				$mast_head_before         = array_slice( $hooks['header']['hooks'], 0, $below_offset_before, true ) + $insert_below_bar_before + array_slice( $hooks['header']['hooks'], $below_offset_before, null, true );
				$hooks['header']['hooks'] = $mast_head_before;

				$insert_below_bar_after = array(
					'astra_header_below_container_after' => array(
						'title'       => 'header_below_container_after',
						'description' => __( 'astra_header_below_container_after - Action to add your content or snippet at bottom of the Below header.', 'astra-addon' ),
					),
				);

				// Add new array 'astra_header_below_container_after' at position 8.
				$below_offset_after       = 8;
				$mast_head_after          = array_slice( $hooks['header']['hooks'], 0, $below_offset_after, true ) + $insert_below_bar_after + array_slice( $hooks['header']['hooks'], $below_offset_after, null, true );
				$hooks['header']['hooks'] = $mast_head_after;

				/**
				 * Above Footer
				 */

				$insert_above_footer_before = array(
					'astra_footer_above_container_before' => array(
						'title'       => 'footer_above_container_before',
						'description' => __( 'astra_footer_above_container_before - Action to add your content or snippet at top of the Above Footer.', 'astra-addon' ),
					),
				);

				// Add new array 'astra_footer_above_container_before' at position 2.
				$offset_above_footer_before = 2;
				$mast_footer_before         = array_slice( $hooks['footer']['hooks'], 0, $offset_above_footer_before, true ) + $insert_above_footer_before + array_slice( $hooks['footer']['hooks'], $offset_above_footer_before, null, true );
				$hooks['footer']['hooks']   = $mast_footer_before;

				$insert_above_footer_after = array(
					'astra_footer_above_container_after' => array(
						'title'       => 'footer_above_container_after',
						'description' => __( 'astra_footer_above_container_after - Action to add your content or snippet at bottom of the Above Footer.', 'astra-addon' ),
					),
				);

				// Add new array 'astra_footer_above_container_after' at position 3.
				$offset_above_footer_after = 3;
				$mast_footer_after         = array_slice( $hooks['footer']['hooks'], 0, $offset_above_footer_after, true ) + $insert_above_footer_after + array_slice( $hooks['footer']['hooks'], $offset_above_footer_after, null, true );
				$hooks['footer']['hooks']  = $mast_footer_after;

				/**
				 * Footer
				 */

				$insert_main_footer_before = array(
					'astra_footer_primary_container_before' => array(
						'title'       => 'footer_primary_container_before',
						'description' => __( 'astra_footer_primary_container_before - Action to add your content or snippet at top of the Primary header.', 'astra-addon' ),
					),
				);

				// Add new array 'astra_footer_primary_container_before' at position 4.
				$offset_footer_before     = 4;
				$mast_footer_before       = array_slice( $hooks['footer']['hooks'], 0, $offset_footer_before, true ) +
				$insert_main_footer_before +
				array_slice( $hooks['footer']['hooks'], $offset_footer_before, null, true );
				$hooks['footer']['hooks'] = $mast_footer_before;

				$insert_main_footer_after = array(
					'astra_footer_primary_container_after' => array(
						'title'       => 'footer_primary_container_after',
						'description' => __( 'astra_footer_primary_container_after - Action to add your content or snippet at bottom of the Primary header.', 'astra-addon' ),
					),
				);

				// Add new array 'astra_footer_primary_container_after' at position 5.
				$offset_footer_after      = 5;
				$mast_footer_after        = array_slice( $hooks['footer']['hooks'], 0, $offset_footer_after, true ) + $insert_main_footer_after + array_slice( $hooks['footer']['hooks'], $offset_footer_after, null, true );
				$hooks['footer']['hooks'] = $mast_footer_after;

				/**
				 * Below Footer
				 */

				$insert_below_footer_before = array(
					'astra_footer_below_container_before' => array(
						'title'       => 'footer_below_container_before',
						'description' => __( 'astra_footer_below_container_before - Action to add your content or snippet at top of the Below Footer.', 'astra-addon' ),
					),
				);

				// Add new array 'astra_footer_below_container_before' at position 6.
				$offset_below_footer_before = 6;
				$mast_footer_before         = array_slice( $hooks['footer']['hooks'], 0, $offset_below_footer_before, true ) + $insert_below_footer_before + array_slice( $hooks['footer']['hooks'], $offset_below_footer_before, null, true );
				$hooks['footer']['hooks']   = $mast_footer_before;

				$insert_below_footer_after = array(
					'astra_footer_below_container_after' => array(
						'title'       => 'footer_below_container_after',
						'description' => __( 'astra_footer_below_container_after - Action to add your content or snippet at bottom of the Below Footer.', 'astra-addon' ),
					),
				);

				// Add new array 'astra_footer_below_container_after' at position 7.
				$offset_below_footer_after = 7;
				$mast_footer_after         = array_slice( $hooks['footer']['hooks'], 0, $offset_below_footer_after, true ) + $insert_below_footer_after + array_slice( $hooks['footer']['hooks'], $offset_below_footer_after, null, true );
				$hooks['footer']['hooks']  = $mast_footer_after;
			}

			self::$layouts = apply_filters( 'astra_custom_layouts_layout', $layouts );
			self::$hooks   = apply_filters( 'astra_custom_layouts_hooks', $hooks );

			return self::$instance;
		}


User Contributed Notes

You must log in before being able to contribute a note or feedback.