forked from smithfield-studio/acf-menu-chooser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
acf-menu-chooser.php
29 lines (23 loc) · 915 Bytes
/
acf-menu-chooser.php
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
<?php
/*
* Plugin Name: Advanced Custom Fields: Menu Chooser
* Plugin URI: https://github.com/reyhoun/acf-menu-chooser
* Description: List WordPress Menus in a select ACF field.
* Version: 1.1.0
* Author: Reyhoun
* Author URI: http://reyhoun.com/
* License: GPLv2 or later
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
* GitHub Plugin URI: https://github.com/reyhoun/acf-menu-chooser
* GitHub Branch: master
*/
// 1. set text domain
// Reference: https://codex.wordpress.org/Function_Reference/load_plugin_textdomain
load_plugin_textdomain( 'acf-menu-chooser', false, dirname( plugin_basename(__FILE__) ) . '/lang/' );
// 2. Include field type for ACF5
// $version = 5 and can be ignored until ACF6 exists
function include_field_types_menu_chooser( $version ) {
include_once('acf-menu-chooser-v5.php');
}
add_action('acf/include_field_types', 'include_field_types_menu_chooser');
?>