conditions['categoryids']['all'])) ? 1 : 0;
if(!$_all && !isset($ad->conditions['categoryids']['all']) && empty($ad->conditions['categoryids']['include']) && empty($ad->conditions['categoryids']['exclude'])){
$_all = 1;
}
}
if(!empty($ad->conditions['categoryids']['include'])){
// backward compatibility
// TODO: remove in a later version; this should already be an array
if(is_string($ad->conditions['categoryids']['include'])){
$_includes = explode(',', $ad->conditions['categoryids']['include']);
} else {
$_includes = $ad->conditions['categoryids']['include'];
}
} else {
$_includes = array();
}
?> true, 'publicly_queryable' => true), 'objects', 'or');
?>
name === 'advanced_ads_groups') continue; // exclude adv ads groups
// limit the number of terms so many terms don’t break the admin page
$max_terms = absint(apply_filters('advanced-ads-admin-max-terms', 200));
$terms = get_terms($_tax->name, array('number' => $max_terms));
if ( !empty( $terms ) && !is_wp_error( $terms ) ):
?>
label; ?>
conditions['categoryids']['exclude'])){
// backward compatibility
// TODO: remove in a later version; this should already be an array
if(is_string($ad->conditions['categoryids']['exclude'])){
$_excludes = explode(',', $ad->conditions['categoryids']['exclude']);
} else {
$_excludes = $ad->conditions['categoryids']['exclude'];
}
} else {
$_excludes = array();
}
?>
name === 'advanced_ads_groups') continue; // exclude adv ads groups
// limit the number of terms so many terms don’t break the admin page
$max_terms = absint(apply_filters('advanced-ads-admin-max-terms', 200));
$terms = get_terms($_tax->name, array('number' => $max_terms));
if ( !empty( $terms ) && !is_wp_error( $terms ) ):
?>
label; ?>
conditions['categoryarchiveids']['all'])) ? 1 : 0;
if(!$_all && empty($ad->conditions['categoryarchiveids']['include']) && empty($ad->conditions['categoryarchiveids']['exclude'])){
$_all = 1;
}
}
if(!empty($ad->conditions['categoryarchiveids']['include'])){
// backward compatibility
// TODO: remove in a later version; this should already be an array
if(is_string($ad->conditions['categoryarchiveids']['include'])){
$_includes = explode(',', $ad->conditions['categoryarchiveids']['include']);
} else {
$_includes = $ad->conditions['categoryarchiveids']['include'];
}
} else {
$_includes = array();
}
?> true, 'publicly_queryable' => true), 'objects', 'or');
?>
name === 'advanced_ads_groups') continue; // exclude adv ads groups
// limit the number of terms so many terms don’t break the admin page
$max_terms = absint(apply_filters('advanced-ads-admin-max-terms', 200));
$terms = get_terms($_tax->name, array('number' => $max_terms));
if ( !empty( $terms ) && !is_wp_error( $terms ) ):
?>
label; ?>
conditions['categoryarchiveids']['exclude'])){
// backward compatibility
// TODO: remove in a later version; this should already be an array
if(is_string($ad->conditions['categoryarchiveids']['exclude'])){
$_excludes = explode(',', $ad->conditions['categoryarchiveids']['exclude']);
} else {
$_excludes = $ad->conditions['categoryarchiveids']['exclude'];
}
} else {
$_excludes = array();
}
?>
name === 'advanced_ads_groups') continue; // exclude adv ads groups
// limit the number of terms so many terms don’t break the admin page
$max_terms = absint(apply_filters('advanced-ads-admin-max-terms', 200));
$terms = get_terms($_tax->name, array('number' => $max_terms));
if ( !empty( $terms ) && !is_wp_error( $terms ) ):
?>
conditions['postids']['include'])){
// backward compatibility
// TODO: remove in a later version; this should already be an array
if(is_string($ad->conditions['postids']['include'])){
$_postids = explode(',', $ad->conditions['postids']['include']);
} else {
$_postids = $ad->conditions['postids']['include'];
}
} elseif(!empty($ad->conditions['postids']['exclude'])){
// backward compatibility
// TODO: remove in a later version; this should already be an array
if(is_string($ad->conditions['postids']['exclude'])){
$_postids = explode(',', $ad->conditions['postids']['exclude']);
} else {
$_postids = $ad->conditions['postids']['exclude'];
}
} else {
$_postids = array();
}
?>