You do it like in your first example
// Shortcodes.php file
function myplugin_shortcode( $atts ) {
if ( !empty ($atts) ) {
foreach ( $atts as $key => &$val ) {
$val = html_entity_decode($val);
}
}
myplugin_display_items( $atts );
}
// Register shortcodes
add_shortcode( 'output-items', 'myplugin_shortcode');
Related Posts:
- Change page title from plugin
- WordPress Plugin Boilerplate – add_action hook in static “activate” function
- Init plugin again after ajax call finish
- add_action in a custom plugin
- Plugin init hook fires repeatedly
- Basic function call on init failing
- Can i use init hook for API purpose?
- When/where would want to attach other classes to the base class in a WordPress plugin?
- API calls on plugin activation or init?
- How to execute init or woocommerce_init only for checkout page
- Delete tables from database when deleting plugin
- Can I upgrade a plugin to a specific version?
- Get plugin_dir_url() from one level deep within plugin
- How to have WordPress send a user confirmation/validation email on signup
- Filter out results from REST API
- How to place random widgets in the WordPress sidebar?
- Auto login using Active Directory and Windows Authentication
- Using custom code, how can I fetch data from the WordPress plugin repo?
- Find out if request is for custom post type archive before query runs
- A way to sort WordPress themes? [closed]
- Plugin search sorting for admin section – WordPress [duplicate]
- Determining where fopen() is writing files when used from WordPress AJAX call [closed]
- Adding “ ” before the last word in multiple defined areas with a plugin
- Plugin Functionality Only for Editor and Administrator
- Plugin to hide admin menu (vertical menu bar)
- problem with nextgen plugin
- Creating Custom Roles for use on a WordPress Multi-site Instance?
- Building WordPress Plugin Using FPDF – How do you get post content from currently viewed post?
- How to install and activate a plugin via an external PHP script
- unregistered user can write in blog page – possible? how to?
- PHP Fatal error: Call to undefined function plugin_basename
- Restored WordPress on new Server – Can’t auto-update plugins
- How many SQL queries WP Super Cache make to serve cached page?
- omit / remove ” from category list
- Is any information available in PHP files in WP about plugin activation history?
- The safest way to automate WordPress backups
- Media is not attached after import
- Use flash on a wordpress site as a widget
- (Sticky Row) How do i make a row sticky in wpbakery page builder?
- Submit form after reCaptcha is solved
- how to create progress bar in wordpress contact form 7 or other plugin for set progress bar in cf7 [closed]
- remove_section in a plugin
- How to export all content with feature images?
- this jQuery function works perfect in static html page but not on wordpress
- Sidebar widget: Randomly select text from a given set
- Run a plugin just ‘once’ per page reload
- redirected you too many times
- Create custom pages with a plugin
- Is it possible for a plugin to force reading and writing of uploaded images to a database instead of to a filesystem?
- $wpdb update query in plugin only updating one column
- WordPress as template engine
- Cropping images from top center using Jetpack Photon
- XML Sitemap Generator can’t notify google and bing
- How to limit image size for the entire website ? But without editing the post (css/plugin?!)
- Minimize and Uglify WordPress Plugin Files
- How do I make sure that my plugin only runs on article detail pages?
- Post deleted in trash [closed]
- Remove specific administrator’s capability
- Different Layerslider by page id?
- How to change Header image depending on language [closed]
- How do I show content from a plugin using the template the site is currently working with?
- Interface needed to transfer contents in a table on a web page to the Add New Product interface
- Is there a syntax highlighting plugin for HTML View? [duplicate]
- admin-ajax.php 500 error when new users try to register
- Hide plugins and theme from public
- Same Plugin tables between wordpress installations
- How would I get the new plugin version on this function?
- Javascript not getting injected into page
- Changing wordpress/woocommerce notices default message to other languages (text)
- Why does my custom plugin only function correctly once per page?
- How to update all in-site redirect URLs to destination URLs at once
- wordpress loop giving me content
- How to get checkbox by default true in metabox?
- How to pass multiple custom fields as shortcode’s parameters
- Submenu Page under Settings in Admin Panel
- Custom plugin settings page with tab. Error: “Sorry, you are not allowed to access this page.”
- I can’t view the orders on the woocomerce dashboard with the brainblocks plugin
- Which membership plugin enables users to enter html links in blogs and on their profile page?
- How to add a box note in wordpress plugin page ? top header side.
- Help needed with woocommerce (wc stripe) filter
- How to create a custom page for unrelated database?
- how to enable tinymce custom buttons in meta box?
- Custom on the fly e-mail alerts
- How set role at registration based on email?
- Plugin on all site except primary one
- WordPress function to add text
- Directory structure for plugin changes
- How can I pass value to function in add_menu_page?
- Why did a WordPress plugin vanish from the WordPress repository?
- Integrating planning tools in wordpress
- TheCartPress plugin – Make every item in store unique
- My AJAX API plugin isn’t working
- How to hide a piece of code from a wordpress web page?
- Make a magic tag work with Custom Post Types
- Bidding site plugin [closed]
- How can i include a plugin in my theme folder?
- Editing a theme
- How can I wordpress cache a database request with no existing plugin?
- Save Confirmation Page Title to WPForms Entry
- Problem on a wordpress website with a plugin [closed]