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 | |
namespace Polyfills | |
{ | |
final class Ereg | |
{ | |
public static function ereg($pattern, $string, &$regs = null) | |
{ | |
if ($pattern === '' || $pattern === null) { | |
trigger_error('ereg(): REG_EMPTY', E_USER_WARNING); |
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 | |
spl_autoload_register( function( $class_name ) { | |
$prefix = 'NAMESPACE'; | |
if ( 0 !== strpos( $class_name, $prefix ) ) { | |
return; | |
} | |
$class = substr( str_replace( "\\", '/', $class_name ), strlen( $prefix ) + 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
#-------------------------------------------------------------------------------------------------------------------# | |
# Version 1.00 | |
# | |
# This schript is to take a csv file and convert it to ldif format | |
# dependant on the requirement please ensure the csv is in the format as shown in code below else output will | |
# be wrong, current format of csv is: | |
# - First field: FullName | |
# - Second field: Mobile number | |
# - Third field: Email address | |
# - Fourth field: UserName |
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
""" | |
List directory as tab-separated values | |
* Written, annotated, and hastily bug-checked by Jeff Brand (@deltafactory) | |
* Inspired by Rudy Trujillo, https://plus.google.com/u/0/+RudyTrujillo/posts/7yWsPXVvKmt | |
""" | |
# Import os and sys packages since we'll be using them. (Look for sys.* and os.* below.) | |
# More info: https://docs.python.org/3/reference/import.html | |
import os, sys |
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: Nexus WooCommerce bridge | |
Version: 1.1.0 | |
Plugin URI: http://nexusthemes.com | |
Description: Add widgets/plugins and other functionality from WooCommerce into Nexus Framework | |
Author: Gert-Jan Bark, Jeff Brand | |
Author URI: http://nexusthemes.com | |
*/ |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
body { | |
font-family: Arial; | |
} |
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
Index: classes/class-wc-countries.php | |
=================================================================== | |
--- classes/class-wc-countries.php (revision 799848) | |
+++ classes/class-wc-countries.php (working copy) | |
@@ -1,4 +1,30 @@ | |
<?php | |
+ | |
+class WC_Countries_Loader { | |
+ | |
+ private $instance; |
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 | |
/* | |
INSTRUCTIONS: | |
Use at your own risk. Backup your database before continuing. | |
1. Copy code to a file in the root of your website. | |
2. Change YOUR_SITE_ROOT to a value that makes sense. | |
3. Execute by visiting the page. Verify before/after results. | |
4. Change MAKE_CHANGES_TO_SITE to true and execute it again. |
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 | |
// Place in a file in the main folder (same as wp-load.php). | |
// Code is completely untested. Use at your own risk. | |
require( 'wp-load.php' ); | |
df_activate_all_users(); | |
function df_activate_all_users() { | |
header( 'Content-type: text/plain' ); |
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 | |
//Code is completely untested, may contain errors. | |
function affiliate_user_stealth_mode() { | |
if ( ! is_user_logged_in() ) | |
return; | |
$user = wp_get_current_user(); | |
if ( get_user_meta( $user->ID, 'affiliate', true ) ) { |
NewerOlder