I haven’t looked in detail at your code, but what strikes me is your open_csv
method.
You have the following lines
-
return $attributes['file'];
-
return $attributes['type'];
As your method currently stands, it stops and returns the value of file
right after setting the attributes. Here is what return
does in php
If called from within a function, the return statement immediately ends execution of the current function, and returns its argument as the value of the function call.
Your solution would be to remove those two lines or modify your method to return the values later in an appropriate place like at the end of your method
Related Posts:
- How to echo the value of an array element using a function via a shortcode
- Echo custom field value in shortcode function
- Solution to render Shortcodes in Admin Editor
- Use AJAX in shortcode
- Include PHP file in Content using [shortcode]
- Shortcode producing headers already sent error
- How to add attributes to a shortcode
- How to display random users with avatars
- Autogenerate wordpress shortcodes using array?
- Enabling shortcodes for custom fields
- How to get an array of menu items from the toolbar?
- How to use get_media_embedded_in_content function
- Can shortcodes contain conditional statements? Even without them my shortcode renders blank page
- Shortcode with parameters inside parameters
- Creating a table from shortcode avoiding wpautop for each row
- Changing a function in function.php to a shortcode – for listing categories of only a certain post type
- Stripping shortcode from custom excerpt function
- how to create shortcode in wordpress
- What is wrong with this Shortcode? I get it in a wrong place inside the content
- Display random text from a file with the WP built-in AJAX API
- Set first oembed in post to a global variable or function
- Formatting post content to exclude gallery
- If function exists, and array is met, echo function?
- Remove images from get_the_excerpt
- Shortcode with custom content attribute?
- Problem with extract() with custom shortcode
- Shortcode to insert menu in page body?
- Using locate-template & shortcodes doesn’t appear to work
- Displaying a random user with a shortcode
- Passing HTML in WordPress Shortcode arguments
- Adding body class when post contains a specific shortcode
- Function to show only first instance of shortcode
- Display a text message if the shortcode is found?
- creating shortcode to pull json array
- Custom Shortcode, functions PHP WP_Query loop
- Pass Shortcode Attribute to footer Script
- Super simple shortcode not working
- Detect Safari desktop browser and include the detection in a shortcode
- My simple custom shortcode is not longer working (possibly due to upgrade to WordPress 4.4 ?)
- Defining a global array in functions.php?
- Display gallery on top before content
- How to manage arrays from custom functions stored in functions.php?
- List child pages of specific page using shortcode
- get_post_type() in in_array doesn’t work for some reason
- How to extract the variables out from “add_shortcode” function?
- Simple custom theme option not being saved
- Display first name of logged in user?
- How to get specified parent page title in my function
- Possible to display shortcode based on the category?
- WordPress shortcode attributes for database SELECT?
- Shortcode pagination not advancing
- create shortcode to list users with specific meta key value
- Variable if post is sticky in functions.php
- Having issues with a foreach inside of a shortcode with ACF gallery
- Shortcode inserts paragraphs before and after executing shortcode
- Display post shortcode content in the sidebar?
- Sorting table function default
- How to get the index number of the posts?
- Using shortcode content with nested shortcode
- How can I make a widget shortcode to control all the widgets?
- Custom shortcodes not inserting into visual composer columns
- How to filter $content in shortcode function
- Create a custom taxonomy that will be used to create and filter markers in a Google Map
- Setting youtube size in functions.php
- Adding a colorbutton in tinymce dialog with current api
- Passing variable as add_shortcode argument
- Display gallery on bottom after content
- Add button to kitchen sink toggle
- Excerpts are not displayed by a shortcode on category pages
- Redirect to another page using contact form 7? [closed]
- WordPress Shortcode function display outside of widget
- check if the user is owner of current page
- shortcode help require
- Optimizing a WordPress site
- Help With Creating Shortcode
- Use html inside shortcode function
- Shotcode argument issues
- Shortcode parse error – wrong syntax
- Exclude category from shortcode
- wp_nonce_field is breaking form for reasons unknown
- Get array of metakey in all posts
- Visual Composer creating own shortcodes with vc_map() to return simple Image
- get_pages() Returns Only One Item
- Function shortcode – Set Parameter
- Adding an option to a shortcode
- Turn get_posts as string into an array for use in theme admin options
- How to use author meta in shortcode?
- Using multiple line variable inside a function?
- Testing for a shortcode using a function. 404 page throwing PHP Notice
- Use a shortcode to display custom meta box contents
- Echoing function into WordPress NextGen gallery
- Output loop to function return?
- Wp-query Order By problem
- issue with if/elseif in_array inside foreach loop display only one post
- How to parse a shortcode within a shortcode?
- Variables not showing in short code
- Woocommerce checkout field
- How to include any template using Shortcode fuction?
- How can I pass a shortcode value to the head in wordpress functions.php
- Native gallery custom html output