• Resolved Brian P

    (@bburgay)


    Hi Tijmen,

    Thanks for including the alternate marker code in the update! My custom markers are working fine but my default markers are no longer working. I set a breakpoint in class-frontend.php get_marker_props function and it is being set to my child theme directory correctly. However when I set a breakpoint in the JS it’s still being picked up as … wp-content/plugins/wp-store-locator/img/markers.

    Thanks,
    Brian

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Brian P

    (@bburgay)

    Hey Tijmen. I had some time to look into it when I got home and found the issue. Since you moved the apply_filters call in get_marker_props after setting $marker_props[‘url’] the url gets lost when a function is added to the filter hook in the theme.

    So I think the wpsl_marker_props documentation (https://wpstorelocator.co/document/wpsl_marker_props/) just needs to be updated for this as the $marker_props array should be passed in and modified now instead of creating a new one.

    add_filter( 'wpsl_marker_props', 'custom_marker_props' );
    function custom_marker_props() {
                
        $marker_props = array(
            'scaledSize' => '24,35', // Set this to 50% of the original size
            'origin'     => '0,0',
            'anchor'     => '12,35'
        );
    
        return $marker_props;
    }
    

    Should now be:

    add_filter( 'wpsl_marker_props', 'custom_marker_props' );
    function custom_marker_props($marker_props) {
        
        $marker_props['scaledSize'] = '24,35'; // Set this to 50% of the original size
        $marker_props['origin'] = '0,0';
        $marker_props['anchor'] = '12,35';
    
        return $marker_props;
    }
    
    Plugin Author Tijmen Smit

    (@tijmensmit)

    Hi Brian,

    Thanks for pointing this out. I updated the documentation ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom Marker Dir Not Working After Update’ is closed to new replies.