%2$s
'; }, 10, 2 ); function be_load_more_js() { if( ! is_singular( 'post' ) ) return; $query = array( 'post__not_in' => array( get_queried_object_id() ), 'category_name' => ea_first_term( 'category', 'slug' ), 'posts_per_page' => 3 ); $args = array( 'url' => admin_url( 'admin-ajax.php' ), 'query' => $query, ); wp_enqueue_script( 'be-load-more', get_stylesheet_directory_uri() . '/js/load-more.js', array( 'jquery' ), '1.0', true ); wp_localize_script( 'be-load-more', 'beloadmore', $args ); } add_action( 'wp_enqueue_scripts', 'be_load_more_js' ); /** * AJAX Load More * */ function be_ajax_load_more() { $args = isset( $_POST['query'] ) ? array_map( 'esc_attr', $_POST['query'] ) : array(); $args['post_type'] = isset( $args['post_type'] ) ? esc_attr( $args['post_type'] ) : 'post'; $args['paged'] = esc_attr( $_POST['page'] ); $args['post_status'] = 'publish'; ob_start(); $loop = new WP_Query( $args ); if( $loop->have_posts() ): while( $loop->have_posts() ): $loop->the_post(); be_post_summary(); endwhile; endif; wp_reset_postdata(); $data = ob_get_clean(); wp_send_json_success( $data ); wp_die(); } add_action( 'wp_ajax_be_ajax_load_more', 'be_ajax_load_more' ); add_action( 'wp_ajax_nopriv_be_ajax_load_more', 'be_ajax_load_more' ); /** * First Term * Helper Function */ function ea_first_term( $taxonomy, $field ) { $terms = get_the_terms( get_the_ID(), $taxonomy ); if( empty( $terms ) || is_wp_error( $terms ) ) return false; // If there's only one term, use that if( 1 == count( $terms ) ) { $term = array_shift( $terms ); } else { $term = array_shift( $terms ); } // Output if( $field && isset( $term->$field ) ) return $term->$field; else return $term; } add_image_size( 'category-grid-thumb', 555, 285, true ); // 555 pixels wide (and 285 height) add_image_size( 'category-first-project-thumb', 570, 545, true ); // 570 pixels wide (and 545 height) add_image_size( 'page-home-blog-thumb', 640, 522, true ); // 640 pixels wide (and 522 height) add_image_size( 'project-icon', 1140, 520 ); // 1140 pixels wide (and 520 height) add_image_size( 'project-banner', 1920, 9999 ); // 1920 pixels wide (and unlimit height) add_image_size( 'collage-big-box', 555, 400, true ); // 1920 pixels wide (and unlimit height) add_image_size( 'real-big-box', 500, 300, true ); // 1920 pixels wide (and unlimit height) add_image_size( 'real-big-box-2', 730, 500, true ); // add_image_size( 'collage-small-box', 263, 185, true ); // 1920 pixels wide (and unlimit height) add_theme_support( 'post-mini' ); add_theme_support( 'author-mini' ); add_theme_support( 'author-big' ); add_image_size('post-mini', 271, 256, true); add_image_size('author-mini', 55, 55, true); add_image_size('author-big', 130, 130, true); add_theme_support( 'post-thumbnails' ); add_theme_support( 'produkt-thumb' ); add_theme_support( 'gal-thumb' ); add_theme_support( 'about-thumb' ); add_image_size('produkt-thumb', 371, 175, true); add_image_size('about-thumb', 371, 123, true); add_image_size('news-thumb', 371, 250, true); add_image_size('gal-thumb', 350, 350, true); if (function_exists('register_sidebar')){ register_sidebar(array( 'name' => 'Boczny boks', 'id' => 'boczny_boks', 'before_widget' => '', 'after_widget' => '', 'before_title' => '

', 'after_title' => '

', )); } function redirect_to_home( $query ){ if(is_date() ) { wp_redirect( home_url(), 301 ); exit; } } add_action( 'parse_query', 'redirect_to_home' ); add_filter('post_gallery', 'my_post_gallery', 10, 2); function my_post_gallery($output, $attr) { global $post; if (isset($attr['orderby'])) { $attr['orderby'] = sanitize_sql_orderby($attr['orderby']); if (!$attr['orderby']) unset($attr['orderby']); } extract(shortcode_atts(array( 'order' => 'ASC', 'orderby' => 'menu_order ID', 'id' => $post->ID, 'itemtag' => 'dl', 'icontag' => 'dt', 'captiontag' => 'dd', 'columns' => 3, 'size' => 'thumbnail', 'include' => '', 'exclude' => '' ), $attr)); $id = intval($id); if ('RAND' == $order) $orderby = 'none'; if (!empty($include)) { $include = preg_replace('/[^0-9,]+/', '', $include); $_attachments = get_posts(array('include' => $include, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby)); $attachments = array(); foreach ($_attachments as $key => $val) { $attachments[$val->ID] = $_attachments[$key]; } } if (empty($attachments)) return ''; $captiontag = tag_escape($captiontag); $output .= "
"; foreach ($attachments as $id => $attachment) { $img2 = wp_get_attachment_image_src($id, 'large'); $img = wp_get_attachment_image_src($id, 'produkt_thumb'); $output .= '
'; $output .= ""; $output .= "
\n"; } $output .= "
\n"; return $output; } function wpdocs_custom_excerpt_length( $length ) { return 10; } add_filter( 'excerpt_length', 'wpdocs_custom_excerpt_length', 200 ); function change_submenu_class($menu) { $menu = preg_replace('/ class="sub-menu"/','/ class="dropdown" /',$menu); return $menu; } add_filter('wp_nav_menu','change_submenu_class'); function is_child($pageID) { global $post; if( is_page() && ($post->post_parent==$pageID) ) { return true; } else { return false; } } add_action( 'init', 'register_my_menus' ); function register_my_menus() { register_nav_menus( array( 'menu_glowne' => __( 'Menu główne' ), 'menu_glowne_prawe' => __( 'Menu główne prawe' ), 'menu_dolne' => __( 'Menu dolne' ), ) ); } function my_wp_nav_menu_args( $args = '' ) { $args['container'] = false; return $args; } add_filter( 'wp_nav_menu_args', 'my_wp_nav_menu_args' ); function wp_nav_menu_no_ul() { $options = array( 'echo' => false, 'container' => false, 'theme_location' => 'primary', 'fallback_cb'=> 'fall_back_menu' ); $menu = wp_nav_menu($options); echo preg_replace(array( '#^]*>#', '#$#' ), '', $menu); } function fall_back_menu(){ return; } function wpb_set_post_views($postID) { $count_key = 'wpb_post_views_count'; $count = get_post_meta($postID, $count_key, true); if($count==''){ $count = 0; delete_post_meta($postID, $count_key); add_post_meta($postID, $count_key, '0'); }else{ $count++; update_post_meta($postID, $count_key, $count); } } //To keep the count accurate, lets get rid of prefetching remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0); function wpb_track_post_views ($post_id) { if ( !is_single() ) return; if ( empty ( $post_id) ) { global $post; $post_id = $post->ID; } wpb_set_post_views($post_id); } add_action( 'wp_head', 'wpb_track_post_views'); ?>{"id":400,"date":"2025-01-08T14:12:18","date_gmt":"2025-01-08T13:12:18","guid":{"rendered":"https:\/\/cal.cusmyslenice.pl\/?page_id=400"},"modified":"2025-01-08T14:12:18","modified_gmt":"2025-01-08T13:12:18","slug":"spotkanie-noworoczne","status":"publish","type":"page","link":"https:\/\/cal.cusmyslenice.pl\/wolontariat\/spotkanie-noworoczne","title":{"rendered":"Spotkanie noworoczne"},"content":{"rendered":"\n

17 stycznia o godzinie 18:00 spotykamy si\u0119 w Centrum Aktywno\u015bci Lokalnej (Rynek 27) w sali warsztatowej na pierwszym pi\u0119trze. To doskona\u0142a okazja, aby podsumowa\u0107 nasze dzia\u0142ania, porozmawia\u0107 o planach na przysz\u0142o\u015b\u0107 i sp\u0119dzi\u0107 czas w mi\u0142ym gronie!<\/p>\n\n\n\n

Zapraszamy naszych wolontariuszy oraz osoby, kt\u00f3re pragn\u0105 zosta\u0107 wolontariuszami. <\/p>\n\n\n

\n
\"\"<\/figure><\/div>","protected":false},"excerpt":{"rendered":"

17 stycznia o godzinie 18:00 spotykamy si\u0119 w Centrum Aktywno\u015bci Lokalnej (Rynek 27) w sali warsztatowej na pierwszym pi\u0119trze. To doskona\u0142a okazja, aby podsumowa\u0107 nasze dzia\u0142ania, porozmawia\u0107 o planach na przysz\u0142o\u015b\u0107 i sp\u0119dzi\u0107 czas w mi\u0142ym gronie! Zapraszamy naszych wolontariuszy oraz osoby, kt\u00f3re pragn\u0105 zosta\u0107 wolontariuszami.<\/p>\n","protected":false},"author":3,"featured_media":0,"parent":7,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-400","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/cal.cusmyslenice.pl\/wp-json\/wp\/v2\/pages\/400","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cal.cusmyslenice.pl\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/cal.cusmyslenice.pl\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/cal.cusmyslenice.pl\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/cal.cusmyslenice.pl\/wp-json\/wp\/v2\/comments?post=400"}],"version-history":[{"count":1,"href":"https:\/\/cal.cusmyslenice.pl\/wp-json\/wp\/v2\/pages\/400\/revisions"}],"predecessor-version":[{"id":402,"href":"https:\/\/cal.cusmyslenice.pl\/wp-json\/wp\/v2\/pages\/400\/revisions\/402"}],"up":[{"embeddable":true,"href":"https:\/\/cal.cusmyslenice.pl\/wp-json\/wp\/v2\/pages\/7"}],"wp:attachment":[{"href":"https:\/\/cal.cusmyslenice.pl\/wp-json\/wp\/v2\/media?parent=400"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}