12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?php
- if ( ! defined( 'ABSPATH' ) ) {
- exit;
- }
- if ( ! class_exists( 'ACF_Ajax_User_Setting' ) ) :
- class ACF_Ajax_User_Setting extends ACF_Ajax {
-
- var $action = 'acf/ajax/user_setting';
-
- var $public = true;
-
- function get_response( $request ) {
-
- if ( $this->has( 'value' ) ) {
- return acf_update_user_setting( $this->get( 'name' ), $this->get( 'value' ) );
-
- } else {
- return acf_get_user_setting( $this->get( 'name' ) );
- }
- }
- }
- acf_new_instance( 'ACF_Ajax_User_Setting' );
- endif;
|