Skip to content

Instantly share code, notes, and snippets.

@farookibrahim
farookibrahim / functions.php
Created April 12, 2016 08:48
Woozone Plugin ListView Compatibility for MC
<?php
function mc_product_list_view_buy_url_make() {
?>
<script type="text/javascript">
jQuery(document).ready(function ($) {
var $products = $('#list-view').find('.product_type_external'),
$prod_info = $('#list-view').find('.wwcAmzAff-product-buy-url');
if ( $products.length > 0 && $prod_info.length > 0 ) { // products list page
@farookibrahim
farookibrahim / functions.php
Created April 20, 2016 06:24
Unicase Author Attribute Display on Single Product Page
<?php
if ( ! function_exists( 'uc_custom_product_single_author_info' ) ) {
function uc_custom_product_single_author_info() {
global $product;
$product_id = isset($product_id) ? $product_id : $product->id;
$terms = get_the_terms( $product_id, 'author' ); // Taxonomy Slug of Created Author Attribute
$author_info = '';
@farookibrahim
farookibrahim / functions.php
Created April 25, 2016 09:09
Unicase Checkout Numbering Customize
if( ! function_exists( 'unicase_checkout_login_message' ) ) {
function unicase_checkout_login_message( $message ) {
return $message;
}
}
if( ! function_exists( 'unicase_checkout_coupon_message' ) ) {
function unicase_checkout_coupon_message( $message ) {
$step = '<span>1</span>';
@farookibrahim
farookibrahim / functions.php
Last active May 10, 2016 14:11
Bethlehem Team Members Social Block Customize
if ( !function_exists( 'our_team_member_single_social_links' ) ) {
function our_team_member_single_social_links() {
if ( apply_filters( 'enable_single_team_member_social', TRUE ) ) :
$twitter = get_post_meta( get_the_ID(), '_twitter', true );
$facebook = get_post_meta( get_the_ID(), '_facebook', true );
$skype = get_post_meta( get_the_ID(), '_skype', true );
$mail = get_post_meta( get_the_ID(), '_contact_email', true );
$tel = get_post_meta( get_the_ID(), '_tel', true );
$url = get_post_meta( get_the_ID(), '_url', true );
@farookibrahim
farookibrahim / functions.php
Created May 10, 2016 15:05
Unicase Social Share Icons Customize
add_filter( 'unicase_single_post_social_icons_args', 'uc_custom_single_post_social_share_icons_args' );
function uc_custom_single_post_social_share_icons_args() {
$single_post_social_icons_args = array(
'facebook' => array(
'share_url' => 'http://www.facebook.com/sharer.php',
'icon' => 'fa fa-facebook',
'name' => esc_html__( 'Facebook', 'unicase' ),
'params' => array(
'u' => 'url'
@farookibrahim
farookibrahim / home-v1.html
Last active May 23, 2016 17:08
Bethlehem Home page Content
[vc_row el_class="wow fadeIn wrap"][vc_column][bethlehem_recent_posts_widget type="type-1" limit="4"][/vc_column][/vc_row][vc_row el_class="wow fadeIn wrap"][vc_column][bethlehem_testimonials orderby="title" limit="10"][/vc_column][/vc_row][vc_row full_width="stretch_row_content_no_spaces" parallax="content-moving" parallax_image="1819" css=".vc_custom_1448456521336{margin-top: 0px !important;margin-bottom: 75px !important;}"][vc_column][bethlehem_donation_carousel orderby="date" order="DESC" limit="5"][/vc_column][/vc_row][vc_row el_class="wow fadeIn wrap"][vc_column width="1/2"][bethlehem_sermons_carousel type="type-1" orderby="date" order="DESC" title="Sermons" limit="5" archive_link_text="Archive of Sermons"][/vc_column][vc_column width="1/2"][bethlehem_events_list_widget limit="3"][/vc_column][/vc_row]
@farookibrahim
farookibrahim / functions.php
Created May 31, 2016 12:04
Sermons Media Icons
if( ! function_exists( 'sermons_post_format_icons' ) ) {
function sermons_post_format_icons() {
$show_post_icons = apply_filters( 'show_sermons_post_icons', TRUE );
$enable_download = apply_filters( 'enable_sermons_download', TRUE );
$enable_audio = apply_filters( 'enable_sermons_audio', TRUE );
$enable_video = apply_filters( 'enable_sermons_video', TRUE );
if( $show_post_icons ) :
$post_format = get_post_format();
@farookibrahim
farookibrahim / functions.php
Created June 8, 2016 07:26
Unicase Checkout wrapper when shipping block and order notes disabled
add_filter('woocommerce_enable_order_notes_field', '__return_false');
if( wc_ship_to_billing_address_only() && ! apply_filters( 'woocommerce_enable_order_notes_field', true ) ) {
if( ! function_exists( 'unicase_customer_shipping_wrapper_start' ) ) {
function unicase_customer_shipping_wrapper_start() {}
}
if( ! function_exists( 'unicase_customer_shipping_wrapper_end' ) ) {
function unicase_customer_shipping_wrapper_end() {}
}
@farookibrahim
farookibrahim / footer-1.php
Created June 23, 2016 06:54
MyBag add newsletter block for Footer v1
@farookibrahim
farookibrahim / functions.php
Created July 14, 2016 11:48
How to use separate logo for MyBag Home v2?
if ( ! function_exists( 'mybag_custom_home_v2_logo' ) ) {
function mybag_custom_home_v2_logo( $logo ) {
if( is_front_page() ) {
$logo = '<img alt="logo" src="http://www.example.com/logo.png" />';
}
return $logo;
}
}