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
- Use AJAX in shortcode
- How to add attributes to a shortcode
- How to display random users with avatars
- Autogenerate wordpress shortcodes using array?
- How to get an array of menu items from the toolbar?
- Can shortcodes contain conditional statements? Even without them my shortcode renders blank page
- Creating a table from shortcode avoiding wpautop for each row
- Stripping shortcode from custom excerpt function
- If function exists, and array is met, echo function?
- Shortcode with custom content attribute?
- Shortcode to insert menu in page body?
- Passing HTML in WordPress Shortcode arguments
- Display a text message if the shortcode is found?
- Custom Shortcode, functions PHP WP_Query loop
- Super simple shortcode not working
- How to manage arrays from custom functions stored in functions.php?
- How to extract the variables out from “add_shortcode” function?
- How to get specified parent page title in my function
- Possible to display shortcode based on the category?
- Shortcode pagination not advancing
- Having issues with a foreach inside of a shortcode with ACF gallery
- Display post shortcode content in the sidebar?
- How to get the index number of the posts?
- Using shortcode content with nested shortcode
- How to filter $content in shortcode function
- Create a custom taxonomy that will be used to create and filter markers in a Google Map
- Display gallery on bottom after content
- 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
- Help With Creating Shortcode
- Use html inside shortcode function
- Shotcode argument issues
- Exclude category from shortcode
- Get array of metakey in all posts
- get_pages() Returns Only One Item
- Function shortcode – Set Parameter
- Adding an option to a shortcode
- How to use author meta in shortcode?
- Using multiple line variable inside a function?
- Use a shortcode to display custom meta box contents
- Wp-query Order By problem
- issue with if/elseif in_array inside foreach loop display only one post
- Woocommerce checkout field
- How to create shortcode with html and php content?
- Tracking the number of shortcodes for a list?
- Need a method to prevent WP from adding in between my shortcodes
- Load scripts for do_shortcode( ‘ [ my_shortcode ] ‘ )
- Can I include a custom PHP function in a WordPress function?
- How to create a shortcode out of a php function
- Shortcode to get featured image of specific id post
- Shortcode of a function
- Output comment_author in array
- How to add a shortcode to call a function
- How can I call a PHP function inside a hardcoded shortcode?
- Problem with shortcode inside a shortcode
- Need help making a short code work
- Using One Function To Create Two Different Shortcodes
- Is it possible to create a shortcode to link to a specific post/page where the tag is just an attribute?
- Pagination not working – FrontPage
- page shows short code not output
- Function to function shortcode help [closed]
- Last updated posts shortcode in functions.php
- I want to display the sku in the product pages of my EDD website
- Pass an argument into a function to extract from array
- use add_action in a shortcode (gravity form – WordPress)
- Shortcode displaying outside the div [duplicate]
- Featured image on archive page based on post type
- Shortcode with pagination advancing multiple queries
- Get shortcode attribute value to another function
- How to retrieve image IDs from shortcode content?
- Display list of pages that contain a certain string within the slug
- HowTo: Add wrapper to columns shortcode?
- How To Show Shortcodes In WordPress Custom Fields?
- Shortcode Function – Can’t get anything else to return after running shortcode within shortcode
- How to assign results to variables?
- Get title from IDs in a string
- Custom shortcode with do_shortcode and substr
- Can I use a function to return HTML and the result of another function?
- Dynamically generated Navigation Diagram using Custom Fields
- Expanding a function to call a plugin or show a link
- Function to get the name in database table from the comma separated string
- Trying to the deduce shortcode from a function
- How to display data from custom fields in my custom shortcode?
- Modify function Shortcode_atts
- Shortcode to output get_header not working
- restrict access to specific urls on a specific period of time
- Run function from parent on child site
- Add title & subtitle to shortcodes
- Shortcode Variations?
- shortcode inside post called by ID does not render as expected
- get_footer can’t find any variables set in functions.php
- Custom shortcode not being included in content paragraph [duplicate]
- Display function from functions.php in tag.php
- Creating mixture of shortcodes to use in the visual/text editor
- PHP error in shortcode [closed]
- multible shortcodes (for differnt values) with one function