• Resolved johnbhartley

    (@johnbhartley)


    First, this is a fantastic plugin and second, I’ve searched through the forum and was unable to find this answer, so I apologize if it’s been answered somewhere. Is there a filter or hook to change “Placemarks” to a different post type name? The plugin does everything I want, but from a user side it would be confusing to the person that’s going to be using it. Thanks in advance!

    https://wordpress.org/plugins/basic-google-maps-placemarks/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Ian Dunn

    (@iandunn)

    Yeah, the bgmp_post-type-params filter lets you change the args for register_post_type(), including the labels.

    Thread Starter johnbhartley

    (@johnbhartley)

    Sorry to be a bit of a n00b on this, but would I just use something like this?

    apply_filters( 'bgmp_post-type-params', $postTypeParams );

    Where $postTypeParams follows a similar pattern to what you have in the plugin but with the names changed? Or am I missing an argument in there.

    Thanks again.

    Plugin Author Ian Dunn

    (@iandunn)

    It’d be something like:

    function modify_BGMP_post_type( $params ) {
        $params['labels']['name']          = 'Markers';
        $params['labels']['singular_name'] = 'Marker';
        // etc
    
        return $params;
    }
    add_filter( 'bgmp_post-type-params', 'modify_BGMP_post_type' );
    Thread Starter johnbhartley

    (@johnbhartley)

    Awesome thanks! Seems fitting for me to start using filters and hooks properly on your plugin after seeing your talk in Dayton.

    Plugin Author Ian Dunn

    (@iandunn)

    Glad that helped 🙂

    Let me know if you run into any situations where some extra hooks in BGMP would be helpful.

    Thread Starter johnbhartley

    (@johnbhartley)

    Do you have a full list somewhere?

    Plugin Author Ian Dunn

    (@iandunn)

    No, but you could use your IDE/text editor to search for “do_action(” and “apply_filters(“.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Change "Placemarks" wording’ is closed to new replies.