p+=U==UPA=U`AH=U`<0=U`_h=U>@7@.@W=@.@@@@.@@^@@`E=U=> 'GET', 'callback' =U P=UP`p=U` +5=Uh0p=Ud =UG)*A^=UPH=U<0=U)0_h=U>@ @K@C`E=Ulic function get_notifications() ^=UP@P=UPG =U`5=Uz=pH=U< =Up=Up=Up=U+=U`T==U_ 5D=Ul@66H@(K@0";@;@tion_by_id( $id ); return new WP_REST_Response( null, 204 ); } /** * Dismiss notification by id * * @ ^=U P@ ^=U`@ ^=Up@p+=U0==UPAg=UP`uH=U< =Up+=Up=g=UPuH=U< =U=U``+=Up+p+=U=g=UPuH=U< =U0;=U*p+=U0=g=UPuH=U< =U=U>h=U>P2@K@E@E{@m( 'class' ); $action = $request->get_param( 'action' ); // Check if class null === $callback ) { return $this; } $this->lazy_resolve_callback = $callback; return $this; } /** * Hooks the `$lazy_resolve_callback` to the `$lazy_resolve_action` with the `$lazy_resolve_priority` if set. * * @since 4.9.16 */ protected function resolved() { if ( empty( $this->lazy_resolve_callback ) ) { return; } $action = property_exists( $this, 'lazy_resolve_action' ) ? $this->lazy_resolve_action : 'shutdown'; $priority = property_exists( $this, 'lazy_resolve_priority' ) ? $this->lazy_resolve_priority : 10; $hooked = has_action( $action, $this->lazy_resolve_callback ); // Let's play it safe and move the resolution as late as possible. $new_priority = false !== $hooked ? max( $hooked, $priority ) : $priority; if ( is_numeric( $hooked ) && $hooked !== $new_priority ) { remove_action( $action, $this->lazy_resolve_callback, $hooked ); } add_action( $action, $this->lazy_resolve_callback, $new_priority ); } }