
WordPress expert required to write wp_localize_script for WP Audio default plugin
- or -
Post a project like this£25(approx. $34)
- Posted:
- Proposals: 5
- Remote
- #1135458
- Expired
Description
Experience Level: Intermediate
General information for the website: Music website
Kind of development: Customization of existing website
Description of requirements/features: Hi I am looking for someone to provide a piece of code for my website (which has now been launched). I have edited the core files for now but I am looking for a workaround.
I am trying to add a function in my WordPress Child Theme file functions.php. I need it to make the audio player start volume .3 instead of the default .8
I have found the file in wp-includes > js > mediaelement > mediaelement-and-player.min.js with 2 instances of the StartVolume value in. Obviously I don't want to edit the core files.
I have found this code to edit this in functions.php but it doesn't seem to work (maybe as it is from an old thread):
wp_localize_script( 'wp-mediaelement', '_wpmejsSettings', array( 'pluginPath' => includes_url( 'js/mediaelement/', 'relative' ), 'startVolume' => 0.3 ) );
Can anyone tell me what it should be? My WordPress installation is in a subfolder but I understand this is not a problem when the 'includes_url' is used.
This is the website (player on home page) - as mentioned at the moment I am controlling the volume by editing WordPress core :(
http://www.andrewgregory.net/
Kind of development: Customization of existing website
Description of requirements/features: Hi I am looking for someone to provide a piece of code for my website (which has now been launched). I have edited the core files for now but I am looking for a workaround.
I am trying to add a function in my WordPress Child Theme file functions.php. I need it to make the audio player start volume .3 instead of the default .8
I have found the file in wp-includes > js > mediaelement > mediaelement-and-player.min.js with 2 instances of the StartVolume value in. Obviously I don't want to edit the core files.
I have found this code to edit this in functions.php but it doesn't seem to work (maybe as it is from an old thread):
wp_localize_script( 'wp-mediaelement', '_wpmejsSettings', array( 'pluginPath' => includes_url( 'js/mediaelement/', 'relative' ), 'startVolume' => 0.3 ) );
Can anyone tell me what it should be? My WordPress installation is in a subfolder but I understand this is not a problem when the 'includes_url' is used.
This is the website (player on home page) - as mentioned at the moment I am controlling the volume by editing WordPress core :(
http://www.andrewgregory.net/

Gail D.
100% (40)Projects Completed
59
Freelancers worked with
35
Projects awarded
15%
Last project
7 Mar 2022
United Kingdom
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies