Skip to content

Instantly share code, notes, and snippets.

/**
* Adds a new tab in the affiliate account.
*
* @param array $tabs
*
* @return array
*
*/
function slicewp_custom_affiliate_account_tabs_custom_tab( $tabs ) {
/**
* Register my custom email templates
*
* @param array $email_templates
*
* @return array
*
*/
function slicewp_register_my_custom_email_templates( $email_templates ) {
<?php
/**
*
* SliceWP Email Template Name: My Custom Email Template
*
*/
?>
<style>
/* -------------------------------------
* GLOBAL RESETS
* ------------------------------------- */
img {
border: none;
-ms-interpolation-mode: bicubic;
max-width: 100%;
<!-- START LOGO -->
<?php $email_logo = slicewp_get_setting( 'email_logo' ); ?>
<?php if( ! empty( $email_logo ) ): ?>
<div class="logo">
<img src="<?php echo esc_url( $email_logo ); ?>" style="max-width: 200px; height: auto;" />
</div>
<?php endif; ?>
<!-- END LOGO -->
<!-- START MAIN CONTENT AREA -->
<?php
/**
*
* SliceWP Email Template Name: My Custom Email Template
*
*/
?>
<!doctype html>
<html>
/**
* Social Pug: Force the large image size to be loaded for the post Pinterest hidden image
*
* Tailwind does not recognize small images, thus we need to load larger images for Tailwind
*
*/
function dpsp_post_pinterest_image_hidden_size_to_large( $size ) {
return 'large';
}
add_filter( 'dpsp_post_pinterest_image_hidden_size', 'dpsp_post_pinterest_image_hidden_size_to_large' );
function dpsp_post_pinterest_image_hidden_size_to_full( $size ) {
return 'full';
}
add_filter( 'dpsp_post_pinterest_image_hidden_size', 'dpsp_post_pinterest_image_hidden_size_to_full' );
function dpsp_post_pinterest_image_hidden_size_to_medium( $size ) {
return 'medium';
}
add_filter( 'dpsp_post_pinterest_image_hidden_size', 'dpsp_post_pinterest_image_hidden_size_to_medium' );
@media screen and ( max-width: 720px ) {
#dpsp-floating-sidebar { display: block !important; left: auto !important; right: 0 !important; }
#dpsp-floating-sidebar .dpsp-networks-btns-wrapper .dpsp-network-btn { border-bottom-right-radius: 0 !important; border-top-right-radius: 0 !important; border-bottom-left-radius: 4px !important; border-top-left-radius: 4px !important; }
}