laiconsulting
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: How to do pre_get_posts action?Hello @ashfame
it worked. Many thanks for looking into my code and your suggestion.
Best regards,
Alan@senribb
a reminder that multisite is NOT supported for the free version of “reCaptcha by BestWebSoft”thanks for the suggestion.
I don’t have any\n
in keys.
Could you perhaps point me to some tutorial how headless social login should work?
For example, do I need any custom code to communicate with Google API to authenticate Google logins? Or the JWT from Google will suffice to log in to WP.I believe what may be wrong is rather my configuration and my assumption that the JWT from Google alone can log into WP with Simple-JWT-login.
Thanks,
Forum: Plugins
In reply to: [The Events Calendar] Change Events URL Slug programmaticallyNevermind.
Based on your previous snippet, I added this line.
if( Tribe__Settings_Manager::get_option("google_maps_js_api_key") != GOOG_MAP_KEY ) Tribe__Settings_Manager::set_option("google_maps_js_api_key",GOOG_MAP_KEY);
It does the jobForum: Plugins
In reply to: [The Events Calendar] Change Events URL Slug programmatically@sjaure
I have a strange problem regarding to setting the default api key
When I runTribe__Events__Google__Maps_API_Key::$default_api_key
, it displays the key I want to be used, however when I look in the DB directly, it is still the default TEC key. And what is used by the map widget is still the TEC api key, not mine.Is that a way to remedy it?
Or filter it to my key somehow?Forum: Plugins
In reply to: [Getwid - Gutenberg Blocks] Bug: contents in hotspot image not i18n’sedhttps://gitlab.com/beauvoyage/twentytwenty-child/uploads/363b1001f4215e6f54318bfeea88fb28/image.png
When I use Translatepress to translate the content to another language, then the contents of the hotspot widget aren’t translated.
resolved
Forum: Plugins
In reply to: [The Events Calendar] Change Events URL Slug programmaticallyMany thanks again for the help!
Forum: Plugins
In reply to: [The Events Calendar] Change Events URL Slug programmatically@sjaure
many thanks for the code snippet. That’s very helpful.
May I ask one more question.How do I change the default google map api key without editing plugin code?
I’d like subsites to inherit one key without users having to deal with setting. If there is a constant to define, that would be ideal.I have come up with the following code, but it doesn’t work somehow.
add_filter( 'tribe_field_value', 'bv_populate_field_with_default_api_key' , 8, 2 ); function bv_populate_field_with_default_api_key( $value_string, $field_name ) { if ( ! isset( $field_name ) || 'google_maps_js_api_key' !== $field_name ) { return $value_string; } if ( ($value_string == "AIzaSyDNsicAsP6-VuGtAb1O9riI3oc_NOb7IOU" || empty( $value_string )) && function_exists('tribe_update_option') ) { remove_filter( 'tribe_field_value', array( $this, 'bv_populate_field_with_default_api_key' ), 8, 2 ); $value_string = GOOG_MAP_KEY; tribe_update_option( 'google_maps_js_api_key', GOOG_MAP_KEY ); add_filter( 'tribe_field_value', array( $this, 'bv_populate_field_with_default_api_key' ), 8, 2 ); }
May I ask one unrelated question.
How do I change the default google map api key without editing plugin code?
I’d like subsites to inherit one key without users having to deal with setting. If there is a constant to define, that would be ideal.I have come up with something like this
add_filter( 'tribe_field_value', 'bv_populate_field_with_default_api_key' , 8, 2 ); function bv_populate_field_with_default_api_key( $value_string, $field_name ) { if ( ! isset( $field_name ) || 'google_maps_js_api_key' !== $field_name ) { return $value_string; } if ( ($value_string == "AIzaSyDNsicAsP6-VuGtAb1O9riI3oc_NOb7IOU" || empty( $value_string )) && function_exists('tribe_update_option') ) { remove_filter( 'tribe_field_value', array( $this, 'bv_populate_field_with_default_api_key' ), 8, 2 ); $value_string = GOOG_MAP_KEY; tribe_update_option( 'google_maps_js_api_key', GOOG_MAP_KEY ); add_filter( 'tribe_field_value', array( $this, 'bv_populate_field_with_default_api_key' ), 8, 2 ); } return $value_string; }
except it doesn’t work
- This reply was modified 4 years, 9 months ago by laiconsulting.
Amazing!
it really worked
Thanks.It worked!
Thanks @dmytro
Perhaps one more newbie question.
How do I get rid of the button in the price box?Understood. Thanks for the helpful response.
- This reply was modified 4 years, 9 months ago by laiconsulting.
Forum: Fixing WordPress
In reply to: How to disable “Welcome to the Block Editor” OptionSo how do we disable this welcome message?
Could we make it not show at all? Not even once?