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 | |
$author_posts = new WP_Query( array( | |
'posts_per_page' => 3, | |
'author' => get_the_author_meta( 'ID' ) | |
) ); | |
if ( $author_posts->have_posts() ) while ( $author_posts->have_posts() ) : $author_posts->the_post(); | |
// loop | |
endwhile; | |
wp_reset_query(); |
<div class="author-box"> | |
<div class="author-pic"><?php echo get_avatar( get_the_author_email(), '80' ); ?></div> | |
<div class="author-name"><?php the_author_meta( "display_name" ); ?></div> | |
<div class="author-bio"><?php the_author_meta( "user_description" ); ?></div> | |
</div> |
// ==UserScript== | |
// @name Harvest Timer Growl Reminder | |
// @namespace http://harvestapp.com | |
// @description Displays Growl notifications at a user defined interval, reminding you to track your time. | |
// @include * | |
// @author Mike Green | |
// @version 0.1.1 | |
// ==/UserScript== | |
(function () { |
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 |
<?php | |
/** | |
* Custom browser check | |
* | |
* Uses https://github.com/cbschuld/Browser.php | |
*/ | |
function b5f_browser_check($what) { | |
global $browser, $browver; | |
switch ($what) { |
<?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 | |
*/ |
<?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 | |
/** | |
* How to integrate WordPress Core updates with your custom Plugin or Theme | |
* | |
* Filter the `update_plugins` transient to report your plugin as out of date. | |
* Themes have a similar transient you can filter. | |
*/ | |
add_filter( 'site_transient_update_plugins', 'wprp_extend_filter_update_plugins' ); | |
add_filter( 'transient_update_plugins', 'wprp_extend_filter_update_plugins' ); | |
function wprp_extend_filter_update_plugins( $update_plugins ) { |
The MIT License (MIT) | |
Copyright (c) James Dennes | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |