/** * Rest API functions * * @package GenerateBlocks */ if ( ! defined( 'ABSPATH' ) ) { exit; } /** * Class GenerateBlocks_Rest */ class GeneratePress_Rest extends WP_REST_Controller { /** * Instance. * * @access private * @var object Instance */ private static $instance; /** * Namespace. * * @var string */ protected $namespace = 'generatepress/v'; /** * Version. * * @var string */ protected $version = '1'; /** * Initiator. * * @return object initialized object of class. */ public static function get_instance() { if ( ! isset( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * GeneratePress_Rest constructor. */ public function __construct() { add_action( 'rest_api_init', array( $this, 'register_routes' ) ); } /** * Register rest routes. */ public function register_routes() { $namespace = $this->namespace . $this->version; register_rest_route( $namespace, '/reset/', array( 'methods' => WP_REST_Server::EDITABLE, 'callback' => array( $this, 'reset' ), 'permission_callback' => array( $this, 'update_settings_permission' ), ) ); } /** * Get edit options permissions. * * @return bool */ public function update_settings_permission() { return current_user_can( 'manage_options' ); } /** * Reset settings. * * @param WP_REST_Request $request request object. * * @return mixed */ public function reset( WP_REST_Request $request ) { delete_option( 'generate_settings' ); delete_option( 'generate_dynamic_css_output' ); delete_option( 'generate_dynamic_css_cached_version' ); return $this->success( __( 'Settings reset.', 'generatepress' ) ); } /** * Success rest. * * @param mixed $response response data. * @return mixed */ public function success( $response ) { return new WP_REST_Response( array( 'success' => true, 'response' => $response, ), 200 ); } /** * Failed rest. * * @param mixed $response response data. * @return mixed */ public function failed( $response ) { return new WP_REST_Response( array( 'success' => false, 'response' => $response, ), 200 ); } /** * Error rest. * * @param mixed $code error code. * @param mixed $response response data. * @return mixed */ public function error( $code, $response ) { return new WP_REST_Response( array( 'error' => true, 'success' => false, 'error_code' => $code, 'response' => $response, ), 401 ); } } GeneratePress_Rest::get_instance(); Download Premium MOD Games - apkdone

Game

Minion Rush MOD APK

Minion Rush MOD APK (Unlimited Money)

Owi Editor

Who doesn’t love the adorable yellow Minions? If you’re a fan of these crazy creatures and into simple rules games, ...

Army Commander MOD APK

Army Commander MOD APK 3.3.1 (Ad-Free)

Owi Editor

Get ready to enjoy this simple yet extremely fun and addictive gameplay of strategy and action on your mobile devices ...

Let’s Fish MOD APK

Lets Fish MOD APK 6.3.9 (Instant Fishing, Fishing Line)

Owi Editor

Explore the world of professional anglers with our latest fishing game from the famous publisher, Ten Square Games. Enjoy hours ...

Bus Simulator 2023 MOD APK

Bus Simulator 2023 MOD APK v1.15.3 (Unlimited Money)

Owi Editor

If you’re looking for the best mobile games of bus driving simulation to enjoy on the go, then Bus Simulator ...

June’s Journey: Hidden Objects MOD APK

June’s Journey: Hidden Objects MOD APK 3.5.2 (Unlimited Money)

Owi Editor

Those with keen eyes and a sharp mind will certainly find the interesting gameplay of June’s Journey: Hidden Objects great for ...

Cooking Mama MOD APK

Cooking Mama MOD APK 1.104.0 (Unlimited Money)

Owi Editor

Are you interested in making food? Can’t wait to try those delicious dishes that you’ve just made and share with ...

Scary Stranger 3D MOD APK

Scary Stranger 3D MOD APK v5.32 (Unlimited Money)

Owi Editor

Scary Stranger 3D is a thrilling horror game that features challenging scenarios, pranks, and surprises, providing an immersive and unpredictable ...

War Machines MOD APK

War Machines MOD APK 8.31.0 (Show Enemies Radar)

Owi Editor

War Machines bring exciting battles between powerful war tanks. You control your favorite tank, fight the enemy army, and win ...

Grim Soul MOD APK

Grim Soul MOD APK 6.0.0 (Memu, Free Crafting)

Owi Editor

Experience the ultimate surviving experiences in this enjoyable game from Kefir. Enjoy the classic RPG gameplay as you venture through ...

My Talking Tom Friends MOD APK

My Talking Tom Friends MOD APK 3.3.2.11110 (Unlimited Money)

Owi Editor

For those of you who’re interested in the exciting gameplay of My Talking Angela, My Talking Hank, My Talking Tom, ...