Skip to content

Instantly share code, notes, and snippets.

View wpflippercode's full-sized avatar

Sandeep Kumar wpflippercode

View GitHub Profile
@wpflippercode
wpflippercode / gist:b6b2df148979a779edcafb5cbe4aefa6
Created November 16, 2017 07:42
Customize Ecard Email Content & Design - Woocommerce Ecards Pro
add_filter('ecp_ecard_markup','customized_ecard_markup',10,2);
function customized_ecard_markup($defaultMarkup,$content){
// Please keep the classes name on tags as it is as they are used for generating preview in JS
$defaultMarkup = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>'.$content['website_name'].' - Ecard</title>
@wpflippercode
wpflippercode / gist:1c8c26087ce61bd8224f2c5054cb1e5a
Created November 16, 2017 07:40
Remove Visit Site Link From Ecard Email : Woocommerce Ecards Pro
add_filter( 'ecp_display_sitelink', 'do_not_display_site_link' );
function do_not_display_site_link($display){
//Return boolean value true/false to display/hide link
$display = false;
return $display;
}
@wpflippercode
wpflippercode / gist:d0f92eb6540c8da18570d95a5564ec37
Created November 15, 2017 11:52
Change the featured image slider - WP Featured Images Pro
add_filter('wfip_slider_markup','wfip_slider_markup_configuration',10,3);
function wfip_slider_markup_configuration($html,$images,$received) {
//modify slider html markup, images according to requirements.
return $html;
}
@wpflippercode
wpflippercode / gist:eff99928d8a1048a2ec576196d0f44b1
Created November 15, 2017 11:50
Change Slider Effect Or Any Other Configuration For Particular Post / Page - WP Feature Image Slider Pro
add_filter('wfip_post_type_wise_config','wfip_slider_configuration');
function wfip_slider_configuration($config) {
//modify slider configuration based on post id present in config and return updated array
return $config;
}
@wpflippercode
wpflippercode / gist:39ad04c3cb29bbed781e8861f34a6fa6
Created November 15, 2017 11:16
Change Excerpt Length Of Main Content On Image Overlay For Any Design
add_filter('design_wise_excerpt_length','change_excerpt_limit');
function change_excerpt_limit($designWiseExcerpt){
//changes in array according to requirement
return $designWiseExcerpt;
}
@wpflippercode
wpflippercode / gist:ee404676096cfbfbc978704a04606970
Created November 15, 2017 10:54
Change HTML Markup For Age Verification Popup Template
add_filter('agp_current_template_markup','agp_final_template_markup');
function agp_final_template_markup($markup) {
//change popup markup before show
return $markup;
}
@wpflippercode
wpflippercode / gist:1de1dbaeabea56c68740ea8ce1bf40a1
Created November 15, 2017 10:52
Display / Hide Age Verification Popup For Particular Post / Page
add_filter('agp_verify_age','agp_show_modal');
function agp_show_modal($show_popup,$post_id) {
//check condition according to post id & then return boolean value
return $show_popup;
}
@wpflippercode
wpflippercode / gist:5bf02524caee3d369a2d0c8921d9911c
Created November 15, 2017 10:39
Customize Plugin Settings In JS File
add_filter('agp_current_settings','agp_changed_plugin_settings');
function agp_changed_plugin_settings($settings) {
//Modify Settings According To Custom Conditions.
return $settings;
}
@wpflippercode
wpflippercode / gist:3f2212eb97c09bde1012547ffe5b35f4
Last active November 13, 2017 13:17
Update zipcode listing heading text inside product availability tab on product page
add_filter('wdap_zipcode_listing_heading','wdap_zipcpde_listing_heading');
function wdap_zipcpde_listing_heading($text) {
//Modify Zipcode Listing Heading.
return $text;
}
@wpflippercode
wpflippercode / gist:9a33446e4b4963634e3bafab8b240f39
Last active November 13, 2017 13:13
Fix marker display issue in conflicting countries having same zipcodes
add_filter('wdap_exclude_countries','excluding_countries');
function excluding_countries($countries) {
/*Return array of country codes which you want to exclude to display marker. Some countries have same zipcodes due to which markers are displayed on both countries and this represent product delivery area, however you need to display it in only one country as your deliver in one country only */
return $countries;
}