field, array( 'placeholder' => esc_html__( 'Search...', 'sakurairo_csf' ), 'latitude_text' => esc_html__( 'Latitude', 'sakurairo_csf' ), 'longitude_text' => esc_html__( 'Longitude', 'sakurairo_csf' ), 'address_field' => '', 'height' => '', ) ); $value = wp_parse_args( $this->value, array( 'address' => '', 'latitude' => '20', 'longitude' => '0', 'zoom' => '2', ) ); $default_settings = array( 'center' => array( $value['latitude'], $value['longitude'] ), 'zoom' => $value['zoom'], 'scrollWheelZoom' => false, ); $settings = ( ! empty( $this->field['settings'] ) ) ? $this->field['settings'] : array(); $settings = wp_parse_args( $settings, $default_settings ); $style_attr = ( ! empty( $args['height'] ) ) ? ' style="min-height:'. esc_attr( $args['height'] ) .';"' : ''; $placeholder = ( ! empty( $args['placeholder'] ) ) ? array( 'placeholder' => $args['placeholder'] ) : ''; echo $this->field_before(); if ( empty( $args['address_field'] ) ) { echo '