Astra_Ext_Advanced_Headers_Meta::display_rules_tab( array $options )
Markup for Display Rules Tabs.
Description
Parameters
- $options
-
(array) (Required) Post meta.
Source
File: addons/advanced-headers/classes/class-astra-ext-advanced-headers-meta.php
public function display_rules_tab( $options ) { // Load Target Rule assets. Astra_Target_Rules_Fields::get_instance()->admin_styles(); $layout = $options['layouts']; $design = $options['designs']; $include_locations = $options['include_locations']; $exclude_locations = $options['exclude_locations']; $users = $options['user_roles']; ?> <table class="ast-advanced-headers-table widefat"> <tr class="ast-advanced-headers-row"> <td class="ast-advanced-headers-row-heading"> <label><?php esc_html_e( 'Display On', 'astra-addon' ); ?></label> <i class="ast-advanced-headers-heading-help dashicons dashicons-editor-help" title="<?php echo esc_attr__( 'Add locations for where this Advanced Header should appear.', 'astra-addon' ); ?>"></i> </td> <td class="ast-advanced-headers-row-content"> <?php Astra_Target_Rules_Fields::target_rule_settings_field( 'ast-advanced-headers-location', array( 'title' => __( 'Display Rules', 'astra-addon' ), 'value' => '[{"type":"basic-global","specific":null}]', 'tags' => 'site,enable,target,pages', 'rule_type' => 'display', 'add_rule_label' => __( 'Add Display Rule', 'astra-addon' ), ), $include_locations ); ?> </td> </tr> <tr class="ast-advanced-headers-row"> <td class="ast-advanced-headers-row-heading"> <label><?php esc_html_e( 'Do Not Display On', 'astra-addon' ); ?></label> <i class="ast-advanced-headers-heading-help dashicons dashicons-editor-help" title="<?php echo esc_attr__( 'This Advanced Header will not appear at these locations.', 'astra-addon' ); ?>"></i> </td> <td class="ast-advanced-headers-row-content"> <?php Astra_Target_Rules_Fields::target_rule_settings_field( 'ast-advanced-headers-exclusion', array( 'title' => __( 'Exclude On', 'astra-addon' ), 'value' => '[]', 'tags' => 'site,enable,target,pages', 'add_rule_label' => __( 'Add Exclusion Rule', 'astra-addon' ), 'rule_type' => 'exclude', ), $exclude_locations ); ?> </td> </tr> <tr class="ast-advanced-headers-row"> <td class="ast-advanced-headers-row-heading"> <label><?php esc_html_e( 'User Roles', 'astra-addon' ); ?></label> <i class="ast-advanced-headers-heading-help dashicons dashicons-editor-help" title="<?php echo esc_attr__( 'Targer header based on user role.', 'astra-addon' ); ?>"></i> </td> <td class="ast-advanced-headers-row-content"> <?php Astra_Target_Rules_Fields::target_user_role_settings_field( 'ast-advanced-headers-users', array( 'title' => __( 'Users', 'astra-addon' ), 'value' => '[]', 'tags' => 'site,enable,target,pages', 'add_rule_label' => __( 'Add User Rule', 'astra-addon' ), ), $users ); ?> </td> </tr> </table> <!-- Transparent header notice --> <table class="ast-advanced-headers-table ast-transparent-notice-wrap widefat"> <tr class="ast-advanced-headers-row"> <td class="ast-advanced-headers-row-heading"> <label><?php esc_html_e( 'Force Disable Transparency on Archives?', 'astra-addon' ); ?></label> <i class="ast-advanced-headers-heading-help dashicons dashicons-editor-help" title="<?php echo esc_attr__( 'Merge Page Header with Site Header is generally not recommended on achieve pages such as search, 404, etc. If you would like to enable it, use this setting.', 'astra-addon' ); ?>"></i> </td> <td class="ast-advanced-headers-row-content"> <input type="checkbox" id="ast-advanced-headers-layout-force-transparent-yes" name="ast-advanced-headers-layout[force-transparent-disabled]" value="yes" <?php checked( isset( $layout['force-transparent-disabled'] ) ? $layout['force-transparent-disabled'] : '', 'yes' ); ?> /> <label for="ast-advanced-headers-layout-force-transparent-yes"><?php esc_html_e( 'Yes', 'astra-addon' ); ?></label><br> </td> </tr> </table> <?php }
Expand full source code Collapse full source code View on Trac
Changelog
Version | Description |
---|---|
1.0.0 | Introduced. |