I would recommend that you have your theme require the wordpress.org version of the wpaudioplayer plugin. There is a great article about having themes check for and require plugins.
As is well-argued on this WPSE answer, it’s not a great idea to take code from a plugin and include it in your theme because you miss future updates and it might be legally/morally iffy. Best of all, if a person who purchases your theme chooses to switch themes some day, all their audio players will still work and they’ll be very happy and thank you forever.
Related Posts:
- How to add audio files to audio player in WordPress custom theme?
- Passing a location-dependent array via wp_localize_script within a shortcode
- When to use add_action(‘init’) vs add_action(‘wp_enqueue_scripts’)
- Change admin bar to default:off
- Should I use set_transient or update_option?
- How to add Color Picker in Theme Options for the following?
- Template for individual post designs
- Custom Taxonomy Tree view
- How to determine if a category is empty?
- The seventh parameter passed to add_submenu_page()
- What would happen if the admin installs a plugin when the plugin is included in the theme?
- Add a preview to a WordPress Control Panel
- How do I get my child-theme to work with my theme’s includes folder?
- wp_insert_post breaks rewrite rules
- Where can I find a good reviewed collection of Twenty Ten child themes?
- First post of each category
- create blocks programmtically on theme activation
- Possible to add “Template” selector to posts?
- Set front page as static page [closed]
- How to keep theme layout the same when admin gray bar is present?
- Any tag pagination page (except the 1st page) loads index.php template instead of tag.php
- Adding LazyLoad and InfiniteScroll to WordPress Theme
- Theme Customizer – Choose where widget area appears, to let users organise widgets
- WordPress default theme css units
- How Can I Create a List of Values to Be Iterated Through via WordPress Customization API?
- Adding default pagination to wordpress loop
- How to remove class attributes from custom menu markup?
- If I build a custom theme, will it update?
- Recommended tools for Theme Development with SASS [closed]
- Implement content-nosidebar.php / content-leftsidebar.php
- How to change i18n/l10n of #reply-title? (Old title: Comment reply link not working)
- Where should I update_options in a theme?
- Users table association with users_metadata table appears broken
- Injecting a custom sql query into a page/theme
- What are the Entry classes for?
- Using an if statement in the theme customizer page
- Installing WordPress locally
- Custom markup with wp_nav_menu based on pages
- How to edit my theme for full width?
- What VSCode extensions are there for working with block themes? [closed]
- What is the “correct” way to add hooks or similar PHP behavior to a blocktheme?
- Force Balance Tags not working
- Fetch wordpress video attachment with post ID
- Template selection area is not visible on page editor sidebar in wordpress twentty sixteen default theme
- Why does has_nav_menu return false when get_registered_nav_menus shows the opposite?
- Echo all category names, apart from one
- Displaying icon image for WordPress post formats, is there a cleaner way to do this?
- How can I develop multiple widgets for a WordPress theme?
- Is there a way to optionally hide the title bar when logged in?
- How to create first post, fifth post full width, rest in three columns and so on
- How to Create custom xml file for demo content for custom theme?
- post_exists returning 0 if title contain special characters
- How to seperate static phrases from template files in custom theme?
- Theme not showing up
- How can I compare publish and update dates for a single post?
- How to code custom special page
- Displaying the right content on a page url
- Get Post’s Excerpt Without the Wrapping tags and the Read More link
- Adding a new setting using Kirki or WP customizer with an if statement
- Is it possible to set a variable for get_post_meta?
- Custom admin logo not showing after wordpress 4.5 upgrade
- Unable to change the priority with ‘remove_action’ and ‘add_action’ in child theme
- Translate a child theme with pure PHP and gettext
- Remove h1 from 2015 theme
- Only the latest post shows up on post page?
- WordPress pulling in random page themes
- Trouble in enquing all js files under certain directory
- Can’t change theme name
- Pagination: Keep prev and next link even on the first/ last page
- multiple queries to get posts from same category?
- Stop WordPress from showing images on non post pages
- Is there a way to serve different resolution images to different devices?
- How to substitute old wordpress menu by wp 3 menu the right way?
- enqueuing external and internal js and css in wordpress did not work with owl.js animate.css
- Wrong activation/confirmation link in email
- Catch the moment when theme is deleted
- Attribute form NumberControl doesn’t update when I update page before it lose its focus
- Next and previous post link shows error in first and last post
- Disabling wordpress added class
- Problem with pagination link (error 404)
- WordPress wp_get_current_user returning blank values until refresh
- use a single nonce in three different nonce field
- Whether an tag is required in header?
- Theme is Enqueueing Everything in Footer
- Local theme changes upload on server but theme changes not showing
- Media & Plugin screens stall
- wp_kses allow checkbox class and checked
- Is wp_mail plugin territory?
- HTML TO WP Theme : Submenu goes down wp_nav_menu
- Understanding WordPress theme files and underscores
- New theme HTML5 Support for Search in WordPress 4.4
- How do I remove p tag *insertions*? Disabling `wpautop` removes manual tags
- Create a variable with string, array or multiple values
- How can I include the js and css file of my custom theme dynamically in header.php
- What hook to use for loading a custom class extension during Theme initialization?
- Set start page depending on screen width [closed]
- What are these variables and where are they documented?
- Use external fonts in WordPress stylesheet
- Custom link color or stylesheets
- What is the advantage of using home.php over index.php for the front page