芝麻web文件管理V1.00
编辑当前文件:/home/pulsehostuk9/www/wp-content/plugins/dexolix-core/library/codestar/fields/map/map.php
field, array( 'placeholder' => esc_html__( 'Search...', 'csf' ), 'latitude_text' => esc_html__( 'Latitude', 'csf' ), 'longitude_text' => esc_html__( 'Longitude', '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 '
'; echo '
field_attributes( $placeholder ) .' />'; echo '
'; } else { echo '
'; } echo '
'; echo '
'; echo '
'; echo '
'. esc_attr( $args['latitude_text'] ) .'
'; echo '
'; echo '
'; echo '
'; echo '
'. esc_attr( $args['longitude_text'] ) .'
'; echo '
'; echo '
'; echo '
'; echo '
'; echo $this->field_after(); } public function enqueue() { if ( ! wp_script_is( 'csf-leaflet' ) ) { wp_enqueue_script( 'csf-leaflet', esc_url( $this->cdn_url . $this->version .'/dist/leaflet.js' ), array( 'csf' ), $this->version, true ); } if ( ! wp_style_is( 'csf-leaflet' ) ) { wp_enqueue_style( 'csf-leaflet', esc_url( $this->cdn_url . $this->version .'/dist/leaflet.css' ), array(), $this->version ); } if ( ! wp_script_is( 'jquery-ui-autocomplete' ) ) { wp_enqueue_script( 'jquery-ui-autocomplete' ); } } } }