#Create bitbucket branch
##Create local branch
$ git checkout -b sync
Switched to a new branch 'sync'
$ git branch
master
* sync
package org.robotlegs.utilities.remote | |
{ | |
import com.adobe.serializers.json.JSONDecoder; | |
import mx.collections.ArrayCollection; | |
public class JsonRemoteService extends RemoteServiceBase | |
{ | |
public function JsonRemoteService(rootURL:String = "") | |
{ |
<?php | |
/** | |
* Gets the current global post type if one is set | |
*/ | |
function x_get_current_post_type() { | |
global $post, $typenow, $current_screen; | |
if( $post && $post->post_type ) | |
$post_type = $post->post_type; | |
elseif( $typenow ) |
<?php | |
/** | |
* Generates a domain-mapping safe URL on WordPress.com | |
* Core's ajaxurl uses admin_url() which returns *.wordpress.com which doesn't work for the front-end on domain-mapped sites. | |
* This works around that and generates the correct URL based on context. | |
*/ | |
function my_admin_ajax_url( $path = '' ) { | |
if ( is_admin() ) | |
$url = admin_url( 'admin-ajax.php' ); | |
else |
<!DOCTYPE html> | |
<!-- Helpful things to keep in your <head/> | |
// Brian Blakely, 360i | |
// http://twitter.com/brianblakely/ | |
--> | |
<head> | |
<!-- According to Heather Champ, former community manager at flickr, | |
you should not allow search engines to index your "Contact Us" |
<?php | |
// gets the ID from a custom field to show posts on a specific page | |
$buildType = get_post_meta($post->ID, 'build_type_id', true); | |
// run query | |
query_posts(array( | |
'post_type' => 'portfolio', | |
'showposts' => -1, | |
'tax_query' => array( | |
array( |
// Original method | |
var object = { | |
method: function (x, y) { | |
return x+y; | |
} | |
} | |
// Add operations before or after! | |
object.method = (function (original) { | |
return function (x, y) { |
<?php | |
/** | |
* Get all the registered image sizes along with their dimensions | |
* | |
* @global array $_wp_additional_image_sizes | |
* | |
* @link http://core.trac.wordpress.org/ticket/18947 Reference ticket | |
* @return array $image_sizes The image sizes | |
*/ | |
function _get_all_image_sizes() { |
function countCSSRules() { | |
var results = '', | |
log = ''; | |
if (!document.styleSheets) { | |
return; | |
} | |
for (var i = 0; i < document.styleSheets.length; i++) { | |
countSheet(document.styleSheets[i]); | |
} | |
function countSheet(sheet) { |
#Create bitbucket branch
##Create local branch
$ git checkout -b sync
Switched to a new branch 'sync'
$ git branch
master
* sync
<?php | |
/** | |
* An example function used to demonstrate how to use the `user_can_save` function | |
* that provides boilerplate security checks when saving custom post meta data. | |
* | |
* The ultimate goal is provide a simple helper function to be used in themes and | |
* plugins without the need to use a set of complex conditionals and constants. | |
* | |
* Instead, the aim is to have a simplified function that's easy to read and that uses | |
* WordPress APIs. |