Skip to content

Instantly share code, notes, and snippets.

View jeherve's full-sized avatar
🚀
👨‍🏭

Jeremy Herve jeherve

🚀
👨‍🏭
View GitHub Profile
@jeherve
jeherve / plugin.php
Last active February 7, 2017 02:00
[Jetpack] Add tracking parameters to a post URL, and then have that tracked URL shortened by goo.gl, and then use that short URL in sharing buttons
<?php
/**
* Overwrite the links used in Jetpack's Sharing module.
*
* @see https://wordpress.org/support/topic/how-to-use-utm-codes-with-jetpack-sharing
*
* @param string $url
* @param int $post_id
* @param int $sharing_id
* @filter sharing_permalink
@jeherve
jeherve / plugin.php
Created November 16, 2015 20:26
[Jetpack] Move Jetpack's sharing buttons from their default location to right under Woocommerce's product image.
<?php
/**
* Move Jetpack's sharing buttons from their default location to right under Woocommerce's product image
*
* @see http://jetpack.me/2013/06/10/moving-sharing-icons/
* @see http://businessbloomer.com/woocommerce-move-jetpack-social-sharing-single-product-page-tabs/ for an alternative placement
*/
function jeherve_move_jp_sharing_icons_woo() {
// Start by checking if Jetpack's sharing buttons are actually in use on the site
@jeherve
jeherve / plugin.php
Created June 10, 2015 19:34
Disable Jetpack's Twitter Meta Tags
<?php
/*
* Plugin Name: Disable Jetpack's Twitter Meta Tags
* Plugin URI: http://wordpress.org/plugins/
* Description: Disable Jetpack's Twitter Meta Tags
* Author: Jeremy Herve
* Version: 1.0
* Author URI: http://jeremy.hu
* License: GPL2+
*/
@jeherve
jeherve / plugin.php
Last active May 14, 2016 00:59
[Jetpack] Remove all CSS.
<?php
// First, make sure Jetpack doesn't concatenate all its CSS
add_filter( 'jetpack_implode_frontend_css', '__return_false' );
// Then, remove each CSS file, one at a time
// You probably won't need them all, unless you use all the modules, and all the themes! :)
// Some of these are also only loaded on specific admin pages, so it wouldn't affect your readers
function jeherve_remove_all_jp_css() {
wp_deregister_style( 'AtD_style' ); // After the Deadline
@jeherve
jeherve / style.css
Created August 11, 2014 23:19
[Jetpack] Wide Infinite Scroll container
#infinite-footer .container {
width: 100%;
}
@jeherve
jeherve / plugin.php
Created July 23, 2014 10:32
[Jetpack] Verify your site with Facebook by adding an admin meta tag to the head of your site. Works when Jetpack is enabled. http://i.wpne.ws/WiUs
<?php
/*
* Plugin Name: Verify your site with Facebook
* Plugin URI: http://wordpress.org/plugins
* Description: Verify your site with Facebook by adding an admin meta tag to the head of your site. Works when Jetpack is enabled.
* Author: Jeremy Herve
* Version: 1.0
* Author URI: http://jeremy.hu
* License: GPL2+
*/
@jeherve
jeherve / plugin.php
Last active September 11, 2016 03:00
[Jetpack] Remove the Youtube shortcode
<?php
/*
* Plugin Name: Remove Jetpack's Youtube shortcode
* Plugin URI: http://wordpress.org/extend/plugins/jetpack/
* Description: Removes Jetpack's Youtueb shortcode
* Author: Jeremy Herve
* Version: 1.0
* Author URI: http://jeremyherve.com
* License: GPL2+
*/
@jeherve
jeherve / plugin.php
Last active August 29, 2015 14:02
[Jetpack] Change og:title value to be all uppercase
<?php
/*
* Plugin Name: Uppercase og:title for Jetpack
* Plugin URI: http://wordpress.org/extend/plugins/jetpack/
* Description: Removes Jetpack's default og:title tag, and replaces it with an uppercase og:title
* Author: Jeremy Herve
* Version: 1.0
* Author URI: http://jeremyherve.com
* License: GPL2+
*/
@jeherve
jeherve / style.css
Created March 28, 2014 20:50
Notes off
#wpadminbar #wp-admin-bar-notes, .dash-header #wp-admin-bar-notes, #newnavwrapper #wp-admin-bar-notes {
display:none;
}
@jeherve
jeherve / style.css
Created March 28, 2014 20:49
Youtube - hide " this account is managed by"
div#confirmBox { display: none; }