Modify how gallery.js builds the shortcode [gallery ...] in tinyMCE?
Modify how gallery.js builds the shortcode in tinyMCE?
Modify how gallery.js builds the shortcode in tinyMCE?
The video player uses the $content_width variable, which you’ll find in functions.php within the theme. The $content_width defines the best fit for media on a particular theme, so this should be the best fit for twentyfourteen. You’d set your own value in your own theme.
There are two ways that error can be triggered ( source ): user does not have unfiltered_upload capability; WP does not like file type or extension. Latter is checked by wp_check_filetype_and_ext() function ( source ) that filters return through wp_check_filetype_and_ext hook to allow validation of additional file types.
Dear I have wasted my week on this problem, basically when you select static page as your home page in setting->reading of wordpress the complete behavior of listing things are changed, basically static pages are never meant for pagination the fact is when you call the $paged variable it will always return zero even if … Read more
I’m not sure if this is exactly what you’re looking for, but you might want to check out: get_attached_media() and wp_get_attachment_url().
I’m not too familiar with Imagick, but if you can get a URL for the image you’ve created with it, then the rest is fairly straightforward using WordPress’s media_sideload_image() function. Here’s a basic example that would work from wp-admin area(like settings page). Note that it looks like you’d use your $id variable in place of … Read more
Check if the argument is present, and if it isn’t return the default value: if(!isset($_REQUEST[‘post_id’])) return $upload; // cast it to integer to avoid problems $id = (int)$_REQUEST[‘post_id’]; …
The OP had a .htaccess file in the uploads directory
Sadly, I haven’t found the flaw in your code as far as update counts. Copy and paste mine for comparison (stick it in a plugin you can easily deactivate). This works like a charm, with all counts updating correctly: class ZGAttachmentTags { const SLUG = ‘attachment-tags’; function __construct() { add_action( ‘init’, array( $this, ‘register_custom_taxonomy’ ) … Read more
I think what you need is (function(){ var featuredImage = wp.media.featuredImage.frame(); featuredImage.on(‘select’, function(){ var attachment = featuredImage.state().get(‘selection’).first().toJSON(); console.log(attachment); }); })(); The attachment object should have height and width properties.