Inpsyde\MultilingualPress\API\Languages::get_languages PHP Method

get_languages() public method

Returns all languages according to the given arguments.
Since: 3.0.0
public get_languages ( array $args = [] ) : object[]
$args array Arguments.
return object[] The array with objects of all languages according to the given arguments.
    public function get_languages(array $args = []);

Usage Example

    /**
     * @return void
     */
    private function print_tbody()
    {
        $rows = $this->languages->get_languages(['number' => $this->pagination_data->get_items_per_page(), 'page' => $this->pagination_data->get_current_page()]);
        if (!$rows) {
            ?>
			<tr>
				<td colspan="<?php 
            echo count($this->columns);
            ?>
">
					<p>
						<?php 
            _e('No items found. We recommend to reinstall this plugin.', 'multilingual-press');
            ?>
					</p>
				</td>
			</tr>
			<?php 
            return;
        }
        foreach ($rows as $id => $row) {
            $this->print_row($id, $row);
        }
    }
All Usage Examples Of Inpsyde\MultilingualPress\API\Languages::get_languages