query_vars['paged'] > 1 ? $current = $wp_query->query_vars['paged'] : $current = 1;
$pagination = array(
'base' => @add_query_arg('paged','%#%'),
'format' => '',
'total' => $wp_query->max_num_pages,
'current' => $current,
'prev_text' => '« ',
'next_text' => ' »'
);
if( $wp_rewrite->using_permalinks() )
$pagination['base'] = user_trailingslashit( trailingslashit( remove_query_arg('s',get_pagenum_link(1) ) ) . 'page/%#%/', 'paged');
if( !empty($wp_query->query_vars['s']) )
$pagination['add_args'] = array('s'=>get_query_var('s'));
if($echo == "echo"){
echo '
'.paginate_links($pagination).'
';
}else
{
return ''.paginate_links($pagination).'
';
}
}
/*
* Custom comments list
*
*/
function onetake_comment($comment, $args, $depth) {
$GLOBALS['comment'] = $comment; ?>
id="li-comment-">
= 2 || $page >= 2 )
$title = "$title $sep " . sprintf( __( ' Page %s ', 'onetake' ), max( $paged, $page ) );
return $title;
}
add_filter( 'wp_title', 'onetake_wp_title', 10, 2 );
}
if ( ! function_exists( '_wp_render_title_tag' ) ) {
function onetake_slug_render_title() {
?>
';
for($i=1;$i<=5;$i++){
$active = '';
// $title = onetake_options_array('onetake_slide_title_'.$i);
$text = of_get_option('onetake_slide_text_'.$i);
$image = of_get_option('onetake_slide_image_'.$i);
$link = of_get_option('onetake_slide_link_'.$i);
if( $image != "" ){
if($i==1) $active = 'active';
$controller .= '
';
$slideContent .= '
';
if(trim($link) == ""){
$slideContent .= '
';
}else{
$slideContent .= '
';
}
$slideContent .= '
'.do_shortcode( wp_kses( $text , $allowedposttags ) ).'
';
}
}
$return .= '
'. $controller .'
';
$return .= '
'. do_shortcode( wp_kses( $slideContent , $allowedposttags ) ) .'
';
$return .= '
';
$return .= '
';
return $return;
}
/**
* onetake admin sidebar
*/
add_action( 'optionsframework_sidebar','onetake_options_panel_sidebar' );
function onetake_options_panel_sidebar() { ?>
';
}
echo $icon_link;
}
add_action( 'wp_head', 'onetake_favicon' );
// allow script & iframe tag within posts
function onetake_allow_post_tags( $allowedposttags ){
$allowedposttags['script'] = array(
'type' => true,
'src' => true,
'height' => true,
'width' => true,
);
$allowedposttags['iframe'] = array(
'src' => true,
'width' => true,
'height' => true,
'class' => true,
'frameborder' => true,
'webkitAllowFullScreen' => true,
'mozallowfullscreen' => true,
'allowFullScreen' => true
);
$allowedposttags['video'] = array(
'src' => true,
'type' => true,
'poster' => true,
);
return $allowedposttags;
}
add_filter('wp_kses_allowed_html','onetake_allow_post_tags', 1);