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 init_session_var_test() | |
{ | |
//must set /?sessiontest=SOMETHING to get this to run | |
if(empty($_REQUEST['sessiontest'])) | |
return; | |
//start session | |
if (version_compare(phpversion(), '5.4.0', '>=')) { | |
if (session_status() == PHP_SESSION_NONE) | |
session_start(); |
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
/** | |
* Adds the datepicker settings to the admin footer. | |
* Only loads on the plugin-name settings page | |
*/ | |
function admin_footer() { | |
$screen = get_current_screen(); | |
if ( $screen->id == 'settings_page_plugin-name' ) { |
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 | |
/* | |
* Load iFlyChat Support or Chatroom for Members in Level 1 and 2 Only | |
* Update line 11 with your Membership Level IDs | |
*/ | |
function my_pmpro_iflychat_check_access_filter($access) { | |
$access = true; | |
/** Get current user information **/ | |
global $current_user; | |
wp_get_current_user(); |
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
/* | |
Use PMPro Register Helper to add PMPro Billing Address fields to the edit user page for admins. | |
*/ | |
function show_pmpro_address_fields_on_edit_profile() | |
{ | |
//require PMPro and PMPro Register Helper | |
if(!defined('PMPRO_VERSION') || !defined('PMPRORH_VERSION')) | |
return; | |
$address_fields = array( |
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
/** | |
* Disables BuddyPress' registration process and fallsback to WordPress' one. | |
*/ | |
function my_disable_bp_registration() { | |
remove_action( 'bp_init', 'bp_core_wpsignup_redirect' ); | |
remove_action( 'bp_screens', 'bp_core_screen_signup' ); | |
} | |
add_action( 'bp_loaded', 'my_disable_bp_registration' ); |
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 decodeHtmlEntities(str) { | |
console.log(str); | |
var special = { | |
"<" : "<", | |
">" : ">", | |
""" : '"', | |
"'" : "'", | |
"'" : "'", | |
"&" : "&", | |
"\\" : "" |
NewerOlder