Retrieving a tag's parent group name

dev.xiligroup is being renovated Forums xili-tidy-tags plugin Retrieving a tag's parent group name

This topic contains 0 replies, has 2 voices, and was last updated by  xiligroup dev 12 years, 6 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #3156

    xiligroup dev
    Keymaster

    It is possible to find groups from a tag. It is like in admin ui when the groups (checked if assigned) are displayed in a box when you edit a tag.. Don’t forget that xtt plugin is an instantiated class if you try to use a copy of part to create you own code…

    #3157

    Anonymous

    That’s the part of the code that I tried to work with, which – in fact – didn’t work, at least the way I did it. What is an instantiated class?

    #3159

    xiligroup dev
    Keymaster

    a good example is in xili_tidy_tags class is function xili_edit_tag_form – the param is the object of the target post_tag…

    If you make a copy elsewhere for your tests, remember that $this is the class itself… so after instantiation made by the plugin, the way is to use $xili_tidy_tags instead of $this

    function my_function ( $tag ) {

    global $xili_tidy_tags;

    $listtagsgroups = get_terms( $xili_tidy_tags->tidy_taxonomy, array( ‘hide_empty’ => false,’get’=>’all’ ) );

    }

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.