An external scheme is a link on a webpage that moves you to an application outside of the browser.
Most links use the http or https scheme, which is handled inside of the browser.
<a href="http://example.com">Visit example.com</a>
<?php | |
/* Getting a JSON Facebook Feed | |
========================================================================== | |
1. Sign in as a developer at https://developers.facebook.com/ | |
2. Click "Create New App" at https://developers.facebook.com/apps | |
3. Under Apps Settings, find the App ID and App Secret |
/** | |
* Utility function to check if a gravatar exists for a given email or id | |
* @param int|string|object $id_or_email A user ID, email address, or comment object | |
* @return bool if the gravatar exists or not | |
*/ | |
function validate_gravatar($id_or_email) { | |
//id or email code borrowed from wp-includes/pluggable.php | |
$email = ''; |
#!/bin/bash | |
# | |
# Display usage info | |
vhost-usage() { | |
cat <<"USAGE" | |
Usage: vhost [OPTIONS] <name> | |
-h|--help this screen | |
-pub to create the webhost root in ~/www/name/public/ | |
-url to specify a local address, default is http://name.local |
/* | |
Change cancellation to set expiration date for next payment instead of cancelling immediately. | |
Assumes orders are generated for each payment (i.e. your webhooks/etc are setup correctly). | |
Since 2015-09-21 and PMPro v1.8.5.6 contains code to look up next payment dates via Stripe and PayPal Express APIs. | |
*/ | |
//before cancelling, save the next_payment_timestamp to a global for later use. (Requires PMPro 1.8.5.6 or higher.) | |
function my_pmpro_before_change_membership_level($level_id, $user_id) { | |
//are we on the cancel page? |
#!/bin/bash | |
# This script creates a new project (or site) under /var/sites and creates | |
# new virtual host for that site. With the options a site can also | |
# install the latest version of Laravel directly. | |
# This script was originally based on the following script by @Nek from | |
# Coderwall: https://coderwall.com/p/cqoplg | |
# Display the usage information of the command. | |
create-project-usage() { |
<p><a href="//facebook.com/119703784116" data-external="fb://profile/119703784116">Facebook</a> | |
<p><a href="//foursquare.com/v/4e4b3090fa7671a85ce77d0e" data-external="foursquare://venues/4e4b3090fa7671a85ce77d0e">Foursquare</a> | |
<p><a href="//twitter.com/oisfinc" data-external="twitter:/user?screen_name=oisfinc">Twitter</a> | |
<p><a href="//yelp.com/biz/orange-international-street-fair-orange" data-external="yelp:/biz/orange-international-street-fair-orange">Yelp</a> | |
<p><a href="//example.com/foo" data-external="example:/foo">Example</a> |
<?php | |
/* | |
Plugin Name: PMPro Customizations | |
Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-customizations/ | |
Description: Customizations for PMPro | |
Version: .1 | |
Author: Stranger Studios | |
Author URI: http://www.strangerstudios.com | |
*/ | |
/* |
<?php | |
/* | |
If checking out for ANY level with an expiration, add remaining days to the enddate. | |
Pulled in from: https://gist.github.com/3678054 | |
*/ | |
function my_pmpro_checkout_level_extend_memberships($level) | |
{ | |
global $pmpro_msg, $pmpro_msgt, $current_user; | |
//does this level expire? are they an existing members with an expiration date? |
# change these vars | |
SET @old_id = 2; | |
SET @new_id = 1; | |
# change the db table prefix here | |
UPDATE IGNORE wp_pmpro_membership_levels SET id = @new_id WHERE id = @old_id; | |
UPDATE IGNORE wp_pmpro_discount_codes_levels SET level_id = @new_id WHERE level_id = @old_id; | |
UPDATE IGNORE wp_pmpro_membership_orders SET membership_id = @new_id WHERE membership_id = @old_id; | |
UPDATE IGNORE wp_pmpro_memberships_categories SET membership_id = @new_id WHERE membership_id = @old_id; | |
UPDATE IGNORE wp_pmpro_memberships_pages SET membership_id = @new_id WHERE membership_id = @old_id; |