efrap
Forum Replies Created
-
To fix this lastest reported bug, I have added code to the uwp_get_page_link function in /includes/helpers/permalinks.php
Original function:
function uwp_get_page_link($page_type) { $page = new UsersWP_Pages(); return $page->get_page_link($page_type); }
Modified function (for polylang)
function uwp_get_page_link($page_type) { $page = new UsersWP_Pages(); $url = $page->get_page_link($page_type); $post_id = url_to_postid( $url ); // find id from url $trans_id = pll_get_post( $post_id); // find correct id $trans_url = get_permalink($trans_id); // get permalink from id return $trans_url; }
This does not work on login menu link though, still main language link.
If you based the page links on ID of page instead of permalinks, this might fix the problem.
EDIT
A simpler change can be made upstream in /inludes/class-pages.php, at end of file.
Original code
if ($page_id) { if (uwp_is_wpml()) { $wpml_page_id = uwp_wpml_object_id($page_id, 'page', true, ICL_LANGUAGE_CODE); if (!empty($wpml_page_id)) { $page_id = $wpml_page_id; } } $link = $page_id; if($get_link){ $link = get_permalink($page_id); } }
Changed code
if ($page_id) { if (uwp_is_wpml()) { $wpml_page_id = uwp_wpml_object_id($page_id, 'page', true, ICL_LANGUAGE_CODE); if (!empty($wpml_page_id)) { $page_id = $wpml_page_id; } } // added polylang code if (class_exists('Polylang')){ $page_id = pll_get_post( $page_id); } $link = $page_id; if($get_link){ $link = get_permalink($page_id); } }
Still does not change Login menu url.
Also, links like ‘forgot password’ and ‘create account’ all link back to main language.
Bypassing the css problem can done with alternate css coding.
But the login menu does not play nice with a multilingual site and always sends user to main language login page, even if I change the menu url to the correct page. Logout menu works fine.
This is not a deal breaker, as I can use a couple of other plugins to make this work.
The issues do reappear again if I add an additional css class to the menus.
Issue solved by inserting the menus again. Thank you.
Again, great plugin.
Correction – although visibility is solved, log out link still incomplete. /wp-login.php
- This reply was modified 5 years, 10 months ago by efrap.
Solved. Needed to call secondary menu with esc_html__ in functions.php.
Forum: Plugins
In reply to: [Eonet Manual User Approve] How not to hack the login form?Also having problems using with TML. I will try modifying the php file, but after viewing it, I don’t see what could be done.
Forum: Plugins
In reply to: [Multi Rating] Custom fields not exporting to csvThis is the version I was given for a client project – no key provided at the moment, will try to get it updated. Problem was with incomplete code for custom fields in tools.php ($show_custom_fields line 428). Nice plugin overall.
Forum: Plugins
In reply to: [Multi Rating] Custom fields not exporting to csvYes, is see now that this is the wrong support forum for the pro version. But I did find the problem in the csv export code.
- This reply was modified 7 years, 8 months ago by efrap.
Forum: Plugins
In reply to: [Multi Rating] Anyway to add checkboxes as custom field?Good to know, thanks. I still need checkboxes instead of radio buttons, and be able to export to csv.
Forum: Plugins
In reply to: [Live Composer - Free WordPress Website Builder] Template for custom taxonomyHello, I reported the bug on Github. I was informed that this may take awhile to address. Using a workaround for now. Live composer is great, thank you.
Forum: Plugins
In reply to: [Live Composer - Free WordPress Website Builder] Template for custom taxonomyCustom taxonomies archive templates work with LC posts, but not with custom posts.
I would also like to know
Forum: Plugins
In reply to: [WC Fields Factory] Hide meta from order and emailsSince I have no need to display any meta, I have simplified your function:
function hide_wcff_meta( $output, $order ) { $html = ''; return $html; } add_filter( 'woocommerce_order_items_meta_display', 'hide_wcff_meta', 99, 2 );
Thank you for directing me to a solution.