Skip to content

Instantly share code, notes, and snippets.

View Ataurr's full-sized avatar
🎯
Focusing

Ataur Rahman Ataurr

🎯
Focusing
View GitHub Profile
/**
* 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' );
/** @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')
);
}
}
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')));
}
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 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;
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 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>
/* ----------------------------------------------------------------------------------- */
/* 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
<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"]
function remove_subscribers() {
global $wpdb;
$args = array( 'role' => 'Subscriber' );
$subscribers = get_users( $args );
if ( !empty( $subscribers ) ) {
require_once( ABSPATH . 'wp-admin/includes/user.php' );
$i = 0;
foreach ( $subscribers as $subscriber ) {