Skip to content

Instantly share code, notes, and snippets.

@Rayken
Rayken / elementor-linkable-columns.php
Last active June 23, 2022 08:55
Small plugin to enable linkable columns in Elementor (SEO friendly and "natively")
<?php
/**
* Plugin Name: Elementor Linkable Columns
* Description: Elementor extension that enables linkable columns.
* Version: 1.0.1
* Author: Rayken
* Text Domain: elementor-linkable-columns
*/
/*
<?php
/* highlight keywords */
function my_highlight_search( $text ) {
if( is_search() ){
$keys = implode( '|', explode( ' ', get_search_query() ) );
$text = preg_replace( '/(' . preg_quote ( $keys ) .')/iu', '<span class="search-term">\0</span>', $text );
}
return $text;
}
@Rayken
Rayken / functions.php
Last active December 18, 2015 00:39
Quick attempt at a zippyshare shortcode thingy for traplin @ #wordpress
<?php
// Example: [zippy url="http://www5.zippyshare.com/v/13844744/file.html/"]
function zippyshare_shortcode( $atts ) {
extract( shortcode_atts( array(
'url' => null,
'textColor' => '#ffffff',
'bgColor' => '#000000',
'playColor' => '#f58300',
'waveColor' => '#ffffff',
'borderColor' => '#000000',
@Rayken
Rayken / wp-console-debug.php
Last active December 17, 2015 22:49
Debugging WordPress with the JavaScript Console
<?php
/**
* WordPress Console Debug
*
* Debug PHP using the JavaScript console.
* Enable this plugin and view your console for more information on how to use it.
*
* @package WP_console_debug
* @author DRSK
* @license WTFPL