update
This commit is contained in:
@@ -22,7 +22,7 @@ abstract class WP_REST_Controller {
|
||||
*/
|
||||
public function register_routes() {
|
||||
/* translators: %s: register_routes() */
|
||||
_doing_it_wrong( 'WP_REST_Controller::register_routes', sprintf( esc_html__( "Method '%s' must be overridden." ), __METHOD__ ), '4.7' );
|
||||
_doing_it_wrong( 'WP_REST_Controller::register_routes', sprintf( esc_html__( "Method '%s' must be overridden.", 'opalestate-pro' ), __METHOD__ ), '4.7' );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -32,7 +32,7 @@ abstract class WP_REST_Controller {
|
||||
* @return WP_Error|boolean
|
||||
*/
|
||||
public function get_items_permissions_check( $request ) {
|
||||
return new WP_Error( 'invalid-method', sprintf( esc_html__( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array(
|
||||
return new WP_Error( 'invalid-method', sprintf( esc_html__( "Method '%s' not implemented. Must be overridden in subclass.", 'opalestate-pro' ), __METHOD__ ), array(
|
||||
'status' => 405,
|
||||
) );
|
||||
}
|
||||
@@ -44,7 +44,7 @@ abstract class WP_REST_Controller {
|
||||
* @return WP_Error|WP_REST_Response
|
||||
*/
|
||||
public function get_items( $request ) {
|
||||
return new WP_Error( 'invalid-method', sprintf( esc_html__( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array(
|
||||
return new WP_Error( 'invalid-method', sprintf( esc_html__( "Method '%s' not implemented. Must be overridden in subclass.", 'opalestate-pro' ), __METHOD__ ), array(
|
||||
'status' => 405,
|
||||
) );
|
||||
}
|
||||
@@ -56,7 +56,7 @@ abstract class WP_REST_Controller {
|
||||
* @return WP_Error|boolean
|
||||
*/
|
||||
public function get_item_permissions_check( $request ) {
|
||||
return new WP_Error( 'invalid-method', sprintf( esc_html__( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array(
|
||||
return new WP_Error( 'invalid-method', sprintf( esc_html__( "Method '%s' not implemented. Must be overridden in subclass.", 'opalestate-pro' ), __METHOD__ ), array(
|
||||
'status' => 405,
|
||||
) );
|
||||
}
|
||||
@@ -68,7 +68,7 @@ abstract class WP_REST_Controller {
|
||||
* @return WP_Error|WP_REST_Response
|
||||
*/
|
||||
public function get_item( $request ) {
|
||||
return new WP_Error( 'invalid-method', sprintf( esc_html__( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array(
|
||||
return new WP_Error( 'invalid-method', sprintf( esc_html__( "Method '%s' not implemented. Must be overridden in subclass.", 'opalestate-pro' ), __METHOD__ ), array(
|
||||
'status' => 405,
|
||||
) );
|
||||
}
|
||||
@@ -80,7 +80,7 @@ abstract class WP_REST_Controller {
|
||||
* @return WP_Error|boolean
|
||||
*/
|
||||
public function create_item_permissions_check( $request ) {
|
||||
return new WP_Error( 'invalid-method', sprintf( esc_html__( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array(
|
||||
return new WP_Error( 'invalid-method', sprintf( esc_html__( "Method '%s' not implemented. Must be overridden in subclass.", 'opalestate-pro' ), __METHOD__ ), array(
|
||||
'status' => 405,
|
||||
) );
|
||||
}
|
||||
@@ -92,7 +92,7 @@ abstract class WP_REST_Controller {
|
||||
* @return WP_Error|WP_REST_Response
|
||||
*/
|
||||
public function create_item( $request ) {
|
||||
return new WP_Error( 'invalid-method', sprintf( esc_html__( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array(
|
||||
return new WP_Error( 'invalid-method', sprintf( esc_html__( "Method '%s' not implemented. Must be overridden in subclass.", 'opalestate-pro' ), __METHOD__ ), array(
|
||||
'status' => 405,
|
||||
) );
|
||||
}
|
||||
@@ -104,7 +104,7 @@ abstract class WP_REST_Controller {
|
||||
* @return WP_Error|boolean
|
||||
*/
|
||||
public function update_item_permissions_check( $request ) {
|
||||
return new WP_Error( 'invalid-method', sprintf( esc_html__( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array(
|
||||
return new WP_Error( 'invalid-method', sprintf( esc_html__( "Method '%s' not implemented. Must be overridden in subclass.", 'opalestate-pro' ), __METHOD__ ), array(
|
||||
'status' => 405,
|
||||
) );
|
||||
}
|
||||
@@ -116,7 +116,7 @@ abstract class WP_REST_Controller {
|
||||
* @return WP_Error|WP_REST_Response
|
||||
*/
|
||||
public function update_item( $request ) {
|
||||
return new WP_Error( 'invalid-method', sprintf( esc_html__( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array(
|
||||
return new WP_Error( 'invalid-method', sprintf( esc_html__( "Method '%s' not implemented. Must be overridden in subclass.", 'opalestate-pro' ), __METHOD__ ), array(
|
||||
'status' => 405,
|
||||
) );
|
||||
}
|
||||
@@ -128,7 +128,7 @@ abstract class WP_REST_Controller {
|
||||
* @return WP_Error|boolean
|
||||
*/
|
||||
public function delete_item_permissions_check( $request ) {
|
||||
return new WP_Error( 'invalid-method', sprintf( esc_html__( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array(
|
||||
return new WP_Error( 'invalid-method', sprintf( esc_html__( "Method '%s' not implemented. Must be overridden in subclass.", 'opalestate-pro' ), __METHOD__ ), array(
|
||||
'status' => 405,
|
||||
) );
|
||||
}
|
||||
@@ -140,7 +140,7 @@ abstract class WP_REST_Controller {
|
||||
* @return WP_Error|WP_REST_Response
|
||||
*/
|
||||
public function delete_item( $request ) {
|
||||
return new WP_Error( 'invalid-method', sprintf( esc_html__( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array(
|
||||
return new WP_Error( 'invalid-method', sprintf( esc_html__( "Method '%s' not implemented. Must be overridden in subclass.", 'opalestate-pro' ), __METHOD__ ), array(
|
||||
'status' => 405,
|
||||
) );
|
||||
}
|
||||
@@ -152,7 +152,7 @@ abstract class WP_REST_Controller {
|
||||
* @return WP_Error|object $prepared_item
|
||||
*/
|
||||
protected function prepare_item_for_database( $request ) {
|
||||
return new WP_Error( 'invalid-method', sprintf( esc_html__( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array(
|
||||
return new WP_Error( 'invalid-method', sprintf( esc_html__( "Method '%s' not implemented. Must be overridden in subclass.", 'opalestate-pro' ), __METHOD__ ), array(
|
||||
'status' => 405,
|
||||
) );
|
||||
}
|
||||
@@ -165,7 +165,7 @@ abstract class WP_REST_Controller {
|
||||
* @return WP_REST_Response $response
|
||||
*/
|
||||
public function prepare_item_for_response( $item, $request ) {
|
||||
return new WP_Error( 'invalid-method', sprintf( esc_html__( "Method '%s' not implemented. Must be overridden in subclass." ), __METHOD__ ), array(
|
||||
return new WP_Error( 'invalid-method', sprintf( esc_html__( "Method '%s' not implemented. Must be overridden in subclass.", 'opalestate-pro' ), __METHOD__ ), array(
|
||||
'status' => 405,
|
||||
) );
|
||||
}
|
||||
@@ -270,7 +270,7 @@ abstract class WP_REST_Controller {
|
||||
return array(
|
||||
'context' => $this->get_context_param(),
|
||||
'page' => array(
|
||||
'description' => esc_html__( 'Current page of the collection.' ),
|
||||
'description' => esc_html__( 'Current page of the collection.', 'opalestate-pro' ),
|
||||
'type' => 'integer',
|
||||
'default' => 1,
|
||||
'sanitize_callback' => 'absint',
|
||||
@@ -278,7 +278,7 @@ abstract class WP_REST_Controller {
|
||||
'minimum' => 1,
|
||||
),
|
||||
'per_page' => array(
|
||||
'description' => esc_html__( 'Maximum number of items to be returned in result set.' ),
|
||||
'description' => esc_html__( 'Maximum number of items to be returned in result set.', 'opalestate-pro' ),
|
||||
'type' => 'integer',
|
||||
'default' => 10,
|
||||
'minimum' => 1,
|
||||
@@ -287,7 +287,7 @@ abstract class WP_REST_Controller {
|
||||
'validate_callback' => 'rest_validate_request_arg',
|
||||
),
|
||||
'search' => array(
|
||||
'description' => esc_html__( 'Limit results to those matching a string.' ),
|
||||
'description' => esc_html__( 'Limit results to those matching a string.', 'opalestate-pro' ),
|
||||
'type' => 'string',
|
||||
'sanitize_callback' => 'sanitize_text_field',
|
||||
'validate_callback' => 'rest_validate_request_arg',
|
||||
@@ -305,7 +305,7 @@ abstract class WP_REST_Controller {
|
||||
*/
|
||||
public function get_context_param( $args = array() ) {
|
||||
$param_details = array(
|
||||
'description' => esc_html__( 'Scope under which the request is made; determines fields present in response.' ),
|
||||
'description' => esc_html__( 'Scope under which the request is made; determines fields present in response.', 'opalestate-pro' ),
|
||||
'type' => 'string',
|
||||
'sanitize_callback' => 'sanitize_key',
|
||||
'validate_callback' => 'rest_validate_request_arg',
|
||||
|
||||
Reference in New Issue
Block a user