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 getMediumData() | |
{ | |
$handle = curl_init(); | |
$url = "https://api.rss2json.com/v1/api.json?rss_url=https%3A%2F%2Fmedium.com%2Ffeed%2Fmorpheus-network"; | |
// Set the url | |
curl_setopt($handle, CURLOPT_URL, $url); | |
// Set the result output to be a 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
<?php | |
/* | |
* [csnnaa_remove_additional_roles] | |
* Remove additional role when transaction is created/edited/expires | |
*/ | |
function csnnaa_remove_additional_roles($roles, $wp_user) | |
{ | |
$mepr_user = new MeprUser($wp_user->ID); | |
$active = $mepr_user->active_product_subscriptions('ids'); |
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 | |
// Version 1.0 | |
// Author Noam Eppel noam@cleanforest.co | |
// Related: https://pressjitsu.com/blog/optimizing-wp-options-for-speed/ | |
// | |
// Requires jquery.canvasjs.min.js from http://canvasjs.com/download-html5-charting-graphing-library/ | |
// Hello WP. Update the path to the wp-load.php file. | |
require_once '../wp-load.php'; |
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 | |
/** | |
* [display_user_application_form] | |
* Searches GravityForm Entries. Uses get_entries() | |
* Will display form results where do_action( 'form-display', $arg = '' ); is in the template. | |
* https://www.gravityhelp.com/documentation/article/api-functions/#get_entries | |
*/ | |
function display_user_application_form() { | |
$search_criteria = array( | |
'status' => 'active', |
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
{ | |
"frontend": { | |
"name": "name", | |
"stylesheets": "scss", | |
"javascripts": "js" | |
}, | |
"name": "grunt-with-node-sass", | |
"version": "0.9.5", | |
"devDependencies": { | |
"bower-move": "^1.0.1", |
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
module.exports = function(grunt) { | |
// Load multiple grunt tasks using globbing patterns | |
// This module will read the dependencies/devDependencies/peerDependencies in | |
// the package.json and load grunt tasks that match the provided patterns. | |
// Load all grunt tasks: | |
require('load-grunt-tasks')(grunt); | |
var PathConfig = require('./grunt-settings.js'); |
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 | |
/** | |
* Custom Login Fields | |
*/ | |
// Add a new form elements | |
add_action('register_form','custom_register_form'); | |
function custom_register_form (){ |
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: CFS EDD Custom Discount | |
Plugin URI: http://cleanforest.co | |
Description: Allows EDD discount codes to be passed via URL. | |
Author: Noam Eppel | |
Version: 0.99 | |
Author URI: http://cleanforest.co | |
License: GNU General Public License (Version 2 - 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_action('init', 'my_replace_image_urls' ); | |
function my_replace_image_urls() { | |
if ( defined('WP_SITEURL') && defined('LIVE_SITEURL') ) { | |
if ( WP_SITEURL != LIVE_SITEURL ){ | |
add_filter('wp_get_attachment_url', 'my_wp_get_attachment_url', 10, 2 ); | |
} | |
} | |
} | |
function my_wp_get_attachment_url( $url, $post_id) { |
NewerOlder