Reventlov
Forum Replies Created
-
Forum: Reviews
In reply to: [Secure Custom Fields] ACF is Great, but has been replaced.+1
In addition. I changed my code with the new filters you provided (pmpro_no_access_message_header and pmpro_no_access_message_body).
function custom_pmpro_no_access_message_header( $header, $level_ids ) { $header = '<h2 class="pmpro_card_title pmpro_font-large">Accès réservé aux membres</h2>'; return $header; } add_filter( 'pmpro_no_access_message_header', 'custom_pmpro_no_access_message_header', 10, 2 ); function custom_pmpro_no_access_message_body( $body, $level_ids ) { $current_url = home_url(add_query_arg(array())); $encoded_url = urlencode($current_url); $login_url = home_url('/login/') . '?redirect_to=' . $encoded_url; $register_url = home_url('/register/') . '?redirect_to=' . $encoded_url; $new_body = "<div class=\"pmpro_content_message\"><p>Cette fonctionnalité est exclusivement réservée aux membres inscrits. L'inscription est gratuite</p></div> <div><a class=\"btn-1\" href=\"{$login_url}\">Connectez-vous</a> <a class=\"btn-2\" href=\"{$register_url}\">Créer un compte gratuitement</a></div>"; return $new_body; } add_filter( 'pmpro_no_access_message_body', 'custom_pmpro_no_access_message_body', 10, 2 );
This code works well, but I encountered a few issues:
1. The SVG icon is encapsulated in an <h2> tag, which results in a duplicate <h2> tag:
<div class="pmpro"> <div class="pmpro_card pmpro_content_message"> <h2 class="pmpro_card_title pmpro_font-large"> <svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="var(--pmpro--color--accent)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-lock"> <rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect> <path d="M7 11V7a5 5 0 0 1 10 0v4"></path> </svg> </h2> <h2 class="pmpro_card_title pmpro_font-large">Accès réservé aux membres</h2> <div class="pmpro_card_content"> <div class="pmpro_content_message"> <p>Cette fonctionnalité est exclusivement réservée aux membres inscrits. L'inscription est gratuite</p> </div> <div> <a class="btn-1" href="https://monsite.com/login/?redirect_to=https%3A%2F%2Fmonsite.com%2Fsuggerer%2F">Connectez-vous</a> <a class="btn-2" href="https://monsite.com/register/?redirect_to=https%3A%2F%2Fmonsite.com%2Fsuggerer%2F">Créer un compte gratuitement</a> </div> </div> <div class="pmpro_card_actions pmpro_font-medium">Déjà inscrit ? <a href="https://monsite.com/login/?redirect_to=https%3A%2F%2Fmonsite.com%2Fsuggerer%2F">Connectez-vous ici</a></div> </div> </div>
2. The message inside the pmpro_card_actions pmpro_font-medium div persists, and I’m not sure how to remove or customize this part.
Could you please advise on how to address these issues?
Thank you for your help.
Best regards,`
Hi @jarryd-long ,
We wrote at the same time! The planets are aligned. I reopened the thread.
Thank you for your detailed response and the various resources for staying updated with PMPro changes. I will definitely sign up for the newsletter and follow the GitHub repository.
Regarding my specific needs, I use the following snippet to customize the restriction message:
function custom_pmpro_non_member_message( $message ) { $current_url = home_url(add_query_arg(array())); $encoded_url = urlencode($current_url); $login_url = home_url('/login/') . '?redirect_to=' . $encoded_url; $register_url = home_url('/register/') . '?redirect_to=' . $encoded_url; $new_message = "<div class=\"pmpro_content_message\"><p>Cette fonctionnalité est exclusivement réservée aux Membres inscrits. L'inscription est gratuite</p></div> <div><a class=\"btn-1\" href=\"{$login_url}\">Connectez-vous</a> <a class=\"btn-2\" href=\"{$register_url}\">Créer un compte gratuitement</a></div>"; return $new_message; } add_filter( 'pmpro_non_member_text_filter', 'custom_pmpro_non_member_message' ); add_filter( 'pmpro_not_logged_in_text_filter', 'custom_pmpro_non_member_message' );
This snippet works as intended since I disabled the “custom message” field in the settings. However, I’m left with an <h2> tag and the <div class=”pmpro_card_actions pmpro_font-medium”> that remain visible:
<div class="pmpro"> <div class="pmpro_card pmpro_content_message"> <h2 class="pmpro_card_title pmpro_font-large"> <svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="var(--pmpro--color--accent)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-lock"> <rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect> <path d="M7 11V7a5 5 0 0 1 10 0v4"></path> </svg> Membre Membership Required </h2> <div class="pmpro_card_content"> <!-- my snippet message --> <div class="pmpro_content_message"> <p>Cette fonctionnalité est exclusivement réservée aux membres inscrits. L'inscription est gratuite</p> </div> <div> <a class="btn-1" href="/login/?redirect_to=https%3A%2F%2Fmon.site.com%2Fsuggerer%2F">Connectez-vous</a> <a class="btn-2" href="/register/?redirect_to=https%3A%2F%2Fmonsite.com%2Fsuggerer%2F">Créer un compte gratuitement</a> </div> <!-- end of my snippet message --> </div> <div class="pmpro_card_actions pmpro_font-medium"> Déjà inscrit ? <a href="/login/?redirect_to=https%3A%2F%2Fmonsite.com%2Fsuggerer%2F">Connectez-vous ici</a> </div> </div> </div>
I have temporarily hidden these elements using CSS but it’s not the best :
.pmpro-level-required .pmpro_card_title, .pmpro-level-required .pmpro_card_actions { display: none !important; }
It seems that the <h2> tag with “Member required” is not translatable.
If I understand correctly, the filters pmpro_no_access_message_header and pmpro_no_access_message_body can help me modify the texts in the <h2> and the pmpro_card_actions pmpro_font-medium div?
Thank you again for your assistance.
Best regards,
- This reply was modified 3 months, 2 weeks ago by Reventlov.
Forum: Plugins
In reply to: [Google Authenticator - WordPress 2FA, OTP SMS and Email] CSS conflictHi,
Thank you ! It’s really appreciated !
Regards.
Hello,
Thank you for your time! It’s really appreciated.
I tried again and here are some additional details:
I have set specific capabilities for the editor role (manage_burst_statistics, view_burst_statistics).
- When I log in as an admin, Burst runs perfectly.
- Using View Admin As, I switch to a “global” editor role: it works for Burst.
- Using View Admin As, I switch to a specific user who has the editor user role: it doesn’t work.
This issue is not specific to the editor user role. Any user role with the Burst capabilities reacts the same way. The global role works, but specific users do not.
If you can’t reproduce the issue, I will do my best to set up a clean staging environment as requested.
Have a good day.
Best regards,
- This reply was modified 3 months, 2 weeks ago by Reventlov.
Hello @elliotvs
Just for information, in order to remove the problem I had to rollback to the 1.19.0 release.
Regards.
Hi,
No, unfortunately i still have 2 or 3 challenges (on several websites)
Regards.
I understand that renaming the folder involves significant changes and appreciate that you’ve added it as a feature request for future consideration. This adjustment would greatly enhance the plugin’s usability for many users, especially those affected by ad blockers.
If possible, could you provide a link to your development roadmap or any updates on this feature? It would be helpful to stay informed about potential improvements.
Thank you.
Best regards,
Hi @rogierlankhorst,
Thank you for your continued assistance.
After conducting several tests, I believe I have identified the source of the problem. To view the site as my clients do, I use the “View Admin As” plugin. However, when I switch to the editor view, it prevents the statistics from being displayed. Conversely, when I log in directly as an editor, the statistics appear correctly.
I think the issue might be due to an incompatibility between “View Admin As” and the Burst plugin. In fact, I don’t have an issue since my editor clients can see their statistics.
Thanks again for your help and time.
Best regards,`
Hi,
Thank you for your time with it.
I make some tests this week and will be back to you.
Regards.
I use https://www.ads-software.com/plugins/user-role-editor/
My settings : https://prnt.sc/v6buOdRRPljz
Hello,
Tahnk you for you reply.
As I told you in my first post, the role has both capabilities “view_burst_statistics” and “manage_burst_statistics capability”.
The issue appears with that configuration.Regards.
Forum: Plugins
In reply to: [Yoast SEO] Date and dash forced in my meta description, why?!Thank you @maybellyne
Forum: Plugins
In reply to: [Yoast SEO] Date and dash forced in my meta description, why?!Hi,
Same for me.
I read https://yoast.com/help/date-appears-search-results/.
But I don’t want this date in metadescription anyway.