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 bp_force_user_to_set_profile_avatar() { | |
if ( ! is_user_logged_in() ) { | |
return; | |
} | |
$user_id = get_current_user_id(); | |
if ( ! bp_get_user_has_avatar( $user_id ) && bp_current_action() != 'change-avatar' ) { |
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 | |
final class Plugin_Name { | |
private function __construct() { | |
register_activation_hook( __FILE__, array( $this, 'plugin_activation' ) ); | |
} | |
public function plugin_activation() { | |
if ( get_option( 'plugin_version' ) != PLUGIN_VERSION ) { |
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 | |
/** | |
* Access to Private Property of Class And Remove Action From Class | |
* add_action pirority is very important => 9 | |
*/ | |
function remove_action_from_class(){ | |
global $Youzer; | |
$myClassReflection = new ReflectionClass( get_class( $Youzer ) ); | |
$secret = $myClassReflection->getProperty('instance'); | |
$secret->setAccessible(true); |
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 | |
/** | |
* Members Directory - Include Users By Meta_key & Meta_value | |
*/ | |
function yz_include_members_directory_by_verified( $loop ) { | |
if ( ! bp_is_members_directory() ) { | |
return $loop; | |
} |
NewerOlder