Fernando
Forum Replies Created
-
So, I just found out that there’s a way to fix the 404 issue with the Custom Post Type Permalinks plugin using the following code:
function prevent_flush() { update_option('dbem_flush_needed',0); } add_action("em_options_save","prevent_flush");
However, I’d like to know if there’s any risk or drawback in using this method.
Forum: Plugins
In reply to: [Custom Post Type Permalinks] 404 file not foundsame here, I cannot get the /%post_id%/ to work. Any suggestions?
Yes,
As you can see in that last code I posted I even registered the value of the $action and $item_id as meta values for the published Event, and they have the correct values. I also continued testing and found out that the conditional statement is, in fact, working; the only thing not working is the return. The function doesn’t return the string with the link, but I’m not sure why.I’m not WordPress expert, but shouldn’t it be possible to return anything from an Action hook? or did I get that wrong?
I went ahead and tweaked my second function a little bit to do some debugging
function ppt_add_new_event_notification($action, $item_id) { update_post_meta($item_id, 'em_hook_working', 'yes'); if(!empty($action)){ update_post_meta($item_id, 'em_action_content', $action); } if(!empty($item_id)){ update_post_meta($item_id, 'em_item_id_content', $item_id); } switch ($action) { case 'ppt_new_event': return '<a href="' . get_permalink($item_id) . '" title="' . __( 'New Event', 'events-manager') . '">' . __('You have added a new event','events-manager'). '</a>'; break; } }
To my surprise, the hook does appear to be working and both of the arguments I’m using have the value they’re supposed to have.
So, at this point I’m very confused on why the conditional statement is not working when used inside this particular function.
Hi caimin,
Thanks for your answer.
The curious thing is that If I copy and paste my conditional statementswitch ($action) { case 'ppt_new_event': return '<a href="' . get_permalink($item_id) . '" title="' . __( 'New Event', 'events-manager') . '">' . __('You have added a new event','events-manager'). '</a>'; break; }
directly into the “bp_em_format_notifications” function at “events-manager\buddypress\bp-em-notifications.php”, then the code works perfectly, which means that the problem might be the Action hook itself (?), maybe a priority issue (?).
Anyway, thanks for your suggestions, I’ll let you know if I find the solution.
Forum: Plugins
In reply to: [Playbuzz] translate button textI’ve just created my first poll in Spanish ??
Just a little feedback from a native-spanish speaker:
Instead of using “100% ?VOTADO [option]” in the result label for the polls, I would suggest either:
“?100% VOTó POR [option] !”
or
“?100% HA VOTADO POR [option]! “
Let me know if you guys would like some more feedback for any other Spanish labels.
Forum: Plugins
In reply to: [Playbuzz] translate button textAwesome! Thank you for your quick replies
Forum: Plugins
In reply to: [Playbuzz] translate button textHi,
At first that’s what I thought too, but even when I select the Spanish option I still get the result labels in English (in both the native and the embedded version)
For example, in the following quiz (https://www.playbuzz.com/aliciag12/encuesta-de-prueba-test-poll) the result label when the user chooses an option says “Chose” as opposed to the spanish translation “Escogió”. As I said before, the Language is already set to Spanish. The same thing happens when I embed the quiz in my website.
Is there something I’m not doing right?
Forum: Plugins
In reply to: [Playbuzz] translate button textHI,
Any updates on the multilingual support for the labels? That’s really the only thing stopping me from using your quizzes. I’m really interesed in Spanish labels.