This file contains hidden or 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 // custom functions.php template @ digwp.com | |
// add feed links to header | |
if (function_exists('automatic_feed_links')) { | |
automatic_feed_links(); | |
} else { | |
return; | |
} | |
This file contains hidden or 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
// Needed this for a client project, thanks! I improved upon it to make it more generic so you don't have to look up individual IDs on elements: | |
jQuery(document).ready(function(){ | |
// Check all in Gravity Forms | |
jQuery('.checkall li:first-child input').click(function() { | |
jQuery(this).parent('li').parent('ul').find(':checkbox').attr('checked', this.checked); | |
}); | |
}); | |
// Just add a class "checkall" to your checkbox form item in Gravity Forms, it assumes the first item in the list will be the "All" option. |
This file contains hidden or 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 | |
while (have_posts()) : the_post(); | |
$taxonomy = 'your_taxonomy'; // change this to your taxonomy | |
//$terms = wp_get_post_terms( $post->ID, $taxonomy, array( "fields" => "ids" ) ); | |
$terms = wp_get_post_terms( $post->ID, $taxonomy, array( "fields" => "slugs" ) ); | |
if( $terms ) $all_terms = array_merge($all_terms, $terms); | |
endwhile; | |
if ($all_terms) : |
This file contains hidden or 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 | |
/** | |
* A new logo for the admin area and an own background color | |
* @author Andreas Hecht | |
*/ | |
function ah_login_logo() { | |
?> | |
<style type="text/css"> | |
#login h1 a, .login h1 a { |
This file contains hidden or 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 | |
// Copy from here | |
//Deleting WordPress authentification | |
remove_filter('authenticate', 'wp_authenticate_username_password', 20); | |
// Placing new authentification - sign up via email and password only | |
add_filter('authenticate', function($user, $email, $password){ | |
//Check for empty fields |
This file contains hidden or 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 | |
/** | |
* Adding an ad after the second paragraph | |
* | |
*/ | |
add_filter( 'the_content', 'tb_insert_post_ads' ); | |
function tb_insert_post_ads( $content ) { | |
$ad_code = 'The ad code goes here. Both static ads and Google Adsense.'; |
This file contains hidden or 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 | |
/** | |
* Frees the header from unnecessary entries | |
*/ | |
add_action('init', 'evolution_remheadlink'); | |
function evolution_remheadlink() | |
{ | |
remove_action('wp_head', 'rsd_link'); | |
remove_action('wp_head', 'wp_generator'); |
This file contains hidden or 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 | |
/** | |
* Dequeue jQuery Migrate Script in WordPress. | |
*/ | |
if ( ! function_exists( 'evolution_remove_jquery_migrate' ) ) : | |
function evolution_remove_jquery_migrate( &$scripts) { | |
if(!is_admin()) { | |
$scripts->remove( 'jquery'); |
This file contains hidden or 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 | |
/** | |
* Disable the emojis | |
*/ | |
function disable_emojis() { | |
remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); | |
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); | |
remove_action( 'wp_print_styles', 'print_emoji_styles' ); | |
remove_action( 'admin_print_styles', 'print_emoji_styles' ); |
This file contains hidden or 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
describe('conditional testing', function() { | |
it('should be able to test conditionally', function() { | |
browser.get('http://www.angularjs.org'); | |
element(by.css('.theresnowaythisclassexists')).then( | |
function elementExists() { | |
expect(false).toBe(true); | |
}, | |
function elementDoesNotExist() { | |
expect(true).toBe(true); | |
} |
OlderNewer