Skip to content

Instantly share code, notes, and snippets.

View ericakfranz's full-sized avatar

Erica Franz ericakfranz

View GitHub Profile
@ericakfranz
ericakfranz / soliloquy-lightbox.php
Last active August 29, 2015 14:10
Soliloquy - Lightbox Link Captions
/**
* Plugin Name: Soliloquy - Lightbox Link Captions
* Plugin URI: http://soliloquywp.com
* Version: 1.0
* Author: Erica Franz
* Author URI: http://fatpony.me
* Description: Link captions to image and open in lightbox.
*/
/**
@ericakfranz
ericakfranz / om-author-archive.php
Created December 29, 2014 19:58
Load OptinMonster optin on author archive only
add_filter( 'optin_monster_output', 'ekf_om_modify_output', 10, 2 );
function ekf_om_modify_output( $init, $optin ) {
// Replace 'optin-slug' with your own optin slug which can be found in the OptinMonster Overview list
if ( is_author() ) {
$init['optin-slug'] = Optin_Monster_Output::get_instance()->get_optin_monster( $optin->ID );
}
return $init;
}
@ericakfranz
ericakfranz / soliloquy-titled-caption.php
Last active August 29, 2015 14:12
Add Soliloquy slide title to caption output
/**
* Plugin Name: Soliloquy - Titled Captions
* Plugin URI: http://soliloquywp.com
* Version: 1.0
* Author: Erica Franz
* Author URI: http://fatpony.me/
* Description: Add Soliloquy slide title to caption output
*/
/**
@ericakfranz
ericakfranz / soliloquy-globally-titled.php
Last active August 29, 2015 14:13
Output Title of Soliloquy Slider before images and container.
/**
* Plugin Name: Globally Titled Soliloquy
* Plugin URI: http://soliloquywp.com
* Version: 1.0
* Author: Erica Franz
* Author URI: http://fatpony.me/
* Description: Display Soliloquy Slider Title before slider - globally.
*/
add_filter( 'soliloquy_output_start', 'ekf_titled_soliloquy', 10, 2 );
<?php
add_filter( 'optinmonster_output', 'limit_views' );
function limit_views ( $optins ) {
// Replace this with your optin slug
$optin_slug = 'yf3rluqqcj-lightbox';
// Replace this with the number of views
$view_limit = 100;
<?php
/**
* Plugin Name: Soliloquy - Output Custom Slider Item Attributes
* Plugin URI: http://soliloquywp.com
* Version: 1.0
* Author: Tim Carr
* Author URI: http://www.n7studios.co.uk
* Description: Add custom HTML attributes to Soliloquy Slider <img> elements
*/
@ericakfranz
ericakfranz / soliloquy-image-dimensions.php
Last active August 29, 2015 14:14
Output specific image dimensions to Soliloquy slides, based on slider ID
/**
* Plugin Name: Soliloquy - Output Specific Images Sizes Based on Slider ID
* Plugin URI: http://soliloquywp.com
* Version: 1.0
* Author: Erica Franz
* Author URI: http://fatpony.me/
* Description: Output specific image dimensions to Soliloquy slides, based on slider ID
*/
/**
@ericakfranz
ericakfranz / remove-version-query-string.php
Created January 24, 2015 19:53
Remove version query string from WordPress files.
//* Remove version number from js and css files, keep other variables intact.
function remove_cssjs_ver( $src ) {
if( strpos( $src, '?ver=' ) )
$src = remove_query_arg( 'ver', $src );
return $src;
}
add_filter( 'style_loader_src', 'remove_cssjs_ver', 10, 2 );
add_filter( 'script_loader_src', 'remove_cssjs_ver', 10, 2 );
@ericakfranz
ericakfranz / soliloquy_crop_image_args.php
Created January 29, 2015 20:45
Filter Soliloquy Crop Defaults
function soliloquy_crop_change_args( $args ) {
$args = array(
'position' => 'b', // crop position, b = bottom, c = center, t = top, default is center
'width' => '1200', // cropped image width
'height' => '300', // cropped image height
'quality' => 100, // cropped image quality
'retina' => true // make allowance for retina (produces cropped images at twice the dimension size set), default is false
);
@ericakfranz
ericakfranz / optinmonster-image-sizes.php
Last active August 29, 2015 14:14 — forked from thomasgriffin/gist:971e2ebc33118ea49bdc
Unset images sizes for all OptinMonster optin themes, install as plugin.
<?php
/**
* Plugin Name: OptinMonster Unset Images Sizes
* Plugin URI: http://optinmonster.com/
* Description: Disable the custom image sizes used in the OptinMonster themes. Optins will use full image size instead.
* Version: 1.0.0
* Author: Erica Franz
* Author URI: https://fatpony.me/
* License: GPL2
*/