ipsips / acf-audio-video Goto Github PK
View Code? Open in Web Editor NEWAudio/Video field for Advanced Custom Fields: select an audio or video file from Media Library
License: Apache License 2.0
Audio/Video field for Advanced Custom Fields: select an audio or video file from Media Library
License: Apache License 2.0
Hi to everyone,
I've just created another ACF Audio/Video Field that should works with the latests version of ACF and Wordpress.
Unfortunately the plugin doesn't work anymore with the latest version of ACF. File preview is showing. But when publishing a post, after save the file is gone from the field type.
Hi @ipsips,
there is a saving issue when the field is added to a flexible content field.
With the flexible content field (that is built-in in acf pro 5) you can create multiple layouts that groups toghether different acf fields.
When adding the acf audio/video field into a flexible content field, the field value is not properly saved.
Taking a look into the database seems that the field is stored as separate value, and not as a flexible content value.
Following theese steps you can reproduce the error:
It appears that $tag
does not get defined if $field['value']
is empty in acf-audio-video-field.php
@ line 221.
Also getting a $ is undefined
error for $.isNumeric(postId)
in SelectFrame.js
@ line 5 and $.each(filters.filters...
@ line 77.
Will clone and push a fix when I get a chance, but thought I'd point this out beforehand.
I have a custom post type called audio.
I use your ACF plugin to add a field to set the audio file for the post type.
When I add the file in backend it appears and i can play the audio file.
But after I save or publish the post the audio file disappears and the "add Audio" button is shown.
What could cause this problem?
Your plugin is really useful to me and a solution would be very important.
I use ACF Pro version 5.5.14
It would be great if this repository also gets a composer.json for wordpress-plugin type packages added.
Have erro in "add video", dont open upload box...
Hi,
I'm tring to use this plugin toghether with ACF 5 pro and latest version of wordpress (actually 4.6.1).
I've created and added the field to an acf field group.
But, while in the post edit screen, when I click the Add Audio/video Button nothing happens and the following js error is thrown
TypeError: $ is undefined
on acf-audio-video-field.min.js line 413
The error is related to the $.isNumeric()
call.
P.S. there is even a php warning that appears in the debug.log wordpress file:
PHP Notice: Undefined variable: tag in /home/.../public_html/wp-content/plugins/acf-audio-video-1.0.0/acf-audio-video-field.php on line 220
Hope it can helps and that you could fix them.
Thanks for creating and sharing this plugin I was searching for it from many time.
Hi @ipsips,
I've inserted one or more extension files (e.g. "mp4,mp3") into the "Allowed file type" field setting, but in the edit post screen file restrictions does not happens, and a php warning is thrown in the debug log file.
The problem is inside the function _get_allowed_types
of the acf-audio-video-field.php
.
The array_filter function at line 261 takes as first param an array, but, actually, a string is given.
To fix this I've changed line 262 explode(',', $field['allowed_types'] )
and line 273 with implode(',', $valid_allowed_types)
, to return back values as string.
This has been tested and seems to works fine.
I'm not sure exactly why I'm running across this in my app... but I'm getting an array passed to _get_attachment_id_from_url
rather than a string.
This is predictably throwing a warning strpos() expects parameter 1 to be string, array given acf-audio-video/acf-audio-video-field.php:380
I didn't hunt down the source of the error, but just checking that the passed variable $attachment_url
is indeed a string resolves the warning for me.
Hello, I've used your plugin for an audio site and using ajax for automatic load more post. Page 1 the audio player working well but it's not work and just show only url of audio file when click load more.
Could you please tell me how to fix it?
Thank you!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.