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 | |
/* | |
* Add custom content (such as a video) before the LearnDash content | |
* This example adds a video from BuddyBoss to the app | |
* Add this code to a plugin, change the post meta value as necessary | |
*/ | |
add_filter("learndash_content", function($content, $post) { | |
if( class_exists('AppPresser') && AppPresser::is_app() ) { |
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 | |
// this code goes in a plugin | |
// Add a member profile field to the app | |
add_filter( 'appcommunity_prepare_user', function( $response, $request ) { | |
$response['appp']['user_actions'] = '<div padding><p class="custom-profile-field"><strong>' . xprofile_get_field( 1, $request['id'] )->name . '</strong><br/>' . xprofile_get_field_data( 1, $request['id'] ) . '</p><p class="custom-profile-field"><strong>' . xprofile_get_field( 2, $request['id'] )->name . '</strong><br/>' . xprofile_get_field_data( 2, $request['id'] ) . '</p></div>'; | |
return $response; |
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 | |
// add this code to a plugin to modify a response | |
add_action('appcommunity_activity_get_item', function( $item, $retval, $request ) { | |
$retvalhasbadwords = false; | |
// check for bad words here... | |
if( $retvalhasbadwords ) { |
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
/* Custom CSS for the custom component demo found here: https://gist.github.com/scottopolis/ab9fbf16d67513f29e30626f6cc330d5 | |
Add this CSS in your app customizer under Colors => Custom CSS */ | |
ap-list .event-date { | |
float:right; | |
color: #999; | |
font-weight: bold; | |
margin-top: 10px | |
} | |
ap-list ion-list { |
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
<h4 padding><ion-icon name="star"></ion-icon> Featured Courses</h4> | |
<ap-slider wp="true" card="true" route="https://mysite.com/wp-json/wp/v2/sfwd-courses"></ap-slider> | |
<h4 padding><ion-icon name="list"></ion-icon> All Courses</h4> | |
<ap-list wp="true" card="true" class="col-2" route="https://mysite.com/wp-json/wp/v2/sfwd-courses"></ap-list> |
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 this code to a custom HTML page, change out your variables and lists --> | |
<ion-segment [(ngModel)]="event"> | |
<ion-segment-button value="schedule"> | |
Schedule | |
</ion-segment-button> | |
<ion-segment-button value="speakers"> | |
Speakers | |
</ion-segment-button> | |
<ion-segment-button value="sponsors"> |
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
<!-- | |
Example code for custom HTML pages https://docs.apppresser.com/article/462-html-samples-for-custom-pages | |
You also need to add custom CSS to make this look like the demo. Find the CSS here: https://gist.github.com/scottopolis/3fb840b1620bd723c2df44cf117f41c6 | |
--> | |
<span class="list-header">Upcoming events:</span> | |
<ap-list route="https://mysite.com/wp-json/wp/v2/posts?per_page=1"></ap-list> | |
<ion-card> |
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
import {Injectable} from '@angular/core'; | |
import {Device} from '@ionic-native/device'; | |
import {InAppPurchase} from '@ionic-native/in-app-purchase'; | |
import {Storage} from '@ionic/storage'; | |
import {AppAds} from '../appads/appads'; | |
import {Http, Headers, RequestOptions} from '@angular/http'; | |
import 'rxjs/add/operator/map'; | |
import { Events } from 'ionic-angular'; |
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 | |
// This example is for the Seriously Simple Podcasting plugin. To use with a different plugin, just replace the post type and meta key | |
// You would only run this one time, don't leave this code active on your site | |
$the_query = new WP_Query( array( 'post_type' => 'podcast', 'posts_per_page' => 999 ) ); | |
// The Loop | |
if ( $the_query->have_posts() ) { | |
while ( $the_query->have_posts() ) { | |
$the_query->the_post(); | |
// replace audio_file with the meta key to your existing media url. No markup, should just be a url string. |
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
<html> | |
<body> | |
<!-- | |
* See tutorial on scottbolinger.com | |
* 1. add your publishable key and website url below | |
* 2. install a plugin that adds the payment endpoint, such as https://github.com/scottopolis/sb-app-integration | |
* 3. create a pending order in WooCommerce before sending the payment, because you need the order ID woocommerce.github.io/woocommerce-rest-api-docs/#create-an-order | |
--> | |