Tested in Mac OS X: super == command
Open/Goto
- super+t: go to file
- super+ctrl+p: go to project
- super+r: go to methods
<?php | |
// Get the repeater field | |
$repeater = get_field( 'repeater_field_name' ); | |
// Get a random rows. Change the second parameter in array_rand() to how many rows you want. | |
$random_rows = array_rand( $repeater, 2 ); | |
// Loop through the random rows if more than one is returned | |
if( is_array( $random_rows ) ){ |
<?php | |
/** | |
* Plugin Name: Replace WordPress Dashboard | |
* Description: Replaces the default WordPress dashboard with a custom one. | |
* Author: Micah Wood | |
* Author URI: http://micahwood.me | |
* Version: 0.1 | |
* License: GPL3 | |
*/ |
# Block visitors referred from semalt.com | |
RewriteEngine on | |
RewriteCond %{HTTP_REFERER} semalt\.com [NC] | |
RewriteCond %{HTTP_REFERER} semalt\.semalt\.com [NC] | |
RewriteRule .* - [F] | |
# Deny Access Referrer Spammers | |
SetEnvIfNoCase Referer semalt.com spammer=yes | |
SetEnvIfNoCase Referer semalt.semalt.com spammer=yes |
<?php | |
/** | |
* Custom browser check | |
* | |
* Uses https://github.com/cbschuld/Browser.php | |
*/ | |
function b5f_browser_check($what) { | |
global $browser, $browver; | |
switch ($what) { |
<!-- To ensure that the output of our shortcode callback is not wrapped in paragraph tags, it is best to run one more function on the widget text, ‘shortcode_unautop‘. --> | |
add_filter( 'widget_text', 'shortcode_unautop'); | |
add_filter( 'widget_text', 'do_shortcode', 11); |
namespace: "flex-", //{NEW} String: Prefix string attached to the class of every element generated by the plugin | |
selector: ".slides > li", //{NEW} Selector: Must match a simple pattern. '{container} > {slide}' -- Ignore pattern at your own peril | |
animation: "fade", //String: Select your animation type, "fade" or "slide" | |
easing: "swing", //{NEW} String: Determines the easing method used in jQuery transitions. jQuery easing plugin is supported! | |
direction: "horizontal", //String: Select the sliding direction, "horizontal" or "vertical" | |
reverse: false, //{NEW} Boolean: Reverse the animation direction | |
animationLoop: true, //Boolean: Should the animation loop? If false, directionNav will received "disable" classes at either end | |
smoothHeight: false, //{NEW} Boolean: Allow height of the slider to animate smoothly in horizontal mode | |
startAt: 0, //Integer: The slide that the slider should start on. Array nota |
$(function(){ | |
// substitute email link | |
$('a.substitutedEmailLink').each(function(index, item){ | |
var linkContent = $(this).html(); | |
$(this).parent().html("<a href='mailto:"+despamitizeEAddress()+"'>"+linkContent+"</a>"); | |
}); | |
}); |
# Turn on Expires and set default to 0 | |
ExpiresActive On | |
ExpiresDefault A0 | |
# Set up caching on media files for 1 year (forever?) | |
<FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav)$"> | |
ExpiresDefault A29030400 | |
Header append Cache-Control "public" | |
</FilesMatch> | |
defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="spacer-tile";}' ;killall Dock |