Hot answers tagged

1

You’re right...the figcaptions are encoded as html in $block['innerHTML']. You could do sth. like $tmpArray = explode('</li>',$block['innerHTML']); before your foreach loop to split the HTML string into an array that matches your gallery items and inside the loop strip_tags($tmpArray[i]); to strip away all html tags and only get the text string inside &...


1

To validate uploads WordPress compares the MIME type of the file to the allowed MIME types for that extension. So when the file is uploaded, WordPress checks for the file extension, .svg, and the file's MIME type. It then these against the allowed MIME type for the .svg extension. If the detected MIME type does not match, then the upload is refused. The ...


1

It seems that in the recent releases of WordPress, changes were made to the mime type handling to make sure that files have the extension they say they do: https://make.wordpress.org/core/2018/12/13/backwards-compatibility-breaks-in-5-0-1/ This poses an issue for SVG files without the tag in them. SVG is actually an XML, and WordPress is now requiring to ...


1

Something like this should work : $args = array ( 'post_type' => array( 'post', 'attachment'), 'category' => ARTICLE_CATID ); $query = new WP_Query( $args );


1

Look at replay by Roberto: https://stackoverflow.com/questions/33375823/error-dispatching-request-to-apache RequestReadTimeout handshake=0 header=20-600,MinRate=500 body=20,MinRate=500 By default Apache will stop upload after 20-30 seconds. With this directive placed into Apache config upload will continue up to 600 seconds as long as user is sending at ...


Only top voted, non community-wiki answers of a minimum length are eligible