• Resolved sgoerger

    (@sgoerger)


    Hi,

    I’m hoping I can hook into a custom taxonomy I’ve created through MLA “example plugin” setup. My taxonomy is called “Client Grouping” (client-grouping).

    What I’d like to do is create, and similarly, remove, a custom user role at the same time that a term is created (or removed) in client-grouping taxonomy.

    I imagine there is a hook on creation of att_category or client-grouping, and I think creating/destroying user roles with a hook there should be easy enough. I think I even saw some code a couple weeks back about the proper hook to look at, but I can’t seem to find it again.

    Any leads on what to hook into, on creation of a new MLA custom taxonomy term? Thanks!

Viewing 1 replies (of 1 total)
  • Plugin Author David Lingren

    (@dglingren)

    Thanks for your question and for finding the MLA example plugins and adapting them to your application. Did you start from a particular example plugin? If so, which one?

    As you probably know, the custom taxonomies MLA provides (Att. Categories and Att. Tags) are normal WordPress custom taxonomies. There are a few MLA hooks that affect the creation of the MLA-provided taxonomies. You can find them in the “Custom Taxonomy Actions and Filters (Hooks)” section of the Settings/Media Library Assistant Documentation tab. There are no MLA-specific hooks for taxonomy term operations, but there are many hooks built in to WordPress itself that should be useful for you. You can find more information about them in the WordPress Reference. Here’s a search I did to get you started:

    189 results found for “term”. Showing results 1 to 30.

    Two of the hooks in the search results look useful:

    Browse: Home / Reference / Hooks / create_term

    Browse: Home / Reference / Hooks / delete_term

    I hope that gets you started on a solution for your application. I am marking this topic resolved, but please update it if you have any problems or further questions regarding the above suggestions. Thanks for your interest in the plugin.

Viewing 1 replies (of 1 total)
  • The topic ‘How Can I Hook Into Creation of A Term Inside Custom MLA Media Taxonomy?’ is closed to new replies.