ivanmessina
Forum Replies Created
Viewing 3 replies - 1 through 3 (of 3 total)
-
Forum: Plugins
In reply to: [Multisite Language Switcher] Author BIOThanks. I was hoping for a built-in solution.
I already have an ACF field for every author bio (one for every language, so I made a filter and show the correct one depending on the language of the blog:
add_filter( 'get_the_author_user_description', 'filter_the_content_in_the_main_loop', 1 );
function filter_the_content_in_the_main_loop( ) {
$blog = msls_blog_collection()->get_current_blog();
$alpha2 = $blog->get_alpha2();
$field = ( $alpha2 == 'en' ) ? 'short_bio' : 'short_bio_italian';
$author_id = get_the_author_meta('ID');
$author_field = wp_strip_all_tags( get_field($field, 'user_'. $author_id ) );
return $author_field;
}posting this in case someone gets to this post in the future
Forum: Plugins
In reply to: [SVG Block] svg content get deletedTo be honest, I wouldn’t allow everyone to upload SVG for security purposes. You may just add my solution in the readme/documentation.
Adding a setting might be just too much work for something probably no one needs, like this.
Forum: Plugins
In reply to: [SVG Block] svg content get deletedSince i found the issue and the solution, I’ll share it here.
It’s not the plugin , it’s WordPress stripping the tags, I solved following this: https://mkaz.blog/wordpress/allowing-svg-in-wordpress-content
Viewing 3 replies - 1 through 3 (of 3 total)