'footer-menu',
'menu_class' => '',
'container' => '',
'fallback_cb' => 'Advkt_Navwalker::fallback',
'walker' => new Advkt_Navwalker
));
}
/**
*
* advkt footer
*/
add_action('advkt_footer_style', 'advkt_check_footer', 10);
function advkt_check_footer() {
$advkt_default_footer_style = '2';
if ( class_exists( 'Redux' ) ) {
$opt_name = 'advkt_options';
$advkt_default_footer_style = Redux::get_option($opt_name, 'choose_default_footer',);
}
$advkt_footer_style = get_post_meta( get_the_ID(), 'advkt_choice_footer_style', true );
if( $advkt_footer_style == 'footer-style-1' ) {
advkt_footer_style_1();
}elseif( $advkt_footer_style == 'footer-style-2' ){
advkt_footer_style_2();
}
else{
/** default footer style **/
if($advkt_default_footer_style == '1'){
advkt_footer_style_1();
}elseif( $advkt_default_footer_style == '2' ){
advkt_footer_style_2();
}
}
}
/**
* footer style 1
*/
function advkt_footer_style_1() {
$footer_shape = [];
if ( class_exists( 'Redux' ) ) {
$opt_name = 'advkt_options';
$footer_shape = Redux::get_option($opt_name, 'footer_right_shape_img');
}
?>
'.esc_html($breadcrumb_home).'';
$showCurrent = 1;
$homeLink = esc_url( home_url('/'));
if ( is_front_page() ) { return; } // don't display breadcrumbs on the homepage (yet)
echo _advkt_home_callback($home);
if ( is_category() ) {
// category section
$thisCat = get_category(get_query_var('cat'), false);
if (!empty($thisCat->parent)) echo get_category_parents($thisCat->parent, TRUE, ' ' . '/' . ' ');
echo ''. esc_html($breadcrumb_archive).' "' . single_cat_title('', false) . '"' . '';
}
elseif ( is_search() ) {
// search section
echo '' . esc_html($breadcrumb_search).' "' . get_search_query() . '"' .'';
}
elseif ( is_day() ) {
echo '' . get_the_time('Y') . '';
echo '' . get_the_time('F') . ' ';
echo '' . get_the_time('d') .'';
}
elseif ( is_month() ) {
// monthly archive
echo '' . get_the_time('Y') . ' ';
echo '' . get_the_time('F') .'';
}
elseif ( is_year() ) {
// yearly archive
echo ''. get_the_time('Y') .'';
}
elseif ( is_single() && !is_attachment() ) {
// single post or page
if ( get_post_type() != 'post' ) {
$post_type = get_post_type_object(get_post_type());
$slug = $post_type->rewrite;
echo '' . $post_type->labels->singular_name . '';
if ($showCurrent) echo ''. get_the_title() .'';
}
else {
$cat = get_the_category(); if (isset($cat[0])) {$cat = $cat[0];} else {$cat = false;}
if ($cat) {$cats = get_category_parents($cat, TRUE, ' ' .' ' . ' ');} else {$cats=false;}
if (!$showCurrent && $cats) $cats = preg_replace("#^(.+)\s\s$#", "$1", $cats);
echo ''.$cats.'';
if ($showCurrent) echo ''. get_the_title() .'';
}
}
elseif ( is_attachment() ) {
// attachment section
$parent = get_post($post->post_parent);
$cat = get_the_category($parent->ID); if (isset($cat[0])) {$cat = $cat[0];} else {$cat=false;}
if ($cat) echo get_category_parents($cat, TRUE, ' ' . ' ' . ' ');
echo '' . $parent->post_title . '';
if ($showCurrent) echo ''. get_the_title() .'';
}
elseif ( is_page() && !$post->post_parent ) {
// parent page
if ($showCurrent)
echo ''. get_the_title() .'';
}
elseif ( is_page() && $post->post_parent ) {
// child page
$parent_id = $post->post_parent;
$breadcrumbs = array();
while ($parent_id) {
$page = get_page($parent_id);
$breadcrumbs[] = '' . get_the_title($page->ID) . '';
$parent_id = $page->post_parent;
}
$breadcrumbs = array_reverse($breadcrumbs);
for ($i = 0; $i < count($breadcrumbs); $i++) {
echo _advkt_breadcrumbs_callback($breadcrumbs[$i]);
if ($i != count($breadcrumbs)-1);
}
if ($showCurrent) echo ''. get_the_title() .'';
}
elseif ( is_tag() ) {
// tags archive
echo '' . esc_html($breadcrumb_post_tags).' "' . single_tag_title('', false) . '"' . '';
}
elseif ( is_author() ) {
// author archive
global $author;
$userdata = get_userdata($author);
echo '' . esc_html($breadcrumb_artitle_post_by). ' ' . $userdata->display_name . '';
}
elseif ( is_404() ) {
// 404
echo ''. esc_html($breadcrumb_404) .'';
}
if ( get_query_var('paged') ) {
if ( function_exists('is_shop') ) {
echo ''. esc_html($breadcrumb_page) . ' ' . get_query_var('paged') .'';
}
else {
if ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() ) echo ' (';
echo ''.esc_html($breadcrumb_page) . ' ' . get_query_var('paged').'';
if ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() ) echo ')';
}
}
}
}
/**
*
* pagination
*/
if( !function_exists('advkt_pagination') ) {
function _advkt_pagi_callback($home) {
return $home;
}
//page navegation
function advkt_pagination( $prev, $next, $pages, $args ) {
global $wp_query, $wp_rewrite;
$menu = '';
$wp_query->query_vars['paged'] > 1 ? $current = $wp_query->query_vars['paged'] : $current = 1;
if( $pages=='' ){
global $wp_query;
$pages = $wp_query->max_num_pages;
if(!$pages)
$pages = 1;
}
$pagination = array(
'base' => add_query_arg('paged','%#%'),
'format' => '',
'total' => $pages,
'current' => $current,
'prev_text' => $prev,
'next_text' => $next,
'type' => 'array'
);
//rewrite permalinks
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' ) );
$pagi = '';
if(paginate_links( $pagination )!=''){
$paginations = paginate_links( $pagination );
$pagi .= '';
foreach ($paginations as $key => $pg) {
$pagi.= '- '.$pg.'
';
}
$pagi .= '
';
}
echo _advkt_home_callback($pagi);
}
}
add_action('admin_print_scripts', 'advkt_scripts_for_admin_panel', 1000);
function advkt_scripts_for_admin_panel(){
if( get_post_type() == 'post' ) :
?>