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 | |
/** | |
* Remove all WordPress-specific stylesheets from WordPress login screen | |
*/ | |
/** | |
* Force-remove login-related styles. Can't use the regular method of login_enqueue_scripts | |
* due to wp_admin_css running before login_enqueue_scripts | |
* |
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 | |
function ag_show_me_hooks() { | |
global $wp_current_filter; | |
var_dump( $wp_current_filter ); | |
} | |
add_action( 'all', 'ag_show_me_hooks' ); |
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
# The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited | |
# | |
# Current known FCC address ranges: | |
# https://news.ycombinator.com/item?id=7716915 | |
# | |
# Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft | |
# | |
# In your nginx.conf: | |
location / { |
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 | |
/** | |
* Modify WP_Query to return taxonomy fields in post array | |
* | |
* @author Jess Green <jgreen AT psy-dreamer.com> | |
*/ | |
add_filter('posts_orderby', 'taxonomy_orderby'); | |
add_filter('posts_fields', 'taxonomy_archive_select_fields'); | |
add_filter('posts_join', 'taxonomy_archive_join'); | |
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 | |
/** | |
* Filter a few parameters into YouTube oEmbed requests | |
* | |
* @link http://goo.gl/yl5D3 | |
*/ | |
function iweb_modest_youtube_player( $html, $url, $args ) { | |
return str_replace( '?feature=oembed', '?feature=oembed&modestbranding=1&showinfo=0&rel=0', $html ); | |
} | |
add_filter( 'oembed_result', 'iweb_modest_youtube_player', 10, 3 ); |
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
.gform_wrapper ul { | |
padding-left: 0; | |
list-style: none; } | |
.gform_wrapper li { | |
margin-bottom: 15px; } | |
.gform_wrapper form { | |
margin-bottom: 0; } |
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 | |
add_filter('gform_field_content', 'add_placeholder_attr', 10, 3); | |
/** | |
* Add a placeholder attribute to text inputs | |
* | |
* @param string $content | |
* @param array $field | |
* @param mixed $value |
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 | |
echo getTimezone("Sydney"); | |
function getTimezone($location) | |
{ | |
$location = urlencode($location); | |
$url = "http://maps.googleapis.com/maps/api/geocode/json?address={$location}&sensor=false"; | |
$data = file_get_contents($url); | |
// Get the lat/lng out of the data | |
$data = json_decode($data); |
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
//How to edit a user profile on the front end? | |
//http://wordpress.stackexchange.com/questions/9775/how-to-edit-a-user-profile-on-the-front-end | |
//Forcing nickname as display_name in custom edit profile template | |
//http://wordpress.stackexchange.com/questions/35403/forcing-nickname-as-display-name-in-custom-edit-profile-template | |
/////// | |
<?php |
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 | |
/** | |
* My Project | |
* | |
* @package MyProject | |
* @subpackage JesGs_Walker_Category | |
* @author Jess Green <[email protected]> | |
* @version $Id$ | |
*/ |
NewerOlder