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 | |
/* | |
Plugin Name: AppPresser Media Images | |
Plugin URI: https://apppresser.com | |
Description: Automatically add media images on when a post is saved for posts that have a media url. | |
Version: 1.0 | |
Author: AppPresser Team | |
Author URI: http://apppresser.com | |
License: GPLv2 |
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
// This is just for example purposes, copy/pasting this won't work out of context. It is from the Gatsby Publisher theme by Static Fuse. | |
import React from 'react' | |
import { Box } from '@chakra-ui/core' | |
import Layout from '../../components/Layout' | |
import PostEntry from '../../components/PostEntry' | |
import Pagination from '../../components/Pagination' | |
import HeaderArchive from '../../components/HeaderArchive' | |
import SEO from '../../components/SEO' | |
import { useQuery } from '@apollo/react-hooks' | |
import gql from 'graphql-tag' |
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 | |
/* | |
Plugin Name: In App Purchases for WooCommerce Memberships | |
Plugin URI: https://apppresser.com | |
Description: This plugin listens for in app purchases or cancellations and adds/removes members from a membership level. | |
Version: 2.0.0 | |
Author: Scott Bolinger | |
Author URI: https://apppresser.com | |
License: GPLv2 | |
*/ |
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 custom plugin | |
add_filter( 'woocommerce_rest_prepare_product_object', 'wc_app_add_custom_data_to_product', 10, 3 ); | |
// filter the product response here | |
function wc_app_add_custom_data_to_product( $response, $post, $request ) { | |
// in this case we want to display the short description, so we copy it over to the description, which shows up in the app | |
$response->data['description'] = $response->data['short_description']; | |
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 | |
// put this code in a plugin | |
add_filter( 'appp_login_success', 'appp_filter_welcome_message', 10, 2 ); | |
function appp_filter_welcome_message( $data, $user_id ) { | |
return "Welcome to our app user " . $user_id . "!"; // must be a string, no HTML | |
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 | |
/* | |
Plugin Name: AppPresser In App Purchases for Restrict Content Pro (v2) | |
Plugin URI: https://apppresser.com | |
Description: This plugin listens for in app purchases or cancellations and adds/removes members from a membership level. | |
Version: 2.0.0 | |
Author: Scott Bolinger | |
Author URI: https://apppresser.com | |
License: GPLv2 | |
*/ |
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
// https://docs.apppresser.com/article/515-interstitial-ads | |
(function() { | |
// show an interstitial when an element with an id of showAd is clicked. For example, add this to your app: | |
// <button ion-item id="showAd" (click)="pushPage( pages.tab_menu.items[1] )"><ion-icon name="cog" item-left></ion-icon>Show ad and navigate</button> | |
// you can use any element with the id of showAd, it doesn't have to be a button | |
// you can also load the interstitial when the app loads by moving it outside the ready function | |
ready("#showAd", function(element) { | |
var el = document.getElementById("showAd"); |
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
<div padding align="center"> | |
<h2 class="red-text">Online Giving</h2> | |
<p style="font-size:1.6rem;line-height:1.4;margin-bottom:0">Donate today and help us to further our cause in your commmunity.</p> | |
</div> | |
<ap-form url="https://mysite.com/donations/donate/" amount="true"></ap-form> | |
<div padding> | |
<p>You can also text your donation to (555) 867-5309</p> |
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 | |
/* | |
Plugin Name: Add Events Calendar to AppPresser | |
Description: This plugin adds the Events Calendar CPT and some post meta data to the WP-API. | |
Version: 0.1 | |
Author: Scott Bolinger | |
Author URI: https://apppresser.com | |
License: GPLv2 | |
*/ |
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, it only needs to run once so remove it when you're done | |
add_action('admin_init', function() { | |
$the_query = new WP_Query( array( 'post_type' => 'post', 'posts_per_page' => 999 ) ); | |
// The Loop | |
if ( $the_query->have_posts() ) { | |
while ( $the_query->have_posts() ) { | |
$the_query->the_post(); |