forked from binaryplayground/acf-field-video
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathreadme.txt
More file actions
70 lines (45 loc) · 2.28 KB
/
readme.txt
File metadata and controls
70 lines (45 loc) · 2.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
=== ACF Video Field/s ===
Contributors: jconroy,leocaseiro
Tags: acf, video, youtube, vimeo, custom field
Requires at least: 3.6
Tested up to: 4.4.2
Stable tag: 1.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Adds a 'video' field type for the [Advanced Custom Fields](http://wordpress.org/extend/plugins/advanced-custom-fields/) WordPress plugin.
== Description ==
Adds a 'video' field type for the [Advanced Custom Fields](http://wordpress.org/extend/plugins/advanced-custom-fields/) WordPress plugin.
Compatible with Youtube and Vimeo videos/urls.
Provides ability to display a preview of the video (thumbnail, video embed or none) and adjusts the video width/size using fitvid.js for improved responsiveness.
Thumbnails are pulled automatically from Youtube or Vimeo.
Uses the built in wordpress oembed feature for video embedding.
== Installation ==
This add-on can be treated as both a WP plugin and a theme include.
**Install as Plugin**
1. Copy the 'acf-field-video' folder into your plugins folder
2. Activate the plugin via the Plugins admin page
**Include within theme**
1. Copy the 'acf-field-video' folder into your theme folder (can use sub folders). You can place the folder anywhere inside the 'wp-content' directory
2. Edit your functions.php file and add the code below (Make sure the path is correct to include the acf-video.php file)
`
<?php
add_action('acf/register_fields', 'my_register_fields');
function my_register_fields() {
include_once('acf-field-video/acf-video.php');
}
?>
`
== Usage ==
1. Add a new field with a Field Type of "Video".
2. Set how you would like to preview the video e.g. Embed the video, show the video thumbnail (pulled from YouTube or Vimeo) or don't show a preview
3. Set how you would like to return the video/field when the field is called using functions like `get_field()` e.g. Return the video url, the thumbnail url, the embed code for the video or an array of all of these
4. Publish the field / group as per ACF standard use.
== Retrieve Video ==
1. Retrieve the video by using standard ACF functions for obtaining field values.
== Screenshots ==



== Changelog ==
= 1.0 =
* Initial release