getCurrentThemePath() . 'images/logo.jpg';
if( file_exists( $temp_name ) && !$logo_prefence) {
$img = ImageResizer::fromFile($temp_name);
$ext = $img->getExt();
$logo_name .= '.'.$ext;
$img->saveToFile(osc_uploads_path().$logo_name);
osc_set_preference('logo', $logo_name, 'bender');
}
osc_set_preference('version', '301', 'bender');
if($current_version<313 || $current_version=='3.0.1') {
// add preferences
osc_set_preference('defaultLocationShowAs', 'dropdown', 'bender');
osc_set_preference('version', '313', 'bender');
}
osc_set_preference('version', '314', 'bender');
if($current_version<320 ) {
// add preferences
osc_set_preference('rtl', '0', 'bender');
osc_set_preference('version', '320', 'bender');
}
osc_set_preference('version', '320', 'bender');
osc_reset_preferences();
}
}
if(!function_exists('check_install_bender_theme')) {
function check_install_bender_theme() {
$current_version = osc_get_preference('version', 'bender');
//check if current version is installed or need an update<
if( $current_version=='' ) {
bender_theme_update(0);
} else if($current_version < BENDER_THEME_VERSION){
bender_theme_update($current_version);
}
}
}
if(!function_exists('bender_add_body_class_construct')) {
function bender_add_body_class_construct($classes){
$benderBodyClass = benderBodyClass::newInstance();
$classes = array_merge($classes, $benderBodyClass->get());
return $classes;
}
}
if(!function_exists('bender_body_class')) {
function bender_body_class($echo = true){
/**
* Print body classes.
*
* @param string $echo Optional parameter.
* @return print string with all body classes concatenated
*/
osc_add_filter('bender_bodyClass','bender_add_body_class_construct');
$classes = osc_apply_filter('bender_bodyClass', array());
if($echo && count($classes)){
echo 'class="'.implode(' ',$classes).'"';
} else {
return $classes;
}
}
}
if(!function_exists('bender_add_body_class')) {
function bender_add_body_class($class){
/**
* Add new body class to body class array.
*
* @param string $class required parameter.
*/
$benderBodyClass = benderBodyClass::newInstance();
$benderBodyClass->add($class);
}
}
if(!function_exists('bender_nofollow_construct')) {
/**
* Hook for header, meta tags robots nofollos
*/
function bender_nofollow_construct() {
echo '' . PHP_EOL;
echo '' . PHP_EOL;
}
}
if( !function_exists('bender_follow_construct') ) {
/**
* Hook for header, meta tags robots follow
*/
function bender_follow_construct() {
echo '' . PHP_EOL;
echo '' . PHP_EOL;
}
}
/* logo */
if( !function_exists('logo_header') ) {
function logo_header() {
$logo = osc_get_preference('logo','bender');
$html = '';
if( $logo!='' && file_exists( osc_uploads_path() . $logo ) ) {
return $html;
} else {
return ''.osc_page_title().'';
}
}
}
/* logo */
if( !function_exists('bender_logo_url') ) {
function bender_logo_url() {
$logo = osc_get_preference('logo','bender');
if( $logo ) {
return osc_uploads_url($logo);
}
return false;
}
}
if( !function_exists('bender_draw_item') ) {
function bender_draw_item($class = false,$admin = false, $premium = false) {
$filename = 'loop-single';
if($premium){
$filename .='-premium';
}
require WebThemes::newInstance()->getCurrentThemePath().$filename.'.php';
}
}
if( !function_exists('bender_show_as') ){
function bender_show_as(){
$p_sShowAs = Params::getParam('sShowAs');
$aValidShowAsValues = array('list', 'gallery');
if (!in_array($p_sShowAs, $aValidShowAsValues)) {
$p_sShowAs = bender_default_show_as();
}
return $p_sShowAs;
}
}
if( !function_exists('bender_default_direction') ){
function bender_default_direction(){
return getPreference('rtl','bender');
}
}
if( !function_exists('bender_default_show_as') ){
function bender_default_show_as(){
return getPreference('defaultShowAs@all','bender');
}
}
if( !function_exists('bender_default_location_show_as') ){
function bender_default_location_show_as(){
return osc_get_preference('defaultLocationShowAs','bender');
}
}
if( !function_exists('bender_draw_categories_list') ) {
function bender_draw_categories_list(){ ?>
'; } ?>
0) { echo ''; }
if($i == 0) {
echo '