udelledo
Forum Replies Created
-
Yes I followed the procedure to rescan the base language file and it updated some keys.
Now the changes I made are picked up.
In the changes I’m making I’m using a tailored lingo for our user, if it could still be useful for you I’d be happy to push my changes to the Git repository.
Regards
Forum: Hacks
In reply to: configuration value definition and managementDeveloping the Settings functions inside a plugin and adding them to an existing group ‘misc’ worked like a charm!!!!
Thanks a lot bcworkz
Forum: Hacks
In reply to: configuration value definition and managementHi bcworkz! thanks for your suggestion!!!
I’ll look into your approach and will post an update
Forum: Hacks
In reply to: user validation and redirect cause blank pageIt was easier than I thought
is_page('logout')
worked like a charm
Forum: Hacks
In reply to: user validation and redirect cause blank pageAfter playing around some more with filters and action I came out with the following working solution
function validate_user_profile($redirect_to){ //Check user membership if(is_user_logged_in() && pmpro_hasMembershipLevel(2) && !is_page( 'Account' )){ //Required fields $field_to_check = array('codice_fiscale','citta_nascita','data_nascita','citta_residenza','telefono','cap','via'); $user_ID = get_current_user_id(); for($i = 0; $i < count($field_to_check); ++$i) { $field_value = get_user_meta($user_ID, $field_to_check[$i], 'TRUE'); //Retrieve field value if(empty($field_value)){ wp_redirect(get_permalink(get_page_by_title('Account')->ID)); //Redirect to profile page if value is missing exit;} } } } add_action('wp', 'validate_user_profile');
I’m not sure why using the wp_head filter wasn’t working but gladly now it does ??
However I just noticed a bug in this code: unless the user does not fill the details he’s not allowed to logout!!!
I’ll look for a way to check if the page is the logout link to add in the first if condition and that should be it
Forum: Plugins
In reply to: [Membership 2] Access Level shortcode not processedyes that’s exactly the issue
The codes are included in the event description that has the same editing option as a wp post and I edited them using the text option to avoid nasty hidden elements. In addition to that the images I posted before are actually the same content and not two different elements.
Unfortunately I can’t try it on a live site yet however my local installation is a fully enabled mamp installation I usually find more errors on live sites than my local installation, do you have any specific configuration in mind?
Forum: Plugins
In reply to: [Membership 2] Access Level shortcode not processedI’m not seeing any error.
About disabling other plugins, the main plugin that I’m using and need to keep active is EventEspresso and the error is occurring on one of the page rendered by the event plugin (the event detail page). I don’t think in my case is useful to disable the plugin because the shortcodes works correctly on standard wordpress pages as well as other views rendered by the same event plugin (event list and calendar tooltip).
I understand that the rendering of different views have different implementation so the plugin might still be root cause of the issue however I asked for help here first because analyzing the problem I made some tests and noticed that “static” shortcodes like [renewform] work correctly on all pages even the one where the access level are not working.
Hence I thought that there should be some difference in how the renew form and access level shortcodes are processed and you could help me find it.
Forum: Plugins
In reply to: [Membership 2] Access Level shortcode not processedThe working screenshot is actually a tooltip and the content is rendered on the page load in the same way as the page where the short codes are showing up.
Those pages are two different rendering of the same content managed by another plugin that I can’t disable since it’s the core plugin for the content I’m planning to manage.
I understand that you are not meant to support interferences from other plugin but I’m just looking for some direction on how to identify the problem, also considering that others shortcode like [renewform] work correctly in both pages
Forum: Plugins
In reply to: [Membership 2] Access Level shortcode not processedHi Mike,
thanks for your quick response!!!
I’m using the shortcodes copied from the admin interface the current values are:
[level-socio-standard] Protected content [/level-socio-standard]
[level-amico-di-radical] Contente for everyone else [/level-amico-di-radical]I’ve uploaded some pictures on dropbox for examples the working one is showing correctly only the text “Devi essere tesserato per poter acquistare l’evento” since I’m browsing as an anonymous user
The not working one on the other hand shows the plain shortcodes I used.
From what I’m reading I’m starting to think it might depend on the order in which the filters are applied but I’m not sure yet where I should look