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_filter('yz_get_profile_hidden_widgets','hide_widgets_from_user_profile_edit_section'); | |
function hide_widgets_from_user_profile_edit_section( $widget ) { | |
$widget[] = 'portfolio'; | |
return $widget; |
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 get_all_activity_ids_type_is_new_avatar(){ | |
global $wpdb, $bp; | |
// Prepare Sql | |
$sql = $wpdb->prepare( "SELECT id FROM {$bp->activity->table_name} WHERE type = %s AND component = '%s'", 'new_avatar' , 'profile' ); | |
// Get Result |
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 | |
/** | |
* Register member types. | |
* | |
* From the wp-admin/extended profile | |
* it will be possible to set the user's member type | |
*/ | |
function using_mt_register_member_types() { | |
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 select2_fix() { | |
if ( is_buddypress() ) { ?> | |
<script> | |
jQuery( document ).ready( function($) { | |
$('select').select2('destroy'); | |
}); | |
</script> |
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 convert_activity_product_date_to_shamsi($args , $product){ | |
if( ! function_exists('parsidate') || get_locale() != 'fa_IR' ) { | |
return false; | |
} | |
$args['date'] = parsidate("Y-m-d", $product->get_date_created()->format( 'F j, Y' ), "per"); | |
return $args; |
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
// For more information you can see this url: https://developer.mozilla.org/en-US/docs/Web/API/URL | |
let parseUrl = (url) => { | |
let parser = document.createElement('a'); | |
parser.href = url; | |
return parser; | |
} | |
let url = parseUrl("http://username:[email protected]:3000/deploy/?search=test#hash"); | |
url.protocol; // => "http:" |
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 | |
$countries = 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
<?php | |
function get_all_users_id_by_membership_level_id() { | |
$memberships = rcp_get_memberships( array( | |
'status' => 'active', | |
'object_id' => 2 // Membership Levels ID | |
) ); | |
foreach ($memberships as $membership) { |
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 random_user_query( &$query ) | |
{ | |
$query->query_orderby = "ORDER BY RAND()"; | |
} | |
function display_random_vip_users( $atts ) { |
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 yz_verified_users_count_shortcode( $atts = null ){ | |
global $wpdb; | |
// Get Args. | |
$args = shortcode_atts( | |
array( | |
'verified' => 'on', | |
), $atts, 'yz_verified_users_count' ); |
NewerOlder