| @@ 35-49 (lines=15) @@ | ||
| 32 | * @return n/a |
|
| 33 | */ |
|
| 34 | ||
| 35 | function __construct() { |
|
| 36 | ||
| 37 | // actions |
|
| 38 | add_action('admin_enqueue_scripts', array($this, 'admin_enqueue_scripts')); |
|
| 39 | ||
| 40 | ||
| 41 | // save |
|
| 42 | add_filter('wp_insert_post_empty_content', array($this, 'wp_insert_post_empty_content'), 10, 2); |
|
| 43 | add_action('save_post', array($this, 'save_post'), 10, 2); |
|
| 44 | ||
| 45 | ||
| 46 | // ajax |
|
| 47 | add_action('wp_ajax_acf/post/get_field_groups', array($this, 'get_field_groups')); |
|
| 48 | ||
| 49 | } |
|
| 50 | ||
| 51 | ||
| 52 | /* |
|
| @@ 31-45 (lines=15) @@ | ||
| 28 | * @return n/a |
|
| 29 | */ |
|
| 30 | ||
| 31 | function __construct() { |
|
| 32 | ||
| 33 | // actions |
|
| 34 | add_action('admin_enqueue_scripts', array($this, 'admin_enqueue_scripts')); |
|
| 35 | add_action('in_widget_form', array($this, 'edit_widget'), 10, 3); |
|
| 36 | ||
| 37 | ||
| 38 | // filters |
|
| 39 | add_filter('widget_update_callback', array($this, 'widget_update_callback'), 10, 4); |
|
| 40 | ||
| 41 | ||
| 42 | // ajax |
|
| 43 | add_action('wp_ajax_update-widget', array($this, 'ajax_update_widget'), 0, 1); |
|
| 44 | ||
| 45 | } |
|
| 46 | ||
| 47 | ||
| 48 | /* |
|