This file contains 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 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 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 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 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 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) { | |
This file contains 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
angular.module('myApp.services', []) | |
.factory('Base64', function() { | |
var keyStr = 'ABCDEFGHIJKLMNOP' + | |
'QRSTUVWXYZabcdef' + | |
'ghijklmnopqrstuv' + | |
'wxyz0123456789+/' + | |
'='; | |
return { | |
encode: function (input) { |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width"> | |
<title>My App</title> | |
<style type="text/css"> | |
body { |
This file contains 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 | |
/* | |
* Show login button in toolbar if user not logged in. AppBuddy only | |
* Put this code in a child theme functions.php file | |
*/ | |
function my_appbuddy_modal_btn( $button ) { | |
$args = ''; |
This file contains 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 ms_add_tax_to_api() { | |
$taxonomies = get_taxonomies( '', 'objects' ); | |
foreach( $taxonomies as $taxonomy ) { | |
$taxonomy->show_in_rest = true; | |
} | |
} | |
add_action( 'init', 'ms_add_tax_to_api', 30 ); |
OlderNewer