extract
takes and associative array and explodes it out in variables that reflect the array key names. $atts['height']
would just be $height
, in other words.
The relevant two lines of your code would become:
<param name="type" value="video/quicktime" height="'.$height.'" width="'.$width.'">
<embed src="'.$url.'" height="'.$height.'" width="'.$width.'" autoplay="false" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/">
If you did still want to use the indexing, make sure you surround array keys with quotes: $atts['height']
not $atts[height]. Replace extract
:
$atts = shortcode_atts( array(
'url' => '#',
'width' => '480',
'height' => '320'
), $atts )
Related Posts:
- Get first video from the post (both embed and video shortcodes)
- TED talks shortcode not working
- Set wmode attribute to transparent for the embed shortcode to make drop-down menu hover over YouTube embed in Internet Explorer
- Video embeds work in backend, but are not parsed in frontend
- Gist shortcode is not working
- Embedding Instagram via shortcode doesn’t work as advertised in official docs
- Instagram URL is converted into oEmbed
- How to create a shortcode for embedding pdf in iframe?
- Hook WP_Embed run_shortcode
- Detecting embeded video format
- Specifying a single file from multi-file GIST (wordpress.com) [closed]
- How to apply an ID to Shortcode Embedded iframe
- Responsive Embeds using default embed shortcode
- Auto embeds don’t work for attachment descriptions
- Is there any way to set the Featured image in wordpress post editor, using a Getty images embed code
- How to Enable embedding WordPress default gallery in comments?
- Do embed shortcode on wordpress ajax request
- Inserting a variable into a shortcode inside php
- How to stop unwanted splits in excerpts when using shortcodes for sliders or players
- Shortcode empty attribute
- Using wp_editor in shortcode
- Why are you using add_action for shortcode?
- How to get URL param to shortcode?
- How to display the names of users from a specific group with a shortcode?
- shortcode for logo image
- Stop strip_shortcodes() stripping content inside shortcodes
- Using audio shortcode for .mp3 URLs with a query string
- Get multiple shortcode attribute values
- How do i link gallery thumbnails to different url’s using the wp native gallery?
- Why do_shortcode is not executing the shortcode in data-* html attributes?
- How to display some selected user meta data on a specific page with a shortcode?
- Gallery shortcode menu order fix no longer working on WordPress 4.0
- How to save a shortcode in a Gutenberg custom block?
- has_shortcode for content added after the content
- Shortcode displays only default attribute values
- Can a shortcode function this way
- Dynamically create shortcodes using add_shortcode and a callback
- Creating a Slider Shortcode Based on Nivo Slider
- Passing attributes to shortcode dynamically
- Stop parsing shortcodes
- WordPress auto adds p to shortcode parameters
- Why isn’t this youtube shortcode working?
- How to set Contact Form 7 fields default value using shortcode attribute? [closed]
- Display post metadata: “title, category, author, date” with shortcode
- shortcode javascript not working on custom template file inside theme folder
- Check if post has gallery images/media
- Stop auto formatting in shortcodes
- Get URL Param Plugin and Inserting Result in Widget Code
- Add shortcode support to custom field
- Preserve shortcode content formatting
- Shortcode help: If no image entered take default
- How can I escape a section of my page which contains multiple shortcodes?
- shortcode to display post by category entered by user without plugin
- Reloading a Mediaelement audio player
- Shortcode is not processed when added to option field using wp_editor
- Adding Shortcode Values to wp_head
- How to change the output of gallery shortcode
- Shortcode attributes don’t appear?
- Shortcodes: closing shortcode not being processed
- Retrieving post excerpt as a shortcode
- Insert PHP code via shortcode?
- Trying to call dynamic content as a shortcode attribute
- What is the correct syntax to append a URL using a shortcode for an iframe?
- Shortcodes in RSS excerpts
- enqueue script with get_shortcode_regex
- How to set a variable in a shortcode and reference it in another shortcode in the same post?
- How to get_post_meta in a shortcode in excerpt on archive pages
- WordPress upgrade adding additional quote marks to shortcode output
- Creating tabs shortcode
- SImple Example To Update User Info From Front End [duplicate]
- Which file renders the “Edit Gallery” Settings page?
- using shortcodes in theme content
- How to: Simple Nested Shortcode [closed]
- How to process shortcode on post save and update only
- get_posts not working on homepage?
- ACF repeater + group shortcode
- Custom shortcode skips every 2nd shortcode
- Global $post returns 2 objects for my shortcode
- Gutenberg Shortcode Chooser Block
- How to cache a custom API call?
- Shortcode custom query not passing value
- How to create custom variables in wordpress
- WordPress 5.1 and Syntax highlighter, problem with HTML encoded special characters
- Onclick want to call shortcode in wordpress
- Working with Contact Form 7 pipes
- How to disable cache for the content returned by a shortcode
- Hide shortcodes content from the excerpt?
- How can I extract or parse data from post contents’ shortcodes into an array?
- Can we create a shorcode to move next page?
- launch a shortcode from a link
- Only execute specific shortcodes
- short code output too early
- short code output too early
- About redundant code when I use shortcode to output the HTML from a variable
- how to show last 5 images from the one post gallery
- How to not show shortcode contents if cart is empty?
- Help with Shortcode Functionality
- Shortcode with foreach
- How do write this type shortcode? [closed]
- Why does my shortcode query not working with search term