Uslovi koriscenja

function widget( $args, $instance ) {

global $sc_theme_globals, $bookyourtravel_post_helper;

$card_layout_classes = array(
‘full-width’,
‘one-half’,
‘one-third’,
‘one-fourth’,
‘one-fifth’
);

extract( $args );

/* Our variables from the widget settings. */

$number_of_posts = isset($instance[‘number_of_posts’]) ? (int)$instance[‘number_of_posts’] : 4;
$sort_by = isset($instance[‘sort_by’]) ? $instance[‘sort_by’] : ‘title’;
$sort_descending = isset($instance[‘sort_by’]) && $instance[‘sort_descending’] == ‘1’;
$order = $sort_descending ? ‘DESC’ : ‘ASC’;
$posts_per_row = isset($instance[‘posts_per_row’]) ? (int)$instance[‘posts_per_row’] : 4;
global $display_mode;
$display_mode = isset($instance[‘display_mode’]) ? $instance[‘display_mode’] : ‘card’;
$category_ids = isset($instance[‘category_ids’]) ? (array)$instance[‘category_ids’] : array();

echo $before_widget;

if ($display_mode == ‘card’) {
?>

if ($display_mode == ‘card’) {
?>

‘hide_empty’=>’0’
);
$categories = get_categories($cat_args);

/* Set up some default widget settings. */
$defaults = array(
‘title’ => esc_html__(‘Explore our latest offers’, ‘bookyourtravel’),