This commit is contained in:
Chung Pham
2020-08-20 17:31:10 +07:00
parent a2415271a9
commit 8851716ddc
34 changed files with 5463 additions and 5035 deletions

View File

@@ -196,7 +196,7 @@ class CMB2 extends CMB2_Base {
public function __construct( $config, $object_id = 0 ) {
if ( empty( $config['id'] ) ) {
wp_die( esc_html__( 'Metabox configuration is required to have an ID parameter.', 'cmb2' ) );
wp_die( esc_html__( 'Metabox configuration is required to have an ID parameter.', 'opalestate-pro' ) );
}
$this->cmb_id = $config['id'];
@@ -600,7 +600,7 @@ class CMB2 extends CMB2_Base {
}
echo '
<div class="cmbhandle" title="' , esc_attr__( 'Click to toggle', 'cmb2' ), '"><br></div>
<div class="cmbhandle" title="' , esc_attr__( 'Click to toggle', 'opalestate-pro' ), '"><br></div>
<h3 class="cmb-group-title cmbhandle-title"><span>', $field_group->replace_hash( $field_group->options( 'group_title' ) ), '</span></h3>
<div class="inside cmb-td cmb-nested cmb-field-list">';

View File

@@ -72,7 +72,7 @@ class CMB2_Ajax {
// Send back error if empty.
if ( empty( $oembed_string ) ) {
wp_send_json_error( '<p class="ui-state-error-text">' . esc_html__( 'Please Try Again', 'cmb2' ) . '</p>' );
wp_send_json_error( '<p class="ui-state-error-text">' . esc_html__( 'Please Try Again', 'opalestate-pro' ) . '</p>' );
}
// Set width of embed.
@@ -178,7 +178,7 @@ class CMB2_Ajax {
// Send back our embed.
if ( $oembed['embed'] && $oembed['embed'] != $oembed['fallback'] ) {
return '<div class="cmb2-oembed embed-status">' . $oembed['embed'] . '<p class="cmb2-remove-wrapper"><a href="#" class="cmb2-remove-file-button" rel="' . $oembed['args']['field_id'] . '">' . esc_html__( 'Remove Embed', 'cmb2' ) . '</a></p></div>';
return '<div class="cmb2-oembed embed-status">' . $oembed['embed'] . '<p class="cmb2-remove-wrapper"><a href="#" class="cmb2-remove-file-button" rel="' . $oembed['args']['field_id'] . '">' . esc_html__( 'Remove Embed', 'opalestate-pro' ) . '</a></p></div>';
}
// Otherwise, send back error info that no oEmbeds were found.
@@ -186,7 +186,7 @@ class CMB2_Ajax {
'<p class="ui-state-error-text">%s</p>',
sprintf(
/* translators: 1: results for. 2: link to codex.wordpress.org/Embeds */
esc_html__( 'No oEmbed Results Found for %1$s. View more info at %2$s.', 'cmb2' ),
esc_html__( 'No oEmbed Results Found for %1$s. View more info at %2$s.', 'opalestate-pro' ),
$oembed['fallback'],
'<a href="https://codex.wordpress.org/Embeds" target="_blank">codex.wordpress.org/Embeds</a>'
)

View File

@@ -419,11 +419,11 @@ abstract class CMB2_Base {
switch ( $message ) {
case self::DEPRECATED_PARAM:
$message = sprintf( esc_html__( 'The "%1$s" field parameter has been deprecated in favor of the "%2$s" parameter.', 'cmb2' ), $args[3], $args[4] );
$message = sprintf( esc_html__( 'The "%1$s" field parameter has been deprecated in favor of the "%2$s" parameter.', 'opalestate-pro' ), $args[3], $args[4] );
break;
case self::DEPRECATED_CB_PARAM:
$message = sprintf( esc_html__( 'Using the "%1$s" field parameter as a callback has been deprecated in favor of the "%2$s" parameter.', 'cmb2' ), $args[3], $args[4] );
$message = sprintf( esc_html__( 'Using the "%1$s" field parameter as a callback has been deprecated in favor of the "%2$s" parameter.', 'opalestate-pro' ), $args[3], $args[4] );
break;
default:
@@ -453,9 +453,9 @@ abstract class CMB2_Base {
if ( defined( 'WP_DEBUG' ) && WP_DEBUG && apply_filters( 'deprecated_argument_trigger_error', true ) ) {
if ( function_exists( '__' ) ) {
if ( ! is_null( $message ) ) {
trigger_error( sprintf( esc_html__( '%1$s was called with a parameter that is <strong>deprecated</strong> since version %2$s! %3$s', 'cmb2' ), $function, $version, $message ) );
trigger_error( sprintf( esc_html__( '%1$s was called with a parameter that is <strong>deprecated</strong> since version %2$s! %3$s', 'opalestate-pro' ), $function, $version, $message ) );
} else {
trigger_error( sprintf( esc_html__( '%1$s was called with a parameter that is <strong>deprecated</strong> since version %2$s with no alternative available.', 'cmb2' ), $function, $version ) );
trigger_error( sprintf( esc_html__( '%1$s was called with a parameter that is <strong>deprecated</strong> since version %2$s with no alternative available.', 'opalestate-pro' ), $function, $version ) );
}
} else {
if ( ! is_null( $message ) ) {
@@ -488,7 +488,7 @@ abstract class CMB2_Base {
case 'object_type':
return $this->{$field};
default:
throw new Exception( sprintf( esc_html__( 'Invalid %1$s property: %2$s', 'cmb2' ), __CLASS__, $field ) );
throw new Exception( sprintf( esc_html__( 'Invalid %1$s property: %2$s', 'opalestate-pro' ), __CLASS__, $field ) );
}
}
@@ -506,7 +506,7 @@ abstract class CMB2_Base {
$object_class = strtolower( get_class( $this ) );
if ( ! has_filter( "{$object_class}_inherit_{$method}" ) ) {
throw new Exception( sprintf( esc_html__( 'Invalid %1$s method: %2$s', 'cmb2' ), get_class( $this ), $method ) );
throw new Exception( sprintf( esc_html__( 'Invalid %1$s method: %2$s', 'opalestate-pro' ), get_class( $this ), $method ) );
}
array_unshift( $args, $this );

View File

@@ -1412,8 +1412,8 @@ class CMB2_Field extends CMB2_Base {
*/
protected function set_field_defaults_group( $args ) {
$args['options'] = wp_parse_args( $args['options'], array(
'add_button' => esc_html__( 'Add Group', 'cmb2' ),
'remove_button' => esc_html__( 'Remove Group', 'cmb2' ),
'add_button' => esc_html__( 'Add Group', 'opalestate-pro' ),
'remove_button' => esc_html__( 'Remove Group', 'opalestate-pro' ),
'remove_confirm' => '',
) );
@@ -1445,11 +1445,11 @@ class CMB2_Field extends CMB2_Base {
*/
protected function set_field_defaults_all_or_nothing_types( $args ) {
$args['show_option_none'] = isset( $args['show_option_none'] ) ? $args['show_option_none'] : null;
$args['show_option_none'] = true === $args['show_option_none'] ? esc_html__( 'None', 'cmb2' ) : $args['show_option_none'];
$args['show_option_none'] = true === $args['show_option_none'] ? esc_html__( 'None', 'opalestate-pro' ) : $args['show_option_none'];
if ( null === $args['show_option_none'] ) {
$off_by_default = in_array( $args['type'], array( 'select', 'radio', 'radio_inline' ), true );
$args['show_option_none'] = $off_by_default ? false : esc_html__( 'None', 'cmb2' );
$args['show_option_none'] = $off_by_default ? false : esc_html__( 'None', 'opalestate-pro' );
}
return $args;
@@ -1560,7 +1560,7 @@ class CMB2_Field extends CMB2_Base {
*/
public function get_cmb() {
if ( ! $this->cmb_id ) {
return new WP_Error( 'no_cmb_id', esc_html__( 'Sorry, this field does not have a cmb_id specified.', 'cmb2' ) );
return new WP_Error( 'no_cmb_id', esc_html__( 'Sorry, this field does not have a cmb_id specified.', 'opalestate-pro' ) );
}
return cmb2_get_metabox( $this->cmb_id, $this->object_id, $this->object_type );

View File

@@ -429,7 +429,7 @@ class CMB2_Display_File extends CMB2_Field_Display {
} else {
printf( '<div class="file-status"><span>%1$s <strong><a href="%2$s">%3$s</a></strong></span></div>',
esc_html( $field_type->_text( 'file_text', esc_html__( 'File:', 'cmb2' ) ) ),
esc_html( $field_type->_text( 'file_text', esc_html__( 'File:', 'opalestate-pro' ) ) ),
$url_value,
CMB2_Utils::get_file_name_from_path( $url_value )
);

View File

@@ -41,7 +41,7 @@ abstract class CMB2_Hookup_Base {
* @param CMB2 $cmb The CMB2 object to hookup.
*/
public static function maybe_init_and_hookup( CMB2 $cmb ) {
throw new Exception( sprintf( esc_html__( '%1$s should be implemented by the extended class.', 'cmb2' ), __FUNCTION__ ) );
throw new Exception( sprintf( esc_html__( '%1$s should be implemented by the extended class.', 'opalestate-pro' ), __FUNCTION__ ) );
}
/**
@@ -99,7 +99,7 @@ abstract class CMB2_Hookup_Base {
case 'cmb':
return $this->{$field};
default:
throw new Exception( sprintf( esc_html__( 'Invalid %1$s property: %2$s', 'cmb2' ), __CLASS__, $field ) );
throw new Exception( sprintf( esc_html__( 'Invalid %1$s property: %2$s', 'opalestate-pro' ), __CLASS__, $field ) );
}
}
}

View File

@@ -162,10 +162,10 @@ class CMB2_JS {
wp_register_script( 'iris', admin_url( 'js/iris.min.js' ), array( 'jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch' ), CMB2_VERSION );
wp_register_script( 'wp-color-picker', admin_url( 'js/color-picker.min.js' ), array( 'iris' ), CMB2_VERSION );
wp_localize_script( 'wp-color-picker', 'wpColorPickerL10n', array(
'clear' => esc_html__( 'Clear', 'cmb2' ),
'defaultString' => esc_html__( 'Default', 'cmb2' ),
'pick' => esc_html__( 'Select Color', 'cmb2' ),
'current' => esc_html__( 'Current Color', 'cmb2' ),
'clear' => esc_html__( 'Clear', 'opalestate-pro' ),
'defaultString' => esc_html__( 'Default', 'opalestate-pro' ),
'pick' => esc_html__( 'Select Color', 'opalestate-pro' ),
'current' => esc_html__( 'Current Color', 'opalestate-pro' ),
) );
}
@@ -197,39 +197,39 @@ class CMB2_JS {
'date_picker' => array(
'changeMonth' => true,
'changeYear' => true,
'dateFormat' => _x( 'mm/dd/yy', 'Valid formatDate string for jquery-ui datepicker', 'cmb2' ),
'dayNames' => explode( ',', esc_html__( 'Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday', 'cmb2' ) ),
'dayNamesMin' => explode( ',', esc_html__( 'Su, Mo, Tu, We, Th, Fr, Sa', 'cmb2' ) ),
'dayNamesShort' => explode( ',', esc_html__( 'Sun, Mon, Tue, Wed, Thu, Fri, Sat', 'cmb2' ) ),
'monthNames' => explode( ',', esc_html__( 'January, February, March, April, May, June, July, August, September, October, November, December', 'cmb2' ) ),
'monthNamesShort' => explode( ',', esc_html__( 'Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec', 'cmb2' ) ),
'nextText' => esc_html__( 'Next', 'cmb2' ),
'prevText' => esc_html__( 'Prev', 'cmb2' ),
'currentText' => esc_html__( 'Today', 'cmb2' ),
'closeText' => esc_html__( 'Done', 'cmb2' ),
'clearText' => esc_html__( 'Clear', 'cmb2' ),
'dateFormat' => _x( 'mm/dd/yy', 'Valid formatDate string for jquery-ui datepicker', 'opalestate-pro' ),
'dayNames' => explode( ',', esc_html__( 'Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday', 'opalestate-pro' ) ),
'dayNamesMin' => explode( ',', esc_html__( 'Su, Mo, Tu, We, Th, Fr, Sa', 'opalestate-pro' ) ),
'dayNamesShort' => explode( ',', esc_html__( 'Sun, Mon, Tue, Wed, Thu, Fri, Sat', 'opalestate-pro' ) ),
'monthNames' => explode( ',', esc_html__( 'January, February, March, April, May, June, July, August, September, October, November, December', 'opalestate-pro' ) ),
'monthNamesShort' => explode( ',', esc_html__( 'Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec', 'opalestate-pro' ) ),
'nextText' => esc_html__( 'Next', 'opalestate-pro' ),
'prevText' => esc_html__( 'Prev', 'opalestate-pro' ),
'currentText' => esc_html__( 'Today', 'opalestate-pro' ),
'closeText' => esc_html__( 'Done', 'opalestate-pro' ),
'clearText' => esc_html__( 'Clear', 'opalestate-pro' ),
),
'time_picker' => array(
'timeOnlyTitle' => esc_html__( 'Choose Time', 'cmb2' ),
'timeText' => esc_html__( 'Time', 'cmb2' ),
'hourText' => esc_html__( 'Hour', 'cmb2' ),
'minuteText' => esc_html__( 'Minute', 'cmb2' ),
'secondText' => esc_html__( 'Second', 'cmb2' ),
'currentText' => esc_html__( 'Now', 'cmb2' ),
'closeText' => esc_html__( 'Done', 'cmb2' ),
'timeFormat' => _x( 'hh:mm TT', 'Valid formatting string, as per http://trentrichardson.com/examples/timepicker/', 'cmb2' ),
'timeOnlyTitle' => esc_html__( 'Choose Time', 'opalestate-pro' ),
'timeText' => esc_html__( 'Time', 'opalestate-pro' ),
'hourText' => esc_html__( 'Hour', 'opalestate-pro' ),
'minuteText' => esc_html__( 'Minute', 'opalestate-pro' ),
'secondText' => esc_html__( 'Second', 'opalestate-pro' ),
'currentText' => esc_html__( 'Now', 'opalestate-pro' ),
'closeText' => esc_html__( 'Done', 'opalestate-pro' ),
'timeFormat' => _x( 'hh:mm TT', 'Valid formatting string, as per http://trentrichardson.com/examples/timepicker/', 'opalestate-pro' ),
'controlType' => 'select',
'stepMinute' => 5,
),
),
'strings' => array(
'upload_file' => esc_html__( 'Use this file', 'cmb2' ),
'upload_files' => esc_html__( 'Use these files', 'cmb2' ),
'remove_image' => esc_html__( 'Remove Image', 'cmb2' ),
'remove_file' => esc_html__( 'Remove', 'cmb2' ),
'file' => esc_html__( 'File:', 'cmb2' ),
'download' => esc_html__( 'Download', 'cmb2' ),
'check_toggle' => esc_html__( 'Select / Deselect All', 'cmb2' ),
'upload_file' => esc_html__( 'Use this file', 'opalestate-pro' ),
'upload_files' => esc_html__( 'Use these files', 'opalestate-pro' ),
'remove_image' => esc_html__( 'Remove Image', 'opalestate-pro' ),
'remove_file' => esc_html__( 'Remove', 'opalestate-pro' ),
'file' => esc_html__( 'File:', 'opalestate-pro' ),
'download' => esc_html__( 'Download', 'opalestate-pro' ),
'check_toggle' => esc_html__( 'Select / Deselect All', 'opalestate-pro' ),
),
);

View File

@@ -244,7 +244,7 @@ class CMB2_Option {
case 'key':
return $this->{$field};
default:
throw new Exception( sprintf( esc_html__( 'Invalid %1$s property: %2$s', 'cmb2' ), __CLASS__, $field ) );
throw new Exception( sprintf( esc_html__( 'Invalid %1$s property: %2$s', 'opalestate-pro' ), __CLASS__, $field ) );
}
}
}

View File

@@ -136,11 +136,11 @@ class CMB2_Options_Hookup extends CMB2_hookup {
$is_updated = $should_notify && 'true' === $_GET['settings-updated'];
$setting = "{$this->option_key}-notices";
$code = '';
$message = esc_html__( 'Nothing to update.', 'cmb2' );
$message = esc_html__( 'Nothing to update.', 'opalestate-pro' );
$type = 'notice-warning';
if ( $is_updated ) {
$message = esc_html__( 'Settings updated.', 'cmb2' );
$message = esc_html__( 'Settings updated.', 'opalestate-pro' );
$type = 'updated';
}
@@ -354,7 +354,7 @@ class CMB2_Options_Hookup extends CMB2_hookup {
case 'cmb':
return $this->{$field};
default:
throw new Exception( sprintf( esc_html__( 'Invalid %1$s property: %2$s', 'cmb2' ), __CLASS__, $field ) );
throw new Exception( sprintf( esc_html__( 'Invalid %1$s property: %2$s', 'opalestate-pro' ), __CLASS__, $field ) );
}
}
}

View File

@@ -223,7 +223,7 @@ class CMB2_Types {
$this->type = new $render_class_name( $this, $args );
if ( ! ( $this->type instanceof CMB2_Type_Base ) ) {
throw new Exception( esc_html__( 'Custom CMB2 field type classes must extend CMB2_Type_Base.', 'cmb2' ) );
throw new Exception( esc_html__( 'Custom CMB2 field type classes must extend CMB2_Type_Base.', 'opalestate-pro' ) );
}
return $this->type;
@@ -341,7 +341,7 @@ class CMB2_Types {
</div>
</div>
<p class="cmb-add-row">
<button type="button" data-selector="<?php echo $table_id; ?>" class="cmb-add-row-button button-secondary"><?php echo esc_html( $this->_text( 'add_row_text', esc_html__( 'Add Row', 'cmb2' ) ) ); ?></button>
<button type="button" data-selector="<?php echo $table_id; ?>" class="cmb-add-row-button button-secondary"><?php echo esc_html( $this->_text( 'add_row_text', esc_html__( 'Add Row', 'opalestate-pro' ) ) ); ?></button>
</p>
<?php
@@ -403,7 +403,7 @@ class CMB2_Types {
<?php $this->_render(); ?>
</div>
<div class="cmb-td cmb-remove-row">
<button type="button" class="button-secondary cmb-remove-row-button" title="<?php echo esc_attr( $this->_text( 'remove_row_button_title', esc_html__( 'Remove Row', 'cmb2' ) ) ); ?>"><?php echo esc_html( $this->_text( 'remove_row_text', esc_html__( 'Remove', 'cmb2' ) ) ); ?></button>
<button type="button" class="button-secondary cmb-remove-row-button" title="<?php echo esc_attr( $this->_text( 'remove_row_button_title', esc_html__( 'Remove Row', 'opalestate-pro' ) ) ); ?>"><?php echo esc_html( $this->_text( 'remove_row_text', esc_html__( 'Remove', 'opalestate-pro' ) ) ); ?></button>
</div>
</div>

View File

@@ -179,11 +179,11 @@ class CMB2_hookup extends CMB2_Hookup_Base {
public function term_hooks() {
if ( ! function_exists( 'get_term_meta' ) ) {
wp_die( esc_html__( 'Term Metadata is a WordPress 4.4+ feature. Please upgrade your WordPress install.', 'cmb2' ) );
wp_die( esc_html__( 'Term Metadata is a WordPress 4.4+ feature. Please upgrade your WordPress install.', 'opalestate-pro' ) );
}
if ( ! $this->cmb->prop( 'taxonomies' ) ) {
wp_die( esc_html__( 'Term metaboxes configuration requires a "taxonomies" parameter.', 'cmb2' ) );
wp_die( esc_html__( 'Term metaboxes configuration requires a "taxonomies" parameter.', 'opalestate-pro' ) );
}
$this->taxonomies = (array) $this->cmb->prop( 'taxonomies' );
@@ -463,7 +463,7 @@ class CMB2_hookup extends CMB2_Hookup_Base {
if ( $add_handle ) {
echo '<button type="button" class="handlediv button-link" aria-expanded="true">';
echo '<span class="screen-reader-text">' . sprintf( esc_html__( 'Toggle panel: %s' ), $title ) . '</span>';
echo '<span class="screen-reader-text">' . sprintf( esc_html__( 'Toggle panel: %s', 'opalestate-pro' ), $title ) . '</span>';
echo '<span class="toggle-indicator" aria-hidden="true"></span>';
echo '</button>';

View File

@@ -104,7 +104,7 @@ function cmb2_get_oembed( $args = array() ) {
$error = sprintf(
/* translators: 1: results for. 2: link to codex.wordpress.org/Embeds */
esc_html__( 'No oEmbed Results Found for %1$s. View more info at %2$s.', 'cmb2' ),
esc_html__( 'No oEmbed Results Found for %1$s. View more info at %2$s.', 'opalestate-pro' ),
$oembed['fallback'],
'<a href="https://codex.wordpress.org/Embeds" target="_blank">codex.wordpress.org/Embeds</a>'
);
@@ -304,7 +304,7 @@ function cmb2_print_metabox_form( $meta_box, $object_id = 0, $args = array() ) {
$args = wp_parse_args( $args, array(
'form_format' => '<form class="cmb-form" method="post" id="%1$s" enctype="multipart/form-data" encoding="multipart/form-data"><input type="hidden" name="object_id" value="%2$s">%3$s<input type="submit" name="submit-cmb" value="%4$s" class="button-primary"></form>',
'save_button' => esc_html__( 'Save', 'cmb2' ),
'save_button' => esc_html__( 'Save', 'opalestate-pro' ),
'object_type' => $cmb->mb_object_type(),
'cmb_styles' => $cmb->prop( 'cmb_styles' ),
'enqueue_js' => $cmb->prop( 'enqueue_js' ),

View File

@@ -254,7 +254,7 @@ abstract class CMB2_REST_Controller extends WP_REST_Controller {
$this->initiate_rest_box( $request, $request_type );
if ( ! is_wp_error( $this->rest_box ) && ! $this->rest_box->rest_read ) {
$this->rest_box = new WP_Error( 'cmb2_rest_no_read_error', esc_html__( 'This box does not have read permissions.', 'cmb2' ), array(
$this->rest_box = new WP_Error( 'cmb2_rest_no_read_error', esc_html__( 'This box does not have read permissions.', 'opalestate-pro' ), array(
'status' => 403,
) );
}
@@ -274,7 +274,7 @@ abstract class CMB2_REST_Controller extends WP_REST_Controller {
$this->initiate_rest_box( $request, $request_type );
if ( ! is_wp_error( $this->rest_box ) && ! $this->rest_box->rest_edit ) {
$this->rest_box = new WP_Error( 'cmb2_rest_no_write_error', esc_html__( 'This box does not have write permissions.', 'cmb2' ), array(
$this->rest_box = new WP_Error( 'cmb2_rest_no_write_error', esc_html__( 'This box does not have write permissions.', 'opalestate-pro' ), array(
'status' => 403,
) );
}
@@ -297,7 +297,7 @@ abstract class CMB2_REST_Controller extends WP_REST_Controller {
if ( ! $this->rest_box ) {
$this->rest_box = new WP_Error( 'cmb2_rest_box_not_found_error', esc_html__( 'No box found by that id. A box needs to be registered with the "show_in_rest" parameter configured.', 'cmb2' ), array(
$this->rest_box = new WP_Error( 'cmb2_rest_box_not_found_error', esc_html__( 'No box found by that id. A box needs to be registered with the "show_in_rest" parameter configured.', 'opalestate-pro' ), array(
'status' => 403,
) );
@@ -375,21 +375,21 @@ abstract class CMB2_REST_Controller extends WP_REST_Controller {
'type' => 'object',
'properties' => array(
'description' => array(
'description' => esc_html__( 'A human-readable description of the object.', 'cmb2' ),
'description' => esc_html__( 'A human-readable description of the object.', 'opalestate-pro' ),
'type' => 'string',
'context' => array(
'view',
),
),
'name' => array(
'description' => esc_html__( 'The id for the object.', 'cmb2' ),
'description' => esc_html__( 'The id for the object.', 'opalestate-pro' ),
'type' => 'integer',
'context' => array(
'view',
),
),
'name' => array(
'description' => esc_html__( 'The title for the object.', 'cmb2' ),
'description' => esc_html__( 'The title for the object.', 'opalestate-pro' ),
'type' => 'string',
'context' => array(
'view',

View File

@@ -48,7 +48,7 @@ class CMB2_REST_Controller_Boxes extends CMB2_REST_Controller {
public function register_routes() {
$args = array(
'_embed' => array(
'description' => esc_html__( 'Includes the registered fields for the box in the response.', 'cmb2' ),
'description' => esc_html__( 'Includes the registered fields for the box in the response.', 'opalestate-pro' ),
),
);
@@ -69,7 +69,7 @@ class CMB2_REST_Controller_Boxes extends CMB2_REST_Controller {
) );
$args['_rendered'] = array(
'description' => esc_html__( 'Includes the fully rendered attributes, \'form_open\', \'form_close\', as well as the enqueued \'js_dependencies\' script handles, and \'css_dependencies\' stylesheet handles.', 'cmb2' ),
'description' => esc_html__( 'Includes the fully rendered attributes, \'form_open\', \'form_close\', as well as the enqueued \'js_dependencies\' script handles, and \'css_dependencies\' stylesheet handles.', 'opalestate-pro' ),
);
// Returns specific box's data.
@@ -119,7 +119,7 @@ class CMB2_REST_Controller_Boxes extends CMB2_REST_Controller {
$boxes = CMB2_REST::get_all();
if ( empty( $boxes ) ) {
return new WP_Error( 'cmb2_rest_no_boxes', esc_html__( 'No boxes found.', 'cmb2' ), array(
return new WP_Error( 'cmb2_rest_no_boxes', esc_html__( 'No boxes found.', 'opalestate-pro' ), array(
'status' => 403,
) );
}

View File

@@ -24,16 +24,16 @@ class CMB2_REST_Controller_Fields extends CMB2_REST_Controller_Boxes {
public function register_routes() {
$args = array(
'_embed' => array(
'description' => esc_html__( 'Includes the box object which the fields are registered to in the response.', 'cmb2' ),
'description' => esc_html__( 'Includes the box object which the fields are registered to in the response.', 'opalestate-pro' ),
),
'_rendered' => array(
'description' => esc_html__( 'When the \'_rendered\' argument is passed, the renderable field attributes will be returned fully rendered. By default, the names of the callback handers for the renderable attributes will be returned.', 'cmb2' ),
'description' => esc_html__( 'When the \'_rendered\' argument is passed, the renderable field attributes will be returned fully rendered. By default, the names of the callback handers for the renderable attributes will be returned.', 'opalestate-pro' ),
),
'object_id' => array(
'description' => esc_html__( 'To view or modify the field\'s value, the \'object_id\' and \'object_type\' arguments are required.', 'cmb2' ),
'description' => esc_html__( 'To view or modify the field\'s value, the \'object_id\' and \'object_type\' arguments are required.', 'opalestate-pro' ),
),
'object_type' => array(
'description' => esc_html__( 'To view or modify the field\'s value, the \'object_id\' and \'object_type\' arguments are required.', 'cmb2' ),
'description' => esc_html__( 'To view or modify the field\'s value, the \'object_id\' and \'object_type\' arguments are required.', 'opalestate-pro' ),
),
);
@@ -233,7 +233,7 @@ class CMB2_REST_Controller_Fields extends CMB2_REST_Controller_Boxes {
$this->initiate_rest_read_box( $request, 'field_value_update' );
if ( ! $this->request['value'] ) {
return new WP_Error( 'cmb2_rest_update_field_error', esc_html__( 'CMB2 Field value cannot be updated without the value parameter specified.', 'cmb2' ), array(
return new WP_Error( 'cmb2_rest_update_field_error', esc_html__( 'CMB2 Field value cannot be updated without the value parameter specified.', 'opalestate-pro' ), array(
'status' => 400,
) );
}
@@ -294,7 +294,7 @@ class CMB2_REST_Controller_Fields extends CMB2_REST_Controller_Boxes {
public function modify_field_value( $activity ) {
if ( ! $this->request['object_id'] || ! $this->request['object_type'] ) {
return new WP_Error( 'cmb2_rest_modify_field_value_error', esc_html__( 'CMB2 Field value cannot be modified without the object_id and object_type parameters specified.', 'cmb2' ), array(
return new WP_Error( 'cmb2_rest_modify_field_value_error', esc_html__( 'CMB2 Field value cannot be modified without the object_id and object_type parameters specified.', 'opalestate-pro' ), array(
'status' => 400,
) );
}
@@ -309,7 +309,7 @@ class CMB2_REST_Controller_Fields extends CMB2_REST_Controller_Boxes {
);
if ( ! $this->field ) {
return new WP_Error( 'cmb2_rest_no_field_by_id_error', esc_html__( 'No field found by that id.', 'cmb2' ), array(
return new WP_Error( 'cmb2_rest_no_field_by_id_error', esc_html__( 'No field found by that id.', 'opalestate-pro' ), array(
'status' => 403,
) );
}
@@ -338,7 +338,7 @@ class CMB2_REST_Controller_Fields extends CMB2_REST_Controller_Boxes {
$this->field = $this->rest_box->field_can_read( $field, true );
if ( ! $this->field ) {
return new WP_Error( 'cmb2_rest_no_field_by_id_error', esc_html__( 'No field found by that id.', 'cmb2' ), array(
return new WP_Error( 'cmb2_rest_no_field_by_id_error', esc_html__( 'No field found by that id.', 'opalestate-pro' ), array(
'status' => 403,
) );
}
@@ -412,7 +412,7 @@ class CMB2_REST_Controller_Fields extends CMB2_REST_Controller_Boxes {
if ( empty( $value ) || is_scalar( $value ) || is_array( $value ) ) {
$field_data[ $key ] = $value;
} else {
$field_data[ $key ] = sprintf( esc_html__( 'Value Error for %s', 'cmb2' ), $key );
$field_data[ $key ] = sprintf( esc_html__( 'Value Error for %s', 'opalestate-pro' ), $key );
}
}

View File

@@ -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',

View File

@@ -154,7 +154,7 @@ abstract class CMB2_Type_Base {
case 'concat_attrs':
return call_user_func_array( array( $this->types, $method ), $arguments );
default:
throw new Exception( sprintf( esc_html__( 'Invalid %1$s method: %2$s', 'cmb2' ), __CLASS__, $method ) );
throw new Exception( sprintf( esc_html__( 'Invalid %1$s method: %2$s', 'opalestate-pro' ), __CLASS__, $method ) );
}
}
@@ -170,7 +170,7 @@ abstract class CMB2_Type_Base {
case 'field':
return $this->types->field;
default:
throw new Exception( sprintf( esc_html__( 'Invalid %1$s property: %2$s', 'cmb2' ), __CLASS__, $field ) );
throw new Exception( sprintf( esc_html__( 'Invalid %1$s property: %2$s', 'opalestate-pro' ), __CLASS__, $field ) );
}
}

View File

@@ -73,7 +73,7 @@ class CMB2_Type_File extends CMB2_Type_File_Base {
$output .= sprintf(
'<input class="cmb2-upload-button button-secondary" type="button" value="%1$s" />',
esc_attr( $this->_text( 'add_upload_file_text', esc_html__( 'Add or Upload File', 'cmb2' ) ) )
esc_attr( $this->_text( 'add_upload_file_text', esc_html__( 'Add or Upload File', 'opalestate-pro' ) ) )
);
$output .= $a['desc'];

View File

@@ -61,7 +61,7 @@ class CMB2_Type_File_Base extends CMB2_Type_Text {
$args['tag'],
$args['image'],
isset( $args['cached_id'] ) ? ' rel="' . $args['cached_id'] . '"' : '',
esc_html( $this->_text( 'remove_image_text', esc_html__( 'Remove Image', 'cmb2' ) ) ),
esc_html( $this->_text( 'remove_image_text', esc_html__( 'Remove Image', 'opalestate-pro' ) ) ),
isset( $args['id_input'] ) ? $args['id_input'] : ''
);
}
@@ -76,12 +76,12 @@ class CMB2_Type_File_Base extends CMB2_Type_Text {
public function file_status_output( $args ) {
return sprintf( '<%1$s class="file-status cmb2-media-item"><span>%2$s <strong>%3$s</strong></span>&nbsp;&nbsp; (<a href="%4$s" target="_blank" rel="external">%5$s</a> / <a href="#" class="cmb2-remove-file-button"%6$s>%7$s</a>)%8$s</%1$s>',
$args['tag'],
esc_html( $this->_text( 'file_text', esc_html__( 'File:', 'cmb2' ) ) ),
esc_html( $this->_text( 'file_text', esc_html__( 'File:', 'opalestate-pro' ) ) ),
CMB2_Utils::get_file_name_from_path( $args['value'] ),
$args['value'],
esc_html( $this->_text( 'file_download_text', esc_html__( 'Download', 'cmb2' ) ) ),
esc_html( $this->_text( 'file_download_text', esc_html__( 'Download', 'opalestate-pro' ) ) ),
isset( $args['cached_id'] ) ? ' rel="' . $args['cached_id'] . '"' : '',
esc_html( $this->_text( 'remove_text', esc_html__( 'Remove', 'cmb2' ) ) ),
esc_html( $this->_text( 'remove_text', esc_html__( 'Remove', 'opalestate-pro' ) ) ),
isset( $args['id_input'] ) ? $args['id_input'] : ''
);
}

View File

@@ -38,7 +38,7 @@ class CMB2_Type_File_List extends CMB2_Type_File_Base {
$output .= parent::render( array(
'type' => 'button',
'class' => 'cmb2-upload-button button-secondary cmb2-upload-list',
'value' => esc_attr( $this->_text( 'add_upload_files_text', esc_html__( 'Add or Upload Files', 'cmb2' ) ) ),
'value' => esc_attr( $this->_text( 'add_upload_files_text', esc_html__( 'Add or Upload Files', 'opalestate-pro' ) ) ),
'name' => '',
'id' => '',
) );

View File

@@ -112,7 +112,7 @@ abstract class CMB2_Type_Taxonomy_Base extends CMB2_Type_Multi_Base {
$message = $error->get_error_message();
$data = 'data-error="' . esc_attr( $error->get_error_code() ) . '"';
} else {
$message = $this->_text( 'no_terms_text', esc_html__( 'No terms', 'cmb2' ) );
$message = $this->_text( 'no_terms_text', esc_html__( 'No terms', 'opalestate-pro' ) );
$data = '';
}