This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// This is the cleaner code per request of a thread in the LinkedIn group "WordPress" | |
// ... | |
// register and enqueue loadCSS | |
function load_scripts_and_styles() { | |
// register loadCSS | |
wp_register_script( 'load-css-async', get_stylesheet_directory_uri() . '/path/to/js/loadCSS.js', array(), '', false ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define('INBOUND_FAST_AJAX' , true ); | |
/** | |
* Enable Fast Ajax | |
*/ | |
add_filter( 'option_active_plugins', 'ajax_disable_plugins' ); | |
function ajax_disable_plugins($plugins){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Get user's role | |
* | |
* If $user parameter is not provided, returns the current user's role. | |
* Only returns the user's first role, even if they have more than one. | |
* Returns false on failure. | |
* | |
* @param mixed $user User ID or object. | |
* @return string|bool The User's role, or false on failure. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import with_statement # we'll use this later, has to be here | |
#!/usr/bin/env python2.7 | |
# Author Mike https://guides.wp-bullet.com/ | |
# Forked from https://gist.github.com/chrisguitarguy/1305010 | |
from argparse import ArgumentParser | |
import csv | |
from itertools import izip | |
import requests | |
from BeautifulSoup import BeautifulStoneSoup as Soup |