Tag Info

Hot answers tagged

15

SVG can contain JavaScript. JavaScript can be used to hijack cookies or do other questionable actions. It can even be "hidden" in namespaces: <html xmlns:ø="http://www.w3.org/1999/xhtml"> <ø:script src="//0x.lv/" /> </html> source It is very hard to filter that out during the upload, so it is just not allowed by default.


2

In order to show new image dimension options in the WordPress admin media library you would need to use the image_size_names_choose filter to assign them a name. So the code in your functions.php should look something like this: if ( function_exists( 'add_image_size' ) ) { add_image_size( 'single-post-medium', 515 ); add_image_size( ...


1

To load admin scripts only on your pages, you should use the $hook-parameter: function enqueue_scripts( $hook ) { if( 'my-page' != $hook ) return; wp_enqueue_script('jquery'); wp_enqueue_media(); // etc... } add_action('admin_enqueue_scripts', 'enqueue_scripts'); Concerning the loading problem. This seems to be still an open problem. The ...


1

If this is still a problem, then you can find my answer on wordpress.org's support forum, it might help: wordpress.org/support/topic/resize-failure-on-some-images-with-odd-message This is a part of a code from the jQuery library, to be specific this part is responsible for handling callbacks. It is displayed, because the reponse from wordpres is ...



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