Skip to content

Instantly share code, notes, and snippets.

View esemlabel's full-sized avatar

Oleksii esemlabel

View GitHub Profile
@LolWalid
LolWalid / my_class.rb
Last active July 25, 2022 08:01
How to make private static method in ruby.
class MyClass
def self.public
"I'm public."
end
private # this is useless
def self.private
"I'm also public."
end
@westonruter
westonruter / 01-common-example.php
Last active November 9, 2023 05:22
Temporarily disabling filters in WordPress
<?php // Common way to do it:
remove_filter( 'the_title', 'wptexturize' );
$title = get_the_title();
add_filter( 'the_title', 'wptexturize' );
@luetkemj
luetkemj / wp-query-ref.php
Last active September 14, 2024 13:06
WP: Query $args
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.github.io
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php
*/