Skip to content

Instantly share code, notes, and snippets.

Avatar

Bruno Bouyajdad indikatordesign

View GitHub Profile
@indikatordesign
indikatordesign / functions.php
Last active Dec 15, 2018
[WordPress 5(+) - Remove Builder Info]
View functions.php
<?php
if ( is_admin() ) :
add_action( 'current_screen', function( $hook )
{
if ( 'edit' == $hook->base ) :
add_action( 'admin_print_styles', function()
@indikatordesign
indikatordesign / plugins-handler.js
Last active Aug 10, 2018
EMP EDD Plugin Updater - Another Approach
View plugins-handler.js
(function($){$(function(){
class prefixUpdater
{
setProperties()
{
this.red = '#fff0f0';
this.green = '#f1fff0';
@indikatordesign
indikatordesign / functions.php
Last active Apr 14, 2018
[WordPress - Imprint and Privacy on login]
View functions.php
<?php
add_action( 'login_footer', function()
{
$imprint = site_url( 'imprint' ); // change imprint with your page-slug
$privacy = site_url( 'privacy' ); // change privacy with your page-slug
echo <<<LINKS
@indikatordesign
indikatordesign / functions.php
Last active Mar 15, 2018
[Divi Layout Shortcode]
View functions.php
<?php
// Add layouts to the Divi library and get the ID from the corresponding URL
// To get your results, you can add a shortcode to text fields as follows: [divi-layout id="7"]
add_shortcode( 'divi-layout', function( $atts )
{
$atts = shortcode_atts( [ 'id' => '', ], $atts );
@indikatordesign
indikatordesign / functions.php
Last active Mar 19, 2020
[Divi - Change the order for the default filterable portfolio module]
View functions.php
<?php
// Add this snippet to your themes "functions.php" to order the projects by title
add_action( 'parse_query', function( $vars )
{
if ( 'project' == $vars->query['post_type'] )
{
@indikatordesign
indikatordesign / functions.php
Last active Jan 31, 2018
[Combine "Divi - Filterable Blog Module" with the "Events Manager" plugin]
View functions.php
<?php
// Here you can see how to combine "Divi - Filterable Blog Module" with the free plugin "Events Manager": https://wordpress.org/plugins/events-manager/
// Just add these snippets to your themes functions.php and change them according to your needs.
// Combine Event Manager with "Divi – Filterable Blog Module" by changing the $query_args
// If you use it like this, the sorting starts with the current event and past events will be hidden automatically
add_filter( 'dfbm_query_args_output', function( $query_args )
{
@indikatordesign
indikatordesign / class-license.php
Last active Dec 30, 2017
[Indikator Design - EMP License Key Registration] Needs to run in WordPress
View class-license.php
<?php
/**
* Do not allow direct access
*
* @since 1.0.0
*/
if ( ! defined( 'ABSPATH' ) ) die( 'Don\'t try to load this file directly!' );
/**
* Indikator Design - EMP License Key Registration
@indikatordesign
indikatordesign / open-mail.js
Last active Sep 9, 2017
[Mask email]Trigger to open email-client by clicking on an image using jQuery.
View open-mail.js
(function($){
$(function(){
"use strict";
$( '#e-placeholder' ).find( 'img' ).on( 'click', function()
{
var link = $( '<a />',
{
id : 'e-remove',
href : 'mailto:my-mail@my-domain.com?Subject=I want to get in touch with you!&body=My message to you.',
@indikatordesign
indikatordesign / functions.php
Last active Apr 17, 2020
[WooCommerce Subscriptions]Disallow downgrading for "WooCommerce Subscriptions" Grouped Product-Subscriptions
View functions.php
<?php
// Prevent Downgrading
add_filter( 'woocommerce_subscriptions_switch_is_identical_product', function( $is_identical_product, $product_id, $quantity, $variation_id, $subscription, $item )
{
if ( wc_get_product( (int) $product_id )->get_price() < $item->get_product()->get_price() )
{
$is_identical_product = true;
@indikatordesign
indikatordesign / functions.php
Last active Sep 9, 2017
[Shortcode-Finder]Fork of the shortcode-finder described by wpbeginner.com
View functions.php
<?php
// This is a fork of the shortcode-finder described in this useful post: http://www.wpbeginner.com/wp-tutorials/how-to-find-and-remove-unused-shortcodes-from-wordpress-posts/
// Just add the snippet in your themes functions.php. You can use this shortcode in a post or page, as shown in the following example:
// [find_shortcode name='et_pb_dfbm_blog']
add_shortcode( 'find_shortcode', function( $atts, $content = false )
{
You can’t perform that action at this time.