500, 'sticky' => 'off' ); wp_enqueue_script( 'aesop-map-script', AI_CORE_URL.'/public/includes/libs/leaflet/leaflet.js' ); wp_enqueue_style( 'aesop-map-style', AI_CORE_URL.'/public/includes/libs/leaflet/leaflet.css', AI_CORE_VERSION, true ); $atts = apply_filters( 'aesop_map_defaults', shortcode_atts( $defaults, $atts ) ); // sticky maps class $sticky = 'off' !== $atts['sticky'] ? sprintf( 'aesop-sticky-map-%s', esc_attr( $atts['sticky'] ) ) : null; // clean height $get_height = 'off' == $atts['sticky'] ? preg_replace( '/[^0-9]/', '', $atts['height'] ) : null; $height = $get_height ? sprintf( 'style="height:%spx;"', $get_height ) : null; // custom classes $classes = function_exists( 'aesop_component_classes' ) ? aesop_component_classes( 'map', '' ) : null; // get markers - since 1.3 $markers = get_post_meta( get_the_ID(), 'ase_map_component_locations', false ); // filterable map marker waypoint offset - since 1.3 // 50% means when the id hits 50% from the top the waypoint will fire $marker_waypoint_offset = apply_filters( 'aesop_map_waypoint_offset', '50%' ); // enable map component for all post types $default_location = true;//is_single(); $location = apply_filters( 'aesop_map_component_appears', $default_location ); static $instance = 0; $instance++; $unique = sprintf( '%s-%s', get_the_ID(), $instance ); ob_start(); do_action( 'aesop_map_before', $atts, $unique ); $url = admin_url( 'post.php?post='.get_the_ID().'&action=edit' ); $edit_map = __( 'Add Map Markers', 'aesop-core' ); $add_markers = sprintf( '(%s)', $url, $edit_map, $edit_map ); if ( empty( $markers ) && is_user_logged_in() && current_user_can( 'edit_post', get_the_ID() ) && ! function_exists( 'lasso_editor_components' ) ) { ?>