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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
find . -name \.AppleDouble -exec rm -rf {} \; |
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_action( 'init', 'prefix_disable_post_page_analysis' ); | |
/** | |
* Conditionally disable the Yoast Page Analysis on post and page admin edit screens. | |
* | |
* @uses prefix_is_edit_screen | |
* @return NULL if we're not on the right admin screen | |
* @author Robert Neu <http://wpbacon.com> | |
* @link http://auditwp.com/wordpress-seo-admin-columns/ |
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
// Replace 7 with the ID of your form and 13 with the ID of the field you want to force "all required" | |
// http://www.gravityhelp.com/documentation/page/Gform_field_validation | |
add_filter("gform_field_validation_7_13", 'validate_tcs', 10, 4); | |
function validate_tcs($result, $value, $form, $field) { | |
// Convert the checkbox input name value (returned as part of "field") | |
// into the "underscored" ID version which is found in the $_POST | |
foreach ($field['inputs'] as $input) { | |
$input_post_value = 'input_' . str_replace('.', '_', $input['id']); | |
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
// Put this PHP code into your functions.php le. | |
// This will load the jQuery library onto your page by inserting a link in the <head> section where you call wp_head. | |
if(!is_admin()) { | |
wp_deregister_script('jquery'); | |
wp_register_script('jquery', ("http://ajax.googleapis.com/ajax/libs/ | |
jquery/1.3.2/jquery.min.js"), false, '1.3.2'); | |
wp_enqueue_script('jquery'); | |
} |
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
// Gravity Forms style sheet | |
wp_register_style( 'gravity-forms', get_stylesheet_directory_uri() . '/library/css/gravity-forms.css', array(), '' ); | |
// only load on contact page | |
if(is_page('contact')){ | |
wp_enqueue_style('gravity-forms'); | |
} |
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
//must first add typkit js id in page header scripts | |
add_action( 'init', 'customize_font_list' ); | |
function customize_font_list(){ | |
$custom_fonts = array( | |
'proxima-nova' => array( | |
'fallback' => 'sans-serif', | |
'weights' => array( | |
'100', | |
'300', |
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
/** | |
* Change Row Background Image to Background Color for mobile devices | |
* assign pro-row-bg-1 class to the row | |
* | |
* @author Davinder Singh Kainth | |
* @link http://probeaver.com/?p=348 | |
* | |
*/ | |
@media only screen and (max-width: 768px) { |
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
if ( ! function_exists('cpt_projects') ) { | |
// Register Custom Post Type | |
function cpt_projects() { | |
$labels = array( | |
'name' => 'project', | |
'singular_name' => 'Project', | |
'menu_name' => 'Camel Projects', | |
'name_admin_bar' => 'Post Type', |
OlderNewer