esc_html__( 'Activate', 'header-footer-elementor' ),
'addon_activated' => esc_html__( 'Activated', 'header-footer-elementor' ),
'addon_active' => esc_html__( 'Active', 'header-footer-elementor' ),
'addon_deactivate' => esc_html__( 'Deactivate', 'header-footer-elementor' ),
'addon_inactive' => esc_html__( 'Inactive', 'header-footer-elementor' ),
'addon_install' => esc_html__( 'Install', 'header-footer-elementor' ),
'theme_installed' => esc_html__( 'Theme Installed', 'header-footer-elementor' ),
'plugin_installed' => esc_html__( 'Plugin Installed', 'header-footer-elementor' ),
'addon_download' => esc_html__( 'Download', 'header-footer-elementor' ),
'addon_exists' => esc_html__( 'Already Exists.', 'header-footer-elementor' ),
'visit_site' => esc_html__( 'Visit Website', 'header-footer-elementor' ),
'plugin_error' => esc_html__( 'Could not install. Please download from WordPress.org and install manually.', 'header-footer-elementor' ),
'subscribe_success' => esc_html__( 'Your details are submitted successfully.', 'header-footer-elementor' ),
'subscribe_error' => esc_html__( 'Encountered an error while performing your request.', 'header-footer-elementor' ),
'ajax_url' => admin_url( 'admin-ajax.php' ),
'nonce' => wp_create_nonce( 'hfe-admin-nonce' ),
'popup_dismiss' => false,
'data_source' => 'HFE',
];
$strings = apply_filters( 'hfe_admin_strings', $strings );
wp_localize_script(
'hfe-admin-script',
'hfe_admin_data',
$strings
);
}
/**
* Adds a tab in plugin submenu page.
*
* @since 1.6.0
* @param string $views to add tab to current post type view.
*
* @return mixed
*/
public function hfe_settings( $views ) {
$this->hfe_tabs();
$this->hfe_modal();
return $views;
}
/**
* Function for registering the settings api.
*
* @since 1.6.0
* @return void
*/
public function hfe_admin_init() {
register_setting( 'hfe-plugin-options', 'hfe_compatibility_option' );
add_settings_section( 'hfe-options', __( 'Add Theme Support', 'header-footer-elementor' ), [ $this, 'hfe_compatibility_callback' ], 'Settings' );
add_settings_field( 'hfe-way', 'Methods to Add Theme Support', [ $this, 'hfe_compatibility_option_callback' ], 'Settings', 'hfe-options' );
register_setting( 'hfe-plugin-guide', 'hfe_guide_email' );
register_setting( 'hfe-plugin-guide', 'hfe_guide_fname' );
}
/**
* Call back function for the ssettings api function add_settings_section
*
* This function can be used to add description of the settings sections
*
* @since 1.6.0
* @return void
*/
public function hfe_compatibility_callback() {
_e( 'The Elementor Header & Footer Builder plugin need compatibility with your current theme to work smoothly.Following are two methods that enable theme support for the plugin.Method 1 is selected by default and that works fine almost will all themes. In case, you face any issue with the header or footer template, try choosing Method 2.', 'header-footer-elementor' );
}
/**
* Call back function for the ssettings api function add_settings_field
*
* This function will contain the markup for the input feilds that we can add.
*
* @since 1.6.0
* @return void
*/
public function hfe_compatibility_option_callback() {
$hfe_radio_button = get_option( 'hfe_compatibility_option', '1' );
wp_enqueue_style( 'hfe-admin-style', HFE_URL . 'admin/assets/css/ehf-admin.css', [], HFE_VER );
?>
post_type || 'appearance_page_hfe-guide' === $current_screen->id || 'appearance_page_hfe-about' === $current_screen->id || 'appearance_page_hfe-settings' === $current_screen->id ) );
if ( $is_elementor_screen ) {
$footer_text = sprintf(
/* translators: 1: Elementor, 2: Link to plugin review */
__( 'Help us spread the word about the plugin by leaving %2$s %1$s %3$s ratings on %2$s WordPress.org %3$s. Thank you from the Brainstorm Force team!', 'header-footer-elementor' ),
'★★★★★',
'',
''
);
}
return $footer_text;
}
/**
* Function for theme support tab
*
* @since 1.6.0
* @return void
*/
public function get_themes_support() {
?>
output_about_info();
$this->output_about_addons();
}
/**
* Display the General Info section of About tab.
*
* @since 1.6.0
*/
protected function output_about_info() {
?>