Skip to content

Instantly share code, notes, and snippets.

View Ataurr's full-sized avatar
🎯
Focusing

AtaurR Ataurr

🎯
Focusing
View GitHub Profile
<div class = "contact-content">
<div class = "row">
<div class = "form-group col-sm-6 name-field">
[text* Name class:form-control placeholder "Name"]
</div>
<div class = "form-group col-sm-6 email-field">
[email* Email class:form-control placeholder "EmaIl ID"]
</div>
<div class = "form-group col-sm-12">
[textarea* TextArea class:form-control placeholder "Your Message"]
/* ----------------------------------------------------------------------------------- */
/* Update check awebooking
/*----------------------------------------------------------------------------------- */
//include_once(ABSPATH.'wp-admin/includes/plugin.php');
if ( ! function_exists( 'is_plugin_active' ) ){
require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
}
if (is_plugin_active('awebooking/init.php')) {
// check the latest Aweooking version
function accommodation_search_forms($form) {
$form = '
<div class="search-widget search-form">
<form method="get" class="searchform" action="' . esc_url(home_url('/')) . '" id="search">
<div class="input-group">
<span class="input-group-addon"><span class="glyphicon glyphicon-search"></span></span>
<input type="text" name="s" class="form-control" placeholder="' . esc_attr__('Search...', 'accommodation') . '" value="' . get_search_query() . '">
</div>
</form>
function _error_debug() {
if ($error = error_get_last()) {
/**
* Usage:
* 1. Create a link here https://beeceptor.com/
* 2. Paste it in $url
* 3. Reproduce the error
* 4. Refresh http://requestb.in/.../inspect and check Request Body (at bottom)
*/
function filter_caldera_forms_get_form_templates($tmpl) {
$tmpl = array(
'starter_contact_form' => array(
'name' => __('Starter Contact Forms', 'caldera-forms'),
'template' => include CFCORE_PATH . 'includes/templates/starter-contact-form.php'
),
);
return $tmpl;
if (function_exists('_filter_startup_essentials')) {
remove_filter('fw_extensions_locations', '_filter_startup_essentials');
}
function _filter_startuplanding_mega_menu_icon($args) {
$args['type'] = 'new-icon';
return $args;
}
function startuplanding_admin_menu() {
global $wp_admin_bar;
$menu_id = 'xs';
$wp_admin_bar->add_menu(array('id' => $menu_id, 'title' => 'xs', 'href' => '#'));
$wp_admin_bar->add_menu(array('parent' => $menu_id, 'title' => __('Theme Settings'), 'id' => 'xs-theme-settings', 'href' => admin_url('admin.php?page=fw-settings')));
$wp_admin_bar->add_menu(array('parent' => 'xs-theme-settings', 'title' => __('Styling'), 'id' => 'xs-styling-settings', 'href' => admin_url('admin.php?page=fw-settings#fw-options-tab-styling_settings'), 'meta' => array('title' => 'Change color or fonts')));
$wp_admin_bar->add_menu(array('parent' => $menu_id, 'title' => __('Unyson Extensions'), 'id' => 'xs-unyson-extensions', 'href' => admin_url('admin.php?page=fw-extensions')));
}
/** @internal */
function _action_theme_fw_settings_render($data) {
if ($data['side_tabs']) {
wp_enqueue_style(
'theme-custom-fw-settings-side-tabs',
// http://manual.unyson.io/en/latest/helpers/php.html#fw-locate-theme-path-uri
fw_locate_theme_path_uri('assets//css/fw-settings-side-tabs.css')
);
}
}
/**
* override loader image of unyson framework
*/
function _filter_core_loader_uri() {
return get_stylesheet_directory_uri() . '/assets/img/loading.gif';
}
add_filter( 'fw_loader_image', '_filter_core_loader_uri' );
@Ataurr
Ataurr / Add Unyson custom fonts in font list
Last active October 7, 2020 06:51
Add Unyson custom fonts in font list
`function _filter_theme_add_hind_google_font($fonts) {
if(defined('FW')) {
return '';
}
$fonts['Roboto'] = array(
'family' => 'Roboto',
'variants' => array( 400, 700 ),
);
ksort($fonts);