This file contains hidden or 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 | |
/** | |
* Theme Activation Tour | |
* | |
* This class handles the pointers used in the introduction tour. | |
* @package Popup Demo | |
* | |
*/ | |
class WordImpress_Theme_Tour { |
This file contains hidden or 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 | |
/** | |
* Enqueue the stylesheet. | |
* http://aristeides.com/blog/modifying-wordpress-customizer/ | |
*/ | |
function my_enqueue_customizer_stylesheet() { | |
wp_register_style( 'my-customizer-css', YOUR_PLUGIN_URL. 'assets/css/customizer.css', NULL, NULL, 'all' ); | |
wp_enqueue_style( 'my-customizer-css' ); |
This file contains hidden or 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( 'bp_core_activated_user', 'bpdev_set_email_notifications_preference'); | |
function bpdev_set_email_notifications_preference( $user_id ) { | |
//I am putting all the notifications to no by default | |
//you can set the value to 'yes' if you want that notification to be enabled. | |
$settings_keys = array( | |
'notification_activity_new_mention' => 'no', | |
'notification_activity_new_reply' => 'no', |
This file contains hidden or 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 | |
/** | |
* Change Default Avatar Size | |
*/ | |
if ( !defined( 'BP_AVATAR_THUMB_WIDTH' ) ) { | |
define( 'BP_AVATAR_THUMB_WIDTH', 80 ); | |
} | |
if ( !defined( 'BP_AVATAR_THUMB_HEIGHT' ) ) { | |
define( 'BP_AVATAR_THUMB_HEIGHT', 80 ); |
This file contains hidden or 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 bptricks_add_handle (){ | |
echo '<span class="bbp-user-nicename"><span class="handle-sign">@</span>'. bp_core_get_username(bbp_get_reply_author_id(bbp_get_reply_id())) .'</span>' ; | |
} | |
add_action( 'bbp_theme_after_reply_author_details', 'bptricks_add_handle' ); | |
?> |
This file contains hidden or 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 bp_edd_redirect() | |
//Redirect logged in users from edd page to BuddyPress page. Make sure to change the page slug correctly. | |
{ | |
if( is_user_logged_in() && is_page('purchases') ) | |
{ | |
global $bp; | |
wp_redirect( bp_loggedin_user_domain() . $bp->profile->slug . '/my-purchases/', 301 ); | |
exit(); | |
} |
This file contains hidden or 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 cfc_bp_profile_homepage() | |
//Redirect logged in users from homepage to activity. This happens after login or when a user tries to go back to the homepage. | |
{ | |
global $bp; | |
if( is_user_logged_in() && is_front_page() && !get_user_meta( $user->ID, 'last_activity', true ) ) | |
{ | |
wp_redirect( network_home_url( $bp->activity->root_slug ), 301 ); | |
exit(); | |
} |
This file contains hidden or 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 | |
if ( function_exists( 'bp_is_member' ) ) { | |
/** | |
* Add EDD Purchases Page | |
* | |
*/ | |
function edd_bp_setup_purchases(){ | |
global $bp; | |
$profile_link = bp_loggedin_user_domain() . $bp->profile->slug . '/'; | |
$args = array( |
This file contains hidden or 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 bp_keep_me_logged_in( $expirein ) { | |
return 2629743; // 1 month in seconds | |
} | |
add_filter( 'auth_cookie_expiration', 'bp_keep_me_logged_in' ); | |
?> |
This file contains hidden or 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 bp_login_checked_remember_me_back() { | |
add_filter( 'login_footer', 'bp_login_remember_me' ); | |
} | |
add_action( 'init', 'bp_login_checked_remember_me_back' ); | |
function bp_login_remember_me() { | |
echo '<script type="text/javascript">document.getElementById(\'rememberme\').checked = true</script>'; | |
} | |
add_action( 'wp_footer', 'bp_login_remember_me' ); |