Skip to content

Instantly share code, notes, and snippets.

Avatar

advokatb

  • Ukraine
View GitHub Profile
View [Devise] Жилищные споры.txt
#cookie-notice {min-width:100%!important}
.box-white {
background-color: #FFFFFF;
}
.box3, .box5, .box7 {
background: #F0EFF5 !important;
}
.gotham-lite {
font-family: "Gotham Pro Light", sans-serif !important;
}
View Defaults for Elementor.php
<?php
'default' => '',
'default' => [
'unit' => 'px',
'size' => 10,
],
'default' => [
'top' => '20',
'right' => '20',
'bottom' => '20',
View hover-effects.css
.quickfinder .gem-icon .icon-hover-bg.fill-out {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
transform: scale(0);
-o-transform: scale(0);
-ms-transform: scale(0);
-moz-transform: scale(0);
View Elementor Tabs.php
<?php
$control->start_controls_tabs( 'container_tabs' );
$control->start_controls_tab( 'container_tab_normal', [ 'label' => __( 'Normal', 'thegem' ), ] );
$control->end_controls_tab();
$control->start_controls_tab( 'container_tab_hover', [ 'label' => __( 'Hover', 'thegem' ), ] );
$control->end_controls_tab();
@advokatb
advokatb / email_if_ordertotal.php
Created Sep 19, 2019
WooCommerce New order notification if order total bigger than value
View email_if_ordertotal.php
<?php
// New order notification if order total bigger than value
add_action( 'woocommerce_checkout_order_processed', 'devise_email_if_ordertotal_bigger_than', 20, 1 );
function devise_email_if_ordertotal_bigger_than ( $order_id ) {
$order = wc_get_order( $order_id );
$total = $order->get_total();
$total_over = 500;
View admin-bar-menu-filter.php
<?php
/**
* Change site url in admin bar
*
* @param WP_Admin_Bar $wp_admin_bar
*/
function admin_bar_menu_filter( WP_Admin_Bar $wp_admin_bar ) {
$new_url = 'site.org';
$site_name_node = $wp_admin_bar->get_nodes()['site-name'];
$site_name_node->href = $new_url;
View devise-woocommerce.php
<?php
/* Display only children of current category in Woocommerce product categories widget */
add_filter('woocommerce_product_categories_widget_args','woo_current_product_category');
function woo_current_product_category( $args ){
global $wp_query, $post, $woocommerce;
$include = array();
$category_parent = '';
@advokatb
advokatb / functions.php
Created Feb 14, 2017
Internal CSS for WordPress Homepage
View functions.php
<?php if( is_home() || is_front_page() ) : ?>
<style id="my-internal-css">
#main_content .container {
position: relative;
padding: 120px 0;
}
</style>
<?php endif; ?>
@advokatb
advokatb / Gravity Forms and Fancybox
Created Nov 10, 2015 — forked from mandiwise/Gravity Forms and Fancybox
Using Gravity Forms with a modal and ajax
View Gravity Forms and Fancybox
<div id="voting-form" style="display:none">
<?php echo do_shortcode( '[gravityform id="6" title="false" description="false" ajax="true"]' ) ?>
</div>
<a href="#voting-form" class="fancybox button">Vote Now</a>
View gist:ce6c71fcbe1e857dfd72
add_filter( 'job_manager_application_email_subject', 'custom_job_manager_application_email_subject', 10, 2 );
// This is your hooked in function. Note: the $post variable is only available after v1.11.2
function custom_job_manager_application_email_subject( $subject, $post ) {
// By default, $subject will contain: Job Application via "X" listing on X. Change that below
$subject = 'New subject';
// Return the new subject
return $subject;
}
You can’t perform that action at this time.