gjyshi
Forum Replies Created
-
Forum: Plugins
In reply to: [kk Star Ratings - Rate Post & Collect User Feedbacks] How to list like postsany reply?
Forum: Plugins
In reply to: [WooCommerce] Whats your problem with Kosovo?Just checked the github comments sounds good thank you.
Forum: Plugins
In reply to: [WooCommerce] Whats your problem with Kosovo?Thanks for clarifying. I’m from Tirana / Albania, just doing a woocommerce website for a friend from Kosovo. While reading your comment I was also configuring my new Iphone and in the countries list of apple I saw Kosovo just as KOSOVO which made me so happy.
Since you have a nice friendly Setup Wizard for users which is a fantastic Idea but in the final it forces Kosovo to use Serbian Dinar RDS in Woo Shop, it must be euro.
I hope you find an easy way to add any optional solution.
Maybe Translation in Albanian Language files can resolve the name for us I have to contact to translators too.
Thank you so much for your reply.
Yes ignore the above code but what I would like to realize is deletion of all users in WordPress except customers I don’t want to delete a role which is same with a customer’s one
before auto register feature I had registrations of WordPress enabled so too many spam bots are registered, now that I disabled them I would like to remove all wp users at once without removing any customers using wp bulk plugin
- This reply was modified 6 months ago by gjyshi.
Yes in the documentation I found more functions you are right for this topic the solution is this one
is_ultimatemember()
sorry I just changed
UM()->options()->option
toUM()->options()->update
and everything worked fine.Thanks for reply in fact I used a different way like this one below:
$shortCodesToTest = [ 'ultimatemember'];
$anyShortCode = false;
foreach ($shortCodesToTest as $sc) {
if (has_shortcode( $post->post_content, $sc) ) {
$anyShortCode = true;
}
}So what I was trying to do is adding a new sidebar for all ultimate member pages instead of default WordPress sidebar.
if ( class_exists( 'UM_Functions' ) && $anyShortCode ) {
//new sidebar
} else {
//old sidebar
}This way worked fine for me if you have any other idea with a shorter code would be great.
Thank you.
Sorry deactivation and reactivation resolved my problem.
I have the same problem and there is no update button available for me. Can you share solution steps with us?
- This reply was modified 1 year ago by gjyshi.
Thank you
Sorry again just a last question please when you have time
Can we make this option already selected via php? for example:
function um_upload_tab_add_tab( $tabs ) {
$tabs[ 'upload_tab' ] = array(
'name' => 'Upload',
'icon' => 'um-faicon-upload',
'custom' => true,
);
UM()->options()->options[ 'profile_tab_' . 'upload_tab' ] = true;
return $tabs;
}I see
);
maybe a trick can help us doing this preselected for the profile owner via a php function?
UM()->options()->options[ 'profile_tab_' . 'upload_tab' ] = true;- This reply was modified 1 year ago by gjyshi.
Thank you its nice to see this in options, so we can say that
um_is_profile_owner()
is an alternative ofbp_is_my_profile()
in BuddyPress ??Thank you for your help.
I just tried to create a new function:
function is_my_profile() {
global $current_user;
$user_id = um_profile_id();
$current_user_id = get_current_user_id();
if ( is_user_logged_in() && $current_user_id === $user_id ) {
$my_profile = true;
} else {
$my_profile = false;
}
return apply_filters( 'is_my_profile', $my_profile );
}and in my previous function which adds custom tab with content I tried:
if ( is_user_logged_in() && is_my_profile() ) {
No Luck.
- This reply was modified 1 year ago by gjyshi.
No, I don’t see it .
As I said in my question before I was using buddypress with the
bp_is_my_profile()
so is there any alternative for UM which does he same job?My custom tab has a short code that allows users to post WordPress posts from their profile. When Im logged in as USER1 I go to my profile page using
um_user_profile_url()
but when I search users directory If I go to the USER2′s profile I don’t want too see the custom tab.This is my last try:
global $current_user;
$user_id = um_profile_id();
$current_user_id = wp_get_current_user();
if ( is_user_logged_in() && $current_user_id === $user_id ) {In fact the code looks fine but I don′t know why its hiding the custom tab also for the logged user USER1
I am so sorry my English is so so.
it does the same I see custom tab button on other profiles too
- This reply was modified 1 year ago by gjyshi.