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 | |
global $post; | |
global $more; | |
/* WP query loop for swiper slider */ | |
$args = array( | |
'post_type' => 'swiper', | |
'posts_per_page' => $number, |
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
<button class="button" id="get_posts">Get Posts</button> | |
<ul id="statuses"> | |
</ul> | |
<script type="text/javascript"> | |
/* Requires JSON API plugin installed on remote site http://wordpress.org/plugins/json-api/ */ | |
(function(window, document, $, undefined){ |
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
<button onclick="inAppBrowser()">In App Browser</button> | |
<script> | |
function inAppBrowser() { | |
window.open('http://apppresser.com', '_blank'); | |
} | |
</script> |
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 | |
function sb_edd_filter_license_limit( $limit, $download_id, $license_id, $price_id ) { | |
$payment_id = get_post_meta( $license_id, '_edd_sl_payment_id', true ); | |
$is_bundle = false; | |
$bundle_items = array(); | |
$downloads = edd_get_payment_meta_downloads( $payment_id ); | |
if( $downloads ) { | |
foreach( $downloads as $download ) { |
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
/* Author: Scott Bolinger | |
* Author URI: http://apppresser.com | |
* | |
* Styling for Display Posts Shortcode plugin for use with the AppTheme. Add this code to a child theme style.css file. | |
* Plugin information: http://www.billerickson.net/shortcode-to-display-posts/ | |
* | |
*/ | |
ul.display-posts-listing { | |
list-style-type: none; |
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 | |
class PGB_API { | |
// A single instance of this class. | |
public static $instance = null; | |
public static $auth_token = ''; | |
/** | |
* Creates or returns an instance of this class. |
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
do { | |
// We only get 100 subscribers, if there's a nextToken, get the next 100 | |
if( $nextToken ) { | |
$result = $client->listEndpointsByPlatformApplication(array( | |
'PlatformApplicationArn' => $gcm_arn, | |
'NextToken' => $nextToken | |
)); | |
} else { | |
// Run this the first time, since there's no nextToken yet | |
$result = $client->listEndpointsByPlatformApplication(array( |
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
/* | |
* Send notifications only to certain devices | |
*/ | |
// Change this hook | |
add_action( 'save_post', 'push_to_devices' ); | |
function push_to_devices() { | |
// this should be an array of user IDs that you want to send the pushes too. AppPresser saves device IDs if the app user is a logged in member of your WordPress site, for example in BuddyPress. This will not work unless the user has logged in through your app. |
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
add_filter( 'wptouch_should_init_pro', 'appp_disable_wptouch' ); | |
function appp_disable_wptouch( $value ) { | |
if( class_exists( 'AppPresser' ) && AppPresser::is_app() ) { | |
$value = false; | |
} | |
return $value; | |
} |
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
// Add custom ajax powered links to your AppPresser app. Add this to a javascript file, enqueued in a child of AppTheme | |
var AppCustom = {}; | |
AppCustom.init = function() { | |
$ = jQuery; | |
$('body').on('click', 'a.test-link, #another-link a', function(event) { | |
OlderNewer