Skip to content

Instantly share code, notes, and snippets.

View abubackerbsc's full-sized avatar

Abu Backer abubackerbsc

View GitHub Profile
@abubackerbsc
abubackerbsc / Function.php
Last active June 26, 2019 14:51
Vodi - Single movie, episode and archive movies, tv shows ads
add_action( 'masvideos_single_movie_summary', 'vodi_template_single_movie_ads', 61 );
function vodi_template_single_movie_ads() {
$style = vodi_get_single_movie_style();
if ( 'v2' === $style ) {
?><div class="single-movie ads"><img src="https://placehold.it/340x340" alt="Ads" /></div><?php
}
}
add_action( 'masvideos_after_tv_shows_loop', 'vodi_template_tv_shows_ads', 21 );
function vodi_template_tv_shows_ads() {
add_filter( 'uneno_order_confirmation_note_args', 'un_child_order_cod_confirmation_message' );
function un_child_order_cod_confirmation_message( $args ) {
$payment_method = WC()->session->chosen_payment_method;
if( $payment_method == 'cod') {
$args['title'] = esc_html__( 'Your order is Confirmed', 'uneno' );
$args['sub-title'] = esc_html__( 'Please Keep Your Cash ready we will collect the cash at the time of delivery', 'uneno' );
}
return $args;
}
.quick_buy_button {
color: #fff;
font-weight: 700;
font-size: 1em;
background-color: #fed700;
}
.single-product .quick_buy_button {
padding: 1.036em 3.434em;
}
add_action( 'woocommerce_single_product_summary', 'electro_template_loop_product_sku', 10 );
@abubackerbsc
abubackerbsc / Function.php
Created June 17, 2019 12:19
Electro Departments Menu Open by default for Shop
if ( ! function_exists( 'electro_departments_menu_v2' ) ) {
/**
* @since 2.0
*/
function electro_departments_menu_v2() {
$calling_action = current_filter();
if ( 'electro_navbar_v2' === $calling_action ) {
@abubackerbsc
abubackerbsc / Function.php
Created June 17, 2019 11:32
Electro - Add mobile number in header
if ( ! function_exists( 'electro_header_mobile_number' ) ) {
function electro_header_mobile_number() {
$header_mobile_number = apply_filters( 'electro_header_mobile_number', 'Your mobile number' );
?><div class="header-icon">
<p class="header_mobile_number"><?php echo wp_kses_post( $header_mobile_number ); ?></p>
</div><?php
}
}
add_action( 'electro_header_icons', 'electro_header_mobile_number', 65 );
add_action( 'woocommerce_single_product_summary', 'electro_template_loop_product_sku', 20 );
@abubackerbsc
abubackerbsc / Style.css
Created June 1, 2019 06:19
Electro - add background image in footer
.footer-bottom-widgets,
.handheld-footer,
.copyright-bar {
background-color: #000 !important;
}
.handheld-footer .handheld-footer-bar {
background-color: transparent !important;
}
@abubackerbsc
abubackerbsc / Dark Background Style.css
Last active May 31, 2019 12:29
Electro - add background image in header
.site-header,
.top-bar {
background-color: #000 !important;
}
.site-header .header-icon>a,
.site-header .header-icon>a i,
.top-bar .nav-inline .menu-item>a,
.secondary-nav>.menu-item a,
.secondary-nav>.menu-item a:focus,
@abubackerbsc
abubackerbsc / Function.php
Created May 21, 2019 12:22
Electro - add Gmail social icon in footer
add_filter( 'electro_set_social_networks', 'ec_child_add_icon', 90 );
function ec_child_add_icon( $args ) {
$args['gmail'] = array(
'label' => 'gmail',
'icon' => 'far fa-envelope',
'id' => 'gmail_link',
'link' => 'https://accounts.google.com/'
);