Skip to content

Instantly share code, notes, and snippets.

View EkoJR's full-sized avatar

EkoJR

View GitHub Profile
@EkoJR
EkoJR / singletone_constructor.php
Created December 14, 2021 21:26
Designed to be called as a singleton get_instance() or standard class constructor.
class singleton_constructor {
public $foo = 'foo';
public $bar = 'bar';
public $foobar;
private static $instance = null;
private function __clone() {}
private function __sleep() {}
private function __wakeup() {}

ACTIVE PLUGINS

  • ActiveCampaign 8.0.3
  • Advanced Dynamic Pricing for WooCommerce (Pro) 3.0.5
  • Advanced noCaptcha & invisible Captcha 6.1.2
  • Advanced Order Export For WooCommerce 3.1.6
  • Aelia Foundation Classes for WooCommerce 2.0.21.200904
  • AffiliateWP 2.6
  • AffiliateWP - ActiveCampaign 1.0.1
  • AffiliateWP - Affiliate Area Tabs 1.2.8
@EkoJR
EkoJR / _prefix_allowed_tags_all.php
Last active March 9, 2020 16:00
All possible HTML tags for wp_kses() as of 03-09-2020
<?php
/**
* (Private) All Allowed Tags
*
* @ignore
*
* @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element
*
* @return array
@EkoJR
EkoJR / example.php
Last active October 16, 2019 18:17
Generate youtube posts
<?php
/**
*
*
* @uses get_option()
* @link https://developer.wordpress.org/reference/functions/get_option/
* @uses wp_insert_post()
* @link https://developer.wordpress.org/reference/functions/wp_insert_post/
*/
function tsc_add_youtube_video_links() {
&#160;
&cent;
&pound;
&curren;
&yen;
&brvbar;
&sect;
&uml;
&copy;
&ordf;
@EkoJR
EkoJR / aioseop_module.js
Created July 10, 2018 23:11
aioseop 2.6 change
function aiospinitAll(){
if ( jQuery( '.aiseop-date' ).length > 0 && jQuery( '.aiseop-date' ).eq( 0 ).prop( 'type' ).toLowerCase() === 'text' ) {
jQuery( '.aiseop-date' ).datepicker(
{
dateFormat: "yy-mm-dd"
}
);
}
}
<?php
/**
* PHPUnit bootstrap file
*
* @since 2.4.4
*
* @link https://github.com/JDGrimes/wpppb
*
* @package all-in-one-seo-pack
*/
@EkoJR
EkoJR / tooltip_example.js
Created October 12, 2017 09:10
tooltip html rendering
jQuery( document ).ready( function($) {
function apl_init_tooltips() {
jQuery( '.apl-tooltip' ).tooltip({
// content: function( callback ) {
// //callback( $( this ).prop('title').replace( '(<br([\s]?[\/]?)?>)', '<br />' ) );
// }
content: function( callback ) {
callback( $( this ).prop( 'title' ) );
}
});
@EkoJR
EkoJR / wp_query-args.md
Last active November 29, 2022 05:58
WP Query $args - Reference for params / args in . Ex. WP_Query( $args )