get_tags example


    $cats  = array();
    $tags  = array();
    $terms = array();
    if ( isset( $term ) && $term ) {
        $cat  = get_term( $term['term_id'], 'category' );
        $cats = array( $cat->term_id => $cat );
        unset( $term$cat );
    } elseif ( 'all' === $args['content'] ) {
        $categories = (array) get_categories( array( 'get' => 'all' ) );
        $tags       = (array) get_tags( array( 'get' => 'all' ) );

        $custom_taxonomies = get_taxonomies( array( '_builtin' => false ) );
        $custom_terms      = (array) get_terms(
            array(
                'taxonomy' => $custom_taxonomies,
                'get'      => 'all',
            )
        );

        // Put categories in order with no child going before its parent.         while ( $cat = array_shift( $categories ) ) {
            


        if ( ! current_user_can( 'edit_posts' ) ) {
            return new IXR_Error( 401, __( 'Sorry, you must be able to edit posts on this site in order to view tags.' ) );
        }

        /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
        do_action( 'xmlrpc_call', 'wp.getKeywords', $args$this );

        $tags = array();

        $all_tags = get_tags();
        if ( $all_tags ) {
            foreach ( (array) $all_tags as $tag ) {
                $struct             = array();
                $struct['tag_id']   = $tag->term_id;
                $struct['name']     = $tag->name;
                $struct['count']    = $tag->count;
                $struct['slug']     = $tag->slug;
                $struct['html_url'] = esc_html( get_tag_link( $tag->term_id ) );
                $struct['rss_url']  = esc_html( get_tag_feed_link( $tag->term_id ) );

                $tags[] = $struct;
            }
Home | Imprint | This part of the site doesn't use cookies.