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
RewriteRule ^/wp-content/uploads/([0-9]{4})/([0-9]{2})/(.*)$ http://sub.domain.com/wp-content/uploads/sites/2/$1/$2/$3 [L,R=301] |
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: Autoload Plugins | |
* Plugin URI: https://gist.github.com/thefrosty/8303566 | |
* Description: Autoload non-MU plugins that live in the `wp-content/plugins` directory. This allows auto-updates to | |
* work but have to plugin act like an must-use plugin. | |
* Version: 0.2.1 | |
* Author: Austin Passy | |
* Author URI: http://austin.passy.co/ | |
*/ |
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
var Values = []; | |
jQuery('#pw_pending_users a[href^="mailto:"]').each(function() { | |
var $this = jQuery(this); | |
Values.push($this.text()); | |
}); | |
console.log(Values.join(', ')); |
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: Easy Digital Downloads - Variable Pricing License Activation Limits | |
Plugin URL: http://easydigitaldownloads.com/extension/ | |
Description: Limit the number of license activations permitted based on variable prices | |
Version: 1.0.3 | |
Author: Pippin Williamson | |
Author URI: http://pippinsplugins.com | |
Contributors: mordauk | |
*/ |
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 submit_form() { | |
$value = array( | |
'key' => '', // Array key? | |
'date' => date( get_option( 'date_format' ) . ' ' . get_option('time_format'), current_time( 'timestamp', 0 ) ), | |
'name' => $user_name, | |
'email' => $email, | |
'hash' => $hash, | |
'message' => esc_textarea( $_POST['commentText'] ), |
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', 'ap_reset_featured_images' ); | |
function ap_reset_featured_images() { | |
if ( !is_user_logged_in() ) return; | |
if ( isset( $_GET['reset-featured-image'] ) && true == $_GET['reset-featured-image'] ) { | |
$allposts = get_posts( array( 'posts_per_page' => 9999 ) ); |
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
function extendd_exclude_extendd_settings_plugin( $query ) { | |
if ( 'plugin' == $query->query['post_type'] ) { | |
$current_user = wp_get_current_user(); | |
// Not logged in = $current_user->ID == 0 | |
if ( 0 == $current_user->ID ) /* && ( false === $query->query_vars['suppress_filters'] ) */ ) { | |
$protected_posts = get_extendd_settings_plugin(); //returns integer | |
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
function get_extendd_my_account_pages() { | |
$all_wp_pages = wp_cache_get( 'extendd_my_account_pages' ); | |
if ( false === $all_wp_pages ) { | |
// Set up the objects needed | |
$the_query = new WP_Query(); | |
$all_wp_pages = $the_query->query( array( 'post_type' => 'page' ) ); | |
wp_cache_set( 'extendd_my_account_pages', $all_wp_pages ); | |
} |
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
function validate_license() { | |
//print '<pre>' . print_r( $_POST, true ) . '</pre>'; | |
//print '<pre>' . print_r( $this->settings_sections, true ) . '</pre>'; | |
//exit; | |
$data = array(); | |
foreach ( $this->settings_sections as $section ) { | |
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
$defaults = array( | |
'company' => 'client_company', | |
'address_1' => 'client_address_1', | |
'address_2' => 'client_address_2', | |
'city' => 'client_city', | |
'state' => 'client_state', | |
'postcode' => 'client_postcode', | |
'country' => 'client_country' | |
); |