Retrieving a tag's parent group name

dev.xiligroup est en travaux Forums xili-tidy-tags plugin Retrieving a tag's parent group name

Ce sujet contient 0 réponses et 2 voix, et a été mis à jour par  xiligroup dev il y a Il y a 11 ans, 7 mois.

Visualisation du message 3 (1 sur 3, 3 au total)
  • Auteur
    Articles
  • #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

    Anonyme

    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’ ) );

    }

Visualisation du message 3 (1 sur 3, 3 au total)

Vous devez être connecté pour répondre à ce sujet.