$type, 'container' => 'posts_content', 'render' => array( $this, 'infinite_scroll_render' ), ) ); if ( class_exists( 'The_Neverending_Home_Page' ) ) { add_filter( 'boozurk_option_boozurk_infinite_scroll' , '__return_false' ); add_filter( 'infinite_scroll_results' , array( $this, 'infinite_scroll_encode' ), 11, 1 ); } //Carousel if ( class_exists( 'Jetpack_Carousel' ) ) { remove_filter( 'post_gallery' , 'boozurk_gallery_shortcode', 10, 2 ); add_filter( 'boozurk_option_boozurk_js_thickbox' , '__return_false' ); } } //print the "likes" button after post content function likes() { echo '
' . apply_filters('boozurk_filter_likes','') . '
'; } //Set the code to be rendered on for calling posts, function infinite_scroll_render() { if ( isset( $_GET['page'] ) && $page = (int) $_GET['page'] ) echo '
' . sprintf( __('Page %s','boozurk'), $page ) . '
'; get_template_part( 'loop' ); } //encodes html result to UTF8 (jetpack bug?) //http://localhost/wordpress/?infinity=scrolling&action=infinite_scroll&page=5&order=DESC function infinite_scroll_encode( $results ) { $results['html'] = utf8_encode( utf8_decode( $results['html'] ) ); return $results; } //print the sharedaddy buttons after post content function sharedaddy_display() { echo sharing_display(); } } new Boozurk_For_Jetpack; /** * Functions and hooks for bbPress integration */ class Boozurk_For_Bbpress { function __construct() { add_filter( 'bbp_after_get_user_subscribe_link_parse_args' , array( $this, 'user_subscribe_link' ) ); add_filter( 'bbp_after_get_user_favorites_link_parse_args' , array( $this, 'user_favorites_link' ) ); add_filter( 'boozurk_cooltips_selector' , array( $this, 'user_navigation_tips' ) ); add_filter( 'boozurk_options_array' , array( $this, 'extra_options' ), 10, 1 ); add_action( 'wp_head', array( $this, 'init' ), 999 ); add_action( 'wp_enqueue_scripts' , array( $this, 'custom_stylesheet' ), 99 ); add_action( 'wp_head' , array( $this, 'dinamic_style' ) ); } /** * Filters and hooks initialization */ function init() { if ( ! ( function_exists( 'is_bbpress' ) && is_bbpress() ) ) return; add_filter( 'boozurk_filter_breadcrumb' , array( $this, 'bbpress_breadcrumb' ) ); remove_action( 'boozurk_hook_entry_before' , 'boozurk_print_details' ); remove_action( 'boozurk_hook_entry_before' , 'boozurk_single_nav' ); add_filter( 'boozurk_featured_title_text' , array( $this, 'show_title' ) ); add_filter( 'boozurk_navbuttons' , array( $this, 'navbuttons' ) ); add_filter( 'boozurk_extrainfo' , array( $this, 'extrainfo' ) ); add_filter( 'boozurk_skip_post_widgets_area' , '__return_true' ); } function custom_stylesheet() { wp_enqueue_style( 'boozurk-for-bbpress', get_template_directory_uri() . '/css/bbpress-custom.css', false, boozurk_get_info( 'version' ), 'screen' ); } function dinamic_style(){ ?> '
', 'after' => '
', 'sep' => ' ', 'home_text' => '', ); if ( bbp_is_user_home() ) $args['current_text'] = bbp_get_displayed_user_field( 'display_name' ); return $breadcrumb = bbp_get_breadcrumb( $args ); } /** * Filter extra infos */ function extrainfo( $args ) { $args['comments'] = 0; $args['plusone'] = 0; return $args; } function extra_options( $coa ) { $coa['boozurk_hide_bbpress_title'] = array( 'group' => 'content', 'type' => 'chk', 'default' => 0, 'description' => __( 'in bbPress', 'boozurk' ), 'info' => '', 'req' => '', 'sub' => false ); $coa['boozurk_hide_titles']['sub'][] = 'boozurk_hide_bbpress_title'; return $coa; } function user_subscribe_link( $args ) { $args['subscribe'] = ''; $args['unsubscribe'] = ''; $args['before'] = ''; return $args; } function user_favorites_link( $args ) { $args['favorite'] = ''; $args['favorited'] = ''; return $args; } function user_navigation_tips( $selectors ) { $selectors[] = '#bbp-user-navigation a'; return $selectors; } function show_title( $title ) { if ( boozurk_get_opt( 'boozurk_hide_bbpress_title' ) ) $title = ''; return $title; } function navbuttons( $buttons ) { foreach ( array( 'comment', 'feed', 'trackback', 'next_prev' ) as $hidden ) { $buttons[$hidden] = 0; } return $buttons; } } new Boozurk_For_Bbpress; /** * Functions and hooks for BuddyPress integration */ class Boozurk_For_BuddyPress { function __construct() { if ( ! function_exists( 'is_buddypress' ) ) return; add_action( 'wp_head' , array( $this, 'init' ), 999 ); add_action( 'wp_enqueue_scripts' , array( $this, 'custom_stylesheet' ), 99 ); add_action( 'wp_head' , array( $this, 'dinamic_style' ) ); add_filter( 'boozurk_options_array' , array( $this, 'extra_options' ), 10, 1 ); } /** * Filters and hooks initialization */ function init() { if ( ! is_buddypress() ) return; add_filter( 'boozurk_option_boozurk_I_like_it' , '__return_false' ); add_filter( 'boozurk_option_boozurk_hide_frontpage_title' , '__return_false' ); add_filter( 'boozurk_skip_post_widgets_area' , '__return_true' ); add_filter( 'boozurk_featured_title_text' , array( $this, 'show_title' ) ); add_filter( 'boozurk_navbuttons' , array( $this, 'navbuttons' ) ); add_filter( 'boozurk_extrainfo' , array( $this, 'extrainfo' ) ); } function custom_stylesheet() { wp_enqueue_style( 'boozurk-for-buddypress', get_template_directory_uri() . '/css/buddypress-custom.css', false, boozurk_get_info( 'version' ), 'screen' ); } function dinamic_style(){ ?> 'content', 'type' => 'chk', 'default' => 0, 'description' => __( 'in BuddyPress', 'boozurk' ), 'info' => '', 'req' => '', 'sub' => false ); $coa['boozurk_hide_titles']['sub'][] = 'boozurk_hide_buddypress_title'; return $coa; } function show_title( $title ) { if ( boozurk_get_opt( 'boozurk_hide_buddypress_title' ) ) $title = ''; return $title; } function navbuttons( $buttons ) { foreach ( array( 'comment', 'feed', 'trackback', 'next_prev' ) as $hidden ) { $buttons[$hidden] = 0; } return $buttons; } /** * Filter extra infos */ function extrainfo( $args ) { $args['comments'] = 0; $args['plusone'] = 0; return $args; } } new Boozurk_For_BuddyPress;