Skip to content

Instantly share code, notes, and snippets.

Max maxchirkov

  • Phoenix, Arizona
Block or report user

Report or block maxchirkov

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
maxchirkov / dump-wp-hooks.php
Last active Nov 26, 2018
Dumps WP Hooks (Filters and Actions) in the order of execution in Markdown format.
View dump-wp-hooks.php
* Dumps WP Hooks (Filters and Actions)
* in the order of execution in Markdown format.
* File in the root location of the WP setup.
* @param bool $actions - render actions
* @param bool $filters - render filters
* @param bool $unique - render unique hooks
View gist:12e21726eec6275db617b77c315e3bd1
* All Area Widgets
* Parameters:
* @param data-init string widgets/area
* @param data-id string Area ID
* @param data-chooser boolean Render Chooser true|false
* @param data-chooser-limit number of items to be returned within the chooser
* @param data-widgets JSON Array '["age", "cost", "education", "employment",
* "occupancy", "summary", "weather", "details"]'
maxchirkov / widget_mapper.php
Last active Aug 29, 2015
Widgets Mapper from previous to the current theme
View widget_mapper.php
add_action('after_setup_theme', 'mapThemeWidgets');
function mapThemeWidgets()
$theme_slug = 'twentytwelve';
// Hash of old to new sidebar IDs
$map = array(
'sidebar-1' => 'hjitw-right-widgets',
'sidebar-2' => 'hjitw-footerwidgets'
maxchirkov / gist:e586683bd21614adc0b5
Created Jul 28, 2014
Neighborhood data based on listing
View gist:e586683bd21614adc0b5
add_action('the_content', 'demographics');
function demographics($content)
global $post;
if (!isset($post->listing))
return $content;
View .gitignore
# PHP Storm #
# Compiled source #
maxchirkov / new_gist_file
Created Apr 2, 2013
Resolving conflicts by accepting "theirs" version of the file.
View new_gist_file
maxchirkov / jquery-ui-tabs
Created Feb 16, 2012
jQuery UI Tabs Test
View jquery-ui-tabs
<link rel="stylesheet" href="" type="text/css" media="all" />
<script type='text/javascript' src=''></script>
<script type='text/javascript' src=''></script>
maxchirkov / http_xml()
Created Jan 26, 2012
HTTP XML Request
View http_xml()
* Simple HTTP request for API usage - converts XML into object
function http_xml($url){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_TIMEOUT, 5);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
maxchirkov / re-queue
Created Dec 20, 2011
re-queue javascript in WP with a different handle
View re-queue
/** re-queue Google Maps script in Simple Real Estate Pack
* under different handle to avoid conflicts with other plugins
add_action('wp_print_styles', 'custom_script_requeue');
function custom_script_requeue(){
//check if Simple Real Estate Pack's function that registeres the script exists
if( !function_exists('srp_default_headScripts') )
//dequeue Google Maps script with "google" handle
maxchirkov / whitelist-alert
Created Aug 26, 2011
Alerts users to whilte-list your email address whenever they submit a form. Alerts could be customized to appear for only selected domain names like, etc.
View whitelist-alert
//Script assumes that you have jQuery loaded. Most WordPress themes do.
//Check email addresses
//All domains have to be be lower case
var check_emails = new Array("", "");
var email_warning = "Please make sure to white-list our email address so it doesn't get stuck in your SPAM folder.";
var form_selector = 'form'; //change to '#form_id' - to apply to a specific form ID.
//check if form field values contain @ - we assume that's email address
You can’t perform that action at this time.