Skip to content

Instantly share code, notes, and snippets.

View gnanasekaranl's full-sized avatar

Gnanasekaran gnanasekaranl

View GitHub Profile
composer require a5hleyrich/wp-queue
@gnanasekaranl
gnanasekaranl / gettext-filter.php
Created February 22, 2021 22:06 — forked from BFTrick/gettext-filter.php
Use the gettext WordPress filter to change any translatable string.
<?php
/**
* Change text strings
*
* @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext
*/
function my_text_strings( $translated_text, $text, $domain ) {
switch ( $translated_text ) {
case 'Related Products' :
$translated_text = __( 'Check out these related products', 'woocommerce' );
<?php
/**
* Toggle Customizer Control
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
<?php
/**
* Toggle Customizer Control
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
@gnanasekaranl
gnanasekaranl / tribe_filter-bar_custom_filter
Created June 26, 2020 15:59 — forked from rliverman/tribe_filter-bar_custom_filter
Add a custom filter to "The Events Calendar Pro" filter bar plugin based on a taxonomy
<?php
/**
* Adding a custom filter
* A simple copy and paste of the existing Category filter
* Find this new filter in: WP Admin > Events > Settings > Filterbar
* Docs for TribeEventsFilter: http://docs.tri.be/Filter-Bar/class-TribeEventsFilter.html
*/
class TribeEventsFilter_CustomClubs extends TribeEventsFilter {
public $type = 'select';
@gnanasekaranl
gnanasekaranl / font-awesome.php
Created September 9, 2019 18:52 — forked from justintadlock/font-awesome.php
PHP array of Font Awesome icons.
<?php
// Font Awesome v. 4.6.
function jt_get_font_icons() {
return array(
'fa-glass' => 'f000',
'fa-music' => 'f001',
'fa-search' => 'f002',
'fa-envelope-o' => 'f003',