get_terms_for_site() public méthode

Return the terms for the given type.
public get_terms_for_site ( integer $site_id ) : array
$site_id integer Blog ID.
Résultat array
    /**
     * @return bool
     */
    public function print_table()
    {
        if (empty($this->related_sites)) {
            return FALSE;
        }
        print $this->presenter->get_nonce_field();
        $this->print_style();
        ?>

		<table class="mlp_term_selections">
			<?php 
        foreach ($this->related_sites as $site_id => $language) {
            $key = $this->presenter->get_key_base($site_id);
            $label_id = $this->get_label_id($key);
            $terms = $this->presenter->get_terms_for_site($site_id);
            ?>
				<tr>
					<th>
						<label for="<?php 
            print $label_id;
            ?>
"><?php 
            print $language;
            ?>
</label>
					</th>
					<td>
						<?php 
            if (empty($terms)) {
                print $this->get_no_terms_found_message($site_id);
            } else {
                ?>
							<select name="<?php 
                print $key;
                ?>
"
									id="<?php 
                print $label_id;
                ?>
">
								<option value="0" class="mlp_empty_option"><?php 
                esc_html_e('No translation', 'multilingualpress');
                ?>
</option>
								<?php 
                $this->print_term_options($site_id, $terms);
                ?>
							</select>
						<?php 
            }
            ?>
					</td>
				</tr>
				<?php 
        }
        ?>
		</table>
		<?php 
        return TRUE;
    }
    /**
     * @return bool
     */
    public function print_table()
    {
        $sites = $this->presenter->get_site_languages();
        print $this->presenter->get_nonce_field();
        $this->print_style();
        ?>

		<table class="mlp_term_selections">
			<?php 
        foreach ($sites as $site_id => $language) {
            $key = $this->presenter->get_key_base($site_id);
            $label_id = $this->get_label_id($key);
            $terms = $this->presenter->get_terms_for_site($site_id);
            $current_term = $this->get_current_term($site_id);
            ?>
				<tr>
					<th>
						<label for="<?php 
            print $label_id;
            ?>
"><?php 
            print $language;
            ?>
</label>
					</th>
					<td>
						<select name="<?php 
            print $key;
            ?>
" id="<?php 
            print $label_id;
            ?>
">
							<option value="0" class="mlp_empty_option"><?php 
            esc_html_e('No translation', 'multilingualpress');
            ?>
</option>
							<?php 
            foreach ($terms as $term_id => $term_name) {
                print $this->get_option_element($term_id, $term_name, $current_term);
            }
            ?>
						</select>
					</td>
				</tr>
				<?php 
        }
        ?>
		</table>
		<?php 
        return TRUE;
    }
    /**
     * @return bool
     */
    public function print_table()
    {
        if (empty($this->related_sites)) {
            return FALSE;
        }
        echo $this->presenter->get_nonce_field();
        $this->print_style();
        ?>
		<table id="mlp-term-translations">
			<?php 
        foreach ($this->related_sites as $site_id => $language) {
            ?>
				<?php 
            $key = $this->presenter->get_key_base($site_id);
            $label_id = $this->get_label_id($key);
            $terms = $this->presenter->get_terms_for_site($site_id);
            $current_term = $this->get_current_term($site_id);
            $empty_option_value = $current_term > 0 ? 0 : -1;
            ?>
				<tr>
					<th>
						<label for="<?php 
            print $label_id;
            ?>
"><?php 
            echo $language;
            ?>
</label>
					</th>
					<td>
						<?php 
            if (empty($terms)) {
                ?>
							<?php 
                echo $this->get_no_terms_found_message($site_id);
                ?>
						<?php 
            } else {
                ?>
							<select name="<?php 
                echo $key;
                ?>
" id="<?php 
                echo $label_id;
                ?>
" autocomplete="off">
								<option value="<?php 
                echo $empty_option_value;
                ?>
" class="mlp_empty_option">
									<?php 
                esc_html_e('No translation', 'multilingual-press');
                ?>
								</option>
								<?php 
                $this->print_term_options($terms, $current_term, $site_id);
                ?>
							</select>
						<?php 
            }
            ?>
					</td>
				</tr>
			<?php 
        }
        ?>
		</table>
		<?php 
        return TRUE;
    }