tobaco
Forum Replies Created
-
Thanks for the function, but this doesn’t seem to work. I logged the urls, which run trough this filter, but there are none with “burst” in it.
The api calls seem to use the url, which is defined in the html:
wp.apiFetch.use( wp.apiFetch.createRootURLMiddleware( "https://mydomain.dev/en/wp-json/" ) );Api calls from other plugins use this rootUrl (with language) without problems (returns json and not a 404), so I can’t modify every rest url. :-/
Hi and thanks for your response!
We are using WPML for the languages. How does the plugin decide between endpoint and api? We don’t have any security plugins enabled right now. I also changed the access rights for the endpoint.php to 664. But it still uses the api for tracking. This also applies to the backend display of the stats. This also only works in the main language, not in the other ones. Here it’s the same problem with the appended lang slug for the api call.
Thanks for your help!
Forum: Plugins
In reply to: [WP GoToWebinar] API Host and API Authentication Token DeprecationHi,
has this problem been solved yet? I have seen that v15.0 had some changes regarding authentication. Are there any other changes that need to be made to comply with the upcoming API changes?
Thanks!
Forum: Plugins
In reply to: [WP REST Cache] Exclude Routes when regenerating chacheHi Richard,
Thank you for your response. Among other requests, those oembed requests have the highest hit counts. When a post is published, it’s also shared on Mastodon, which utilizes the oembed API to show a preview. Consequently, the numbers spike on the first day but then plateau in the following days. Therefore, these requests would be regenerated with priority (highest counts), but are irrelevant at that regenerate time.
On further consideration, it might be beneficial to have a method to specify that the cache for certain routes should not only be flushed but entirely deleted upon expiration. This would help free up the database from items that initially require caching but become unnecessary later.
Forum: Plugins
In reply to: [WP GoToWebinar] Error-Messages should be returned not echoedThanks! 😃
Forum: Plugins
In reply to: [Redis Object Cache] Fatal Error after update to 2.3.0@solankiankeet You can download the 2.2.4 version here: https://ww.wp.xz.cn/plugins/redis-cache/advanced/#:~:text=Previous%20versions
Hi Riza,
thanks for your response!
I have a custom post type and multiple posts within.
After I created the posts, I set the expiration dates. One post at a time. In my example I used two dates, one in the near future and one after multiple weeks. When the first post expired, the other one also was set to draft.Thanks!
Forum: Plugins
In reply to: [Sharing Image] Yoast compatibilityHi and thanks!
this is what i use now to set the og:image for Yoast SEO.
/* Change Open Graph image URLs in Yoast SEO */ function change_opengraph_image_url( $url ) { $queried_object = get_queried_object(); if(is_object($queried_object) && $queried_object->ID){ // check if there is an custom image set $hasYoastImage = get_post_meta( $queried_object->ID, '_yoast_wpseo_opengraph-image-id', true ); if($hasYoastImage) return $url; $sharingImage = sharing_image_poster_src($queried_object->ID); if(is_array($sharingImage) && isset($sharingImage[0])){ $url = $sharingImage[0]; } } return $url; } add_filter( 'wpseo_opengraph_image', 'change_opengraph_image_url' ); /** * @param bool $hide_header Set true to hide poster meta. */ function hide_sharing_meta( $hide_meta ) { return true; } add_filter( 'sharing_image_hide_meta', 'hide_sharing_meta' );🤦🏼♂️
Das war zu einfach für mich. Das hatte ich so nicht erwartet. 😉Dankeschön!
Forum: Plugins
In reply to: [Autoptimize] Not working on homepagehm, you are right.
/musik is a category page. it seems like these pages and also tag pages (/serien/antritt) and custom post type archives (/blog) are not working. They have separate template files, but nothing unusual.
On pages and posts it works as expected.Forum: Plugins
In reply to: [Autoptimize] Not working on homepageOh, yes, sorry. it’s https://detektor.fm/
Thanks!
Forum: Plugins
In reply to: [Media Library Assistant] Extract chapter info from mp3?Thanks for the fix, which works perfectly!
I think we can close this issue now and mark it as resolved.Thanks again!
Forum: Plugins
In reply to: [Media Library Assistant] Extract chapter info from mp3?Hi and thanks for your reply.
Yes, it’s stored as an array, but this array contains “subarrays” which are returned as a string. Here’s a var_dump from my get_post_meta function call:array(10) { [0]=> string(95) "array ( 'time_begin' => 9006, 'time_end' => 41568, 'chapter_name' => 'Begrüßung', )" [1]=> string(113) "array ( 'time_begin' => 41568, 'time_end' => 431204, 'chapter_name' => 'destilliert ab sofort monatlich', )" [2]=> string(117) "array ( 'time_begin' => 431204, 'time_end' => 597178, 'chapter_name' => 'Flugscham beim eigenen Urlaubsflug', )" [3]=> string(114) "array ( 'time_begin' => 597178, 'time_end' => 683498, 'chapter_name' => 'Ausblick auf shots im September', )" [4]=> string(105) "array ( 'time_begin' => 683498, 'time_end' => 776455, 'chapter_name' => 'Midsommar bald im Kino', )" [5]=> string(106) "array ( 'time_begin' => 776455, 'time_end' => 866014, 'chapter_name' => 'Mailverhalten im Urlaub', )" [6]=> string(111) "array ( 'time_begin' => 866014, 'time_end' => 1022148, 'chapter_name' => 'Brexit als Nachrichtenthema', )" [7]=> string(117) "array ( 'time_begin' => 1022148, 'time_end' => 1086384, 'chapter_name' => 'Wanda in der detektor.fm Session', )" [8]=> string(107) "array ( 'time_begin' => 1086384, 'time_end' => 1123433, 'chapter_name' => 'Ad Astra mit Brad Pitt', )" [9]=> string(99) "array ( 'time_begin' => 1123433, 'time_end' => 1151000, 'chapter_name' => 'Verabschiedung', )" }Every chapter is an array as a string. That’s what I meant. Sorry for the confusion.
Forum: Plugins
In reply to: [Media Library Assistant] Extract chapter info from mp3?Hi David,
thanks for your response and looking clarifying the issue with the cover images (sorry for blaming your plugin 😉 ) and pointing out the solution with the native option.
Since the arrays are stored as a string in the post meta field, do you have a solution to convert them back to a “real” array?
I know, I could use eval(), but this seems kind of evil.Right now I’m using this function to convert the string to an array:
function strtoarray($a, $withKeys = true){ $arr = []; $a = ltrim($a, '['); $a = ltrim($a, 'array('); $a = ltrim($a, 'array ('); $a = rtrim($a, ']'); $a = rtrim($a, ')'); $tmpArr = explode(",", $a); foreach ($tmpArr as $v) { if($withKeys){ $tmp = explode("=>", $v); $k = $tmp[0]; $nv = $tmp[1]; $k = trim(trim($k), "'"); $k = trim(trim($k), '"'); $nv = trim(trim($nv), "'"); $nv = trim(trim($nv), '"'); $arr[$k] = $nv; } else { $v = trim(trim($v), "'"); $v = trim(trim($v), '"'); $arr[] = $v; } } return array_filter($arr); }This works, but feels hacky. If I think about it right now, it would be nice to store this data as a json string in the database. Would this be possible?
Thanks!
Forum: Plugins
In reply to: [Media Library Assistant] Extract chapter info from mp3?WOW, thanks for your research and help! This is so great! I’m kind of speechless …
This works as you described it.
Just 2 last questions:
1. I checked the box “Delete NULL Values Do not store empty custom field values” but my new custom field is now also saved with every upload which does not contain id3-tags or chapters (images etc.). It’s just an empty field there. I thought this checkbox would prevent this. Is this a bug or does this checkbox has another meaning.
2. With every upload of a mp3 with a cover image, the image from this file get’s also added to the media library and is set up as featured image to the mp3 file entry. Is there a way to disable this? I already unchecked the checkboxes “Enable Featured Images” and “Enable Featured Image Generation”, but this seems to have no effect.
Thanks again and kind regards!