Skip to content

Instantly share code, notes, and snippets.

Diego Vagnoli bluantinoo

Block or report user

Report or block bluantinoo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@bluantinoo
bluantinoo / wp-disable-plugin-update.php
Created Apr 12, 2019 — forked from rniswonger/wp-disable-plugin-update.php
WordPress - Disable specific plugin update check
View wp-disable-plugin-update.php
/**
* Prevent update notification for plugin
* http://www.thecreativedev.com/disable-updates-for-specific-plugin-in-wordpress/
* Place in theme functions.php or at bottom of wp-config.php
*/
function disable_plugin_updates( $value ) {
if ( isset($value) && is_object($value) ) {
if ( isset( $value->response['plugin-folder/plugin.php'] ) ) {
unset( $value->response['plugin-folder/plugin.php'] );
}
View darkify_slack.sh
#!/bin/sh
# Darkify Slack on Mac OS or Linux.
# curl https://gist.githubusercontent.com/ryanpcmcquen/8a7ddc72460eca0dc1f2dc389674dde1/raw/darkify_slack.sh | sh
if [ "`uname -s`" = "Darwin" ]; then
SLACK_INTEROP_JS="/Applications/Slack.app/Contents/Resources/app.asar.unpacked/src/static/ssb-interop.js"
else
SLACK_INTEROP_JS="/usr/lib/slack/resources/app.asar.unpacked/src/static/ssb-interop.js"
fi
@bluantinoo
bluantinoo / child-theme-functions-php-snippet.php
Created Jul 6, 2017 — forked from lots0logs/child-theme-functions-php-snippet.php
WordPress :: Divi Builder :: Fullwidth Portfolio Module :: Custom Links
View child-theme-functions-php-snippet.php
<?php
/* DON'T copy the first line (above) if your functions.php already has it.
* ---------------------------------------------------------------------- */
function my_et_theme_setup() {
if ( class_exists( 'ET_Builder_Module_Fullwidth_Portfolio' ) && file_exists( 'my-main-modules.php' ) ) {
get_template_part( 'my-main-modules' );
$et_pb_fullwidth_portfolio = new My_ET_Builder_Module_Fullwidth_Portfolio();
remove_shortcode('et_pb_fullwidth_portfolio');
add_shortcode('et_pb_fullwidth_portfolio', array( $et_pb_fullwidth_portfolio, '_shortcode_callback' ) );
@bluantinoo
bluantinoo / functions.php
Created Jul 6, 2017 — forked from lots0logs/functions.php
WordPress :: Divi Builder :: Filterable Portfolio Module :: Show Lightbox On-Click
View functions.php
<?php
/* DON'T copy the first line (above) if your functions.php already has it.
* ---------------------------------------------------------------------- */
function my_et_theme_setup() {
if ( class_exists( 'ET_Builder_Module_Filterable_Portfolio' ) ) {
get_template_part( 'my-main-modules' );
$et_pb_filterable_portfolio = new My_ET_Builder_Module_Filterable_Portfolio();
remove_shortcode('et_pb_filterable_portfolio');
add_shortcode('et_pb_filterable_portfolio', array( $et_pb_filterable_portfolio, '_shortcode_callback' ) );
@bluantinoo
bluantinoo / gist:3e4c8a82da8b0a187904472ed0e8f1a8
Created Oct 13, 2016 — forked from jonathanmoore/gist:2640302
Get the share counts from various APIs
View gist:3e4c8a82da8b0a187904472ed0e8f1a8

Share Counts

I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.

If you want to roll up all of these into a single jQuery plugin check out Sharrre

Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.

Twitter

View gf_analytics.php
<?php
function analytics_confirmation($confirmation, $form, $entry, $ajax = 0)
{
$isProduct = false;
foreach ($form['fields'] as $field) {
if ($field['type'] == 'product') {
$isProduct = true;
$fieldID = $field['id'];
$productSKU = $form['id'] . '-' . str_replace(" ", "_", $field['label']);
break;
You can’t perform that action at this time.