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

@@ -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 );