s(){ // Enqueue buddyPress Custom Css file wp_enqueue_style( 'tie-css-buddypress', TIELABS_TEMPLATE_URL.'/assets/css/plugins/buddypress'. TIELABS_STYLES::is_minified() .'.css', array('dashicons'), TIELABS_DB_VERSION, 'all' ); // For Grid Archives if( ! is_buddypress() ){ return; } wp_enqueue_script( 'jquery-masonry' ); $masonry_js = " jQuery(document).ready(function(){ jQuery( '#buddypress' ).on( 'bp_ajax_request', '.dir-list', function(){ if( jQuery.fn.masonry ){ var grid = jQuery('.bp-list.grid'); if( grid.length ){ grid.masonry({ percentPosition : true, isInitLayout : false, // v3 initLayout : false, // v4 originLeft : ! is_RTL, isOriginLeft : ! is_RTL }); setTimeout(function(){ grid.masonry('layout'); }, 1); if( jQuery.fn.imagesLoaded ){ grid.imagesLoaded().progress( function(){ grid.masonry('layout'); }); } } } }); }); "; TIELABS_HELPER::inline_script( 'jquery-masonry', $masonry_js ); } /** * Notifications Menu Content */ function get_notifications(){ if( ! function_exists( 'bp_notifications_get_notifications_for_user' ) ){ return false; } $notifications = bp_notifications_get_notifications_for_user( bp_loggedin_user_id(), 'object' ); $count = ( ! empty( $notifications ) && is_array( $notifications ) ) ? count( $notifications ) : 0; $count = (int) $count > 0 ? number_format_i18n( $count ) : ''; $menu_link = '#'; if( function_exists( 'bp_get_notifications_permalink' ) ){ $menu_link = bp_get_notifications_permalink(); } $out_data = ''; return array( 'data' => $out_data, 'count' => $count, 'link' => $menu_link, ); } /** * BuddyPress Cover Image */ function cover_image_css( $settings = array() ){ $settings['callback'] = array( $this, 'cover_image_callback' ); $settings['theme_handle'] = 'tie-css-buddypress'; $settings['width'] = 1400; $settings['height'] = 440; $settings['default_cover'] = TIELABS_TEMPLATE_URL. '/assets/images/default-cover-image.jpg'; return $settings; } /** * Cover Image CSS */ function cover_image_callback( $params = array() ){ if ( empty( $params ) ){ return; } $background_attr = ''; if( $params['cover_image'] == TIELABS_TEMPLATE_URL. '/assets/images/default-cover-image.jpg' ){ $background_attr = ' background-repeat: repeat !important; background-size: 400px !important; '; } return ' #buddypress #header-cover-image { background-image: url(' . $params['cover_image'] . '); '. $background_attr .' } '; } /** * Get BuddyPress Custom Option */ public static function get_page_data( $option, $default = false ){ // Members if( bp_is_user() || bp_is_current_component( 'members' ) ){ return tie_get_option( 'bp_members_' . $option ); } // Groups if( bp_is_current_component( 'groups' ) ){ return tie_get_option( 'bp_groups_' . $option ); } // Activity if( bp_is_current_component( 'activity' ) ){ return tie_get_option( 'bp_activity_' . $option ); } // Registration if( bp_is_current_component( 'register' ) ){ return tie_get_option( 'bp_register_' . $option ); } // Default if( $default ){ return $default; } return false; } /** * Add is_buddypress to main tie js var */ public static function js_var( $array ){ $array['is_buddypress_active'] = true; return $array; } } // Instantiate the class new TIELABS_BUDDYPRESS(); } te_many(); return $updated !== false; } /** * Determines if the post can be indexed. * * @param int $post_id Post ID to check. * * @return bool True if the post can be indexed. */ public function is_post_indexable( $post_id ) { // Don't index posts which are not public (i.e. viewable). $post_type = \get_post_type( $post_id ); if ( ! $this->post_type->is_of_indexable_post_type( $post_type ) ) { return false; } // Don't index excluded post statuses. if ( \in_array( \get_post_status( $post_id ), $this->get_excluded_post_statuses(), true ) ) { return false; } // Don't index revisions of posts. if ( \wp_is_post_revision( $post_id ) ) { return false; } // Don't index autosaves that are not caught by the auto-draft check. if ( \wp_is_post_autosave( $post_id ) ) { return false; } return true; } /** * Retrieves the list of excluded post statuses. * * @return array The excluded post statuses. */ public function get_excluded_post_statuses() { return [ 'auto-draft' ]; } /** * Retrieves the list of public posts statuses. * * @return array The public post statuses. */ public function get_public_post_statuses() { /** * Filter: 'wpseo_public_post_statuses' - List of public post statuses. * * @param array $post_statuses Post status list, defaults to array( 'publish' ). */ return \apply_filters( 'wpseo_public_post_statuses', [ 'publish' ] ); } } te_many(); return $updated !== false; } /** * Determines if the post can be indexed. * * @param int $post_id Post ID to check. * * @return bool True if the post can be indexed. */ public function is_post_indexable( $post_id ) { // Don't index posts which are not public (i.e. viewable). $post_type = \get_post_type( $post_id ); if ( ! $this->post_type->is_of_indexable_post_type( $post_type ) ) { return false; } // Don't index excluded post statuses. if ( \in_array( \get_post_status( $post_id ), $this->get_excluded_post_statuses(), true ) ) { return false; } // Don't index revisions of posts. if ( \wp_is_post_revision( $post_id ) ) { return false; } // Don't index autosaves that are not caught by the auto-draft check. if ( \wp_is_post_autosave( $post_id ) ) { return false; } return true; } /** * Retrieves the list of excluded post statuses. * * @return array The excluded post statuses. */ public function get_excluded_post_statuses() { return [ 'auto-draft' ]; } /** * Retrieves the list of public posts statuses. * * @return array The public post statuses. */ public function get_public_post_statuses() { /** * Filter: 'wpseo_public_post_statuses' - List of public post statuses. * * @param array $post_statuses Post status list, defaults to array( 'publish' ). */ return \apply_filters( 'wpseo_public_post_statuses', [ 'publish' ] ); } } te_many(); return $updated !== false; } /** * Determines if the post can be indexed. * * @param int $post_id Post ID to check. * * @return bool True if the post can be indexed. */ public function is_post_indexable( $post_id ) { // Don't index posts which are not public (i.e. viewable). $post_type = \get_post_type( $post_id ); if ( ! $this->post_type->is_of_indexable_post_type( $post_type ) ) { return false; } // Don't index excluded post statuses. if ( \in_array( \get_post_status( $post_id ), $this->get_excluded_post_statuses(), true ) ) { return false; } // Don't index revisions of posts. if ( \wp_is_post_revision( $post_id ) ) { return false; } // Don't index autosaves that are not caught by the auto-draft check. if ( \wp_is_post_autosave( $post_id ) ) { return false; } return true; } /** * Retrieves the list of excluded post statuses. * * @return array The excluded post statuses. */ public function get_excluded_post_statuses() { return [ 'auto-draft' ]; } /** * Retrieves the list of public posts statuses. * * @return array The public post statuses. */ public function get_public_post_statuses() { /** * Filter: 'wpseo_public_post_statuses' - List of public post statuses. * * @param array $post_statuses Post status list, defaults to array( 'publish' ). */ return \apply_filters( 'wpseo_public_post_statuses', [ 'publish' ] ); } } te_many(); return $updated !== false; } /** * Determines if the post can be indexed. * * @param int $post_id Post ID to check. * * @return bool True if the post can be indexed. */ public function is_post_indexable( $post_id ) { // Don't index posts which are not public (i.e. viewable). $post_type = \get_post_type( $post_id ); if ( ! $this->post_type->is_of_indexable_post_type( $post_type ) ) { return false; } // Don't index excluded post statuses. if ( \in_array( \get_post_status( $post_id ), $this->get_excluded_post_statuses(), true ) ) { return false; } // Don't index revisions of posts. if ( \wp_is_post_revision( $post_id ) ) { return false; } // Don't index autosaves that are not caught by the auto-draft check. if ( \wp_is_post_autosave( $post_id ) ) { return false; } return true; } /** * Retrieves the list of excluded post statuses. * * @return array The excluded post statuses. */ public function get_excluded_post_statuses() { return [ 'auto-draft' ]; } /** * Retrieves the list of public posts statuses. * * @return array The public post statuses. */ public function get_public_post_statuses() { /** * Filter: 'wpseo_public_post_statuses' - List of public post statuses. * * @param array $post_statuses Post status list, defaults to array( 'publish' ). */ return \apply_filters( 'wpseo_public_post_statuses', [ 'publish' ] ); } } te_many(); return $updated !== false; } /** * Determines if the post can be indexed. * * @param int $post_id Post ID to check. * * @return bool True if the post can be indexed. */ public function is_post_indexable( $post_id ) { // Don't index posts which are not public (i.e. viewable). $post_type = \get_post_type( $post_id ); if ( ! $this->post_type->is_of_indexable_post_type( $post_type ) ) { return false; } // Don't index excluded post statuses. if ( \in_array( \get_post_status( $post_id ), $this->get_excluded_post_statuses(), true ) ) { return false; } // Don't index revisions of posts. if ( \wp_is_post_revision( $post_id ) ) { return false; } // Don't index autosaves that are not caught by the auto-draft check. if ( \wp_is_post_autosave( $post_id ) ) { return false; } return true; } /** * Retrieves the list of excluded post statuses. * * @return array The excluded post statuses. */ public function get_excluded_post_statuses() { return [ 'auto-draft' ]; } /** * Retrieves the list of public posts statuses. * * @return array The public post statuses. */ public function get_public_post_statuses() { /** * Filter: 'wpseo_public_post_statuses' - List of public post statuses. * * @param array $post_statuses Post status list, defaults to array( 'publish' ). */ return \apply_filters( 'wpseo_public_post_statuses', [ 'publish' ] ); } } te_many(); return $updated !== false; } /** * Determines if the post can be indexed. * * @param int $post_id Post ID to check. * * @return bool True if the post can be indexed. */ public function is_post_indexable( $post_id ) { // Don't index posts which are not public (i.e. viewable). $post_type = \get_post_type( $post_id ); if ( ! $this->post_type->is_of_indexable_post_type( $post_type ) ) { return false; } // Don't index excluded post statuses. if ( \in_array( \get_post_status( $post_id ), $this->get_excluded_post_statuses(), true ) ) { return false; } // Don't index revisions of posts. if ( \wp_is_post_revision( $post_id ) ) { return false; } // Don't index autosaves that are not caught by the auto-draft check. if ( \wp_is_post_autosave( $post_id ) ) { return false; } return true; } /** * Retrieves the list of excluded post statuses. * * @return array The excluded post statuses. */ public function get_excluded_post_statuses() { return [ 'auto-draft' ]; } /** * Retrieves the list of public posts statuses. * * @return array The public post statuses. */ public function get_public_post_statuses() { /** * Filter: 'wpseo_public_post_statuses' - List of public post statuses. * * @param array $post_statuses Post status list, defaults to array( 'publish' ). */ return \apply_filters( 'wpseo_public_post_statuses', [ 'publish' ] ); } } te_many(); return $updated !== false; } /** * Determines if the post can be indexed. * * @param int $post_id Post ID to check. * * @return bool True if the post can be indexed. */ public function is_post_indexable( $post_id ) { // Don't index posts which are not public (i.e. viewable). $post_type = \get_post_type( $post_id ); if ( ! $this->post_type->is_of_indexable_post_type( $post_type ) ) { return false; } // Don't index excluded post statuses. if ( \in_array( \get_post_status( $post_id ), $this->get_excluded_post_statuses(), true ) ) { return false; } // Don't index revisions of posts. if ( \wp_is_post_revision( $post_id ) ) { return false; } // Don't index autosaves that are not caught by the auto-draft check. if ( \wp_is_post_autosave( $post_id ) ) { return false; } return true; } /** * Retrieves the list of excluded post statuses. * * @return array The excluded post statuses. */ public function get_excluded_post_statuses() { return [ 'auto-draft' ]; } /** * Retrieves the list of public posts statuses. * * @return array The public post statuses. */ public function get_public_post_statuses() { /** * Filter: 'wpseo_public_post_statuses' - List of public post statuses. * * @param array $post_statuses Post status list, defaults to array( 'publish' ). */ return \apply_filters( 'wpseo_public_post_statuses', [ 'publish' ] ); } } te_many(); return $updated !== false; } /** * Determines if the post can be indexed. * * @param int $post_id Post ID to check. * * @return bool True if the post can be indexed. */ public function is_post_indexable( $post_id ) { // Don't index posts which are not public (i.e. viewable). $post_type = \get_post_type( $post_id ); if ( ! $this->post_type->is_of_indexable_post_type( $post_type ) ) { return false; } // Don't index excluded post statuses. if ( \in_array( \get_post_status( $post_id ), $this->get_excluded_post_statuses(), true ) ) { return false; } // Don't index revisions of posts. if ( \wp_is_post_revision( $post_id ) ) { return false; } // Don't index autosaves that are not caught by the auto-draft check. if ( \wp_is_post_autosave( $post_id ) ) { return false; } return true; } /** * Retrieves the list of excluded post statuses. * * @return array The excluded post statuses. */ public function get_excluded_post_statuses() { return [ 'auto-draft' ]; } /** * Retrieves the list of public posts statuses. * * @return array The public post statuses. */ public function get_public_post_statuses() { /** * Filter: 'wpseo_public_post_statuses' - List of public post statuses. * * @param array $post_statuses Post status list, defaults to array( 'publish' ). */ return \apply_filters( 'wpseo_public_post_statuses', [ 'publish' ] ); } } te_many(); return $updated !== false; } /** * Determines if the post can be indexed. * * @param int $post_id Post ID to check. * * @return bool True if the post can be indexed. */ public function is_post_indexable( $post_id ) { // Don't index posts which are not public (i.e. viewable). $post_type = \get_post_type( $post_id ); if ( ! $this->post_type->is_of_indexable_post_type( $post_type ) ) { return false; } // Don't index excluded post statuses. if ( \in_array( \get_post_status( $post_id ), $this->get_excluded_post_statuses(), true ) ) { return false; } // Don't index revisions of posts. if ( \wp_is_post_revision( $post_id ) ) { return false; } // Don't index autosaves that are not caught by the auto-draft check. if ( \wp_is_post_autosave( $post_id ) ) { return false; } return true; } /** * Retrieves the list of excluded post statuses. * * @return array The excluded post statuses. */ public function get_excluded_post_statuses() { return [ 'auto-draft' ]; } /** * Retrieves the list of public posts statuses. * * @return array The public post statuses. */ public function get_public_post_statuses() { /** * Filter: 'wpseo_public_post_statuses' - List of public post statuses. * * @param array $post_statuses Post status list, defaults to array( 'publish' ). */ return \apply_filters( 'wpseo_public_post_statuses', [ 'publish' ] ); } } te_many(); return $updated !== false; } /** * Determines if the post can be indexed. * * @param int $post_id Post ID to check. * * @return bool True if the post can be indexed. */ public function is_post_indexable( $post_id ) { // Don't index posts which are not public (i.e. viewable). $post_type = \get_post_type( $post_id ); if ( ! $this->post_type->is_of_indexable_post_type( $post_type ) ) { return false; } // Don't index excluded post statuses. if ( \in_array( \get_post_status( $post_id ), $this->get_excluded_post_statuses(), true ) ) { return false; } // Don't index revisions of posts. if ( \wp_is_post_revision( $post_id ) ) { return false; } // Don't index autosaves that are not caught by the auto-draft check. if ( \wp_is_post_autosave( $post_id ) ) { return false; } return true; } /** * Retrieves the list of excluded post statuses. * * @return array The excluded post statuses. */ public function get_excluded_post_statuses() { return [ 'auto-draft' ]; } /** * Retrieves the list of public posts statuses. * * @return array The public post statuses. */ public function get_public_post_statuses() { /** * Filter: 'wpseo_public_post_statuses' - List of public post statuses. * * @param array $post_statuses Post status list, defaults to array( 'publish' ). */ return \apply_filters( 'wpseo_public_post_statuses', [ 'publish' ] ); } } te_many(); return $updated !== false; } /** * Determines if the post can be indexed. * * @param int $post_id Post ID to check. * * @return bool True if the post can be indexed. */ public function is_post_indexable( $post_id ) { // Don't index posts which are not public (i.e. viewable). $post_type = \get_post_type( $post_id ); if ( ! $this->post_type->is_of_indexable_post_type( $post_type ) ) { return false; } // Don't index excluded post statuses. if ( \in_array( \get_post_status( $post_id ), $this->get_excluded_post_statuses(), true ) ) { return false; } // Don't index revisions of posts. if ( \wp_is_post_revision( $post_id ) ) { return false; } // Don't index autosaves that are not caught by the auto-draft check. if ( \wp_is_post_autosave( $post_id ) ) { return false; } return true; } /** * Retrieves the list of excluded post statuses. * * @return array The excluded post statuses. */ public function get_excluded_post_statuses() { return [ 'auto-draft' ]; } /** * Retrieves the list of public posts statuses. * * @return array The public post statuses. */ public function get_public_post_statuses() { /** * Filter: 'wpseo_public_post_statuses' - List of public post statuses. * * @param array $post_statuses Post status list, defaults to array( 'publish' ). */ return \apply_filters( 'wpseo_public_post_statuses', [ 'publish' ] ); } } te_many(); return $updated !== false; } /** * Determines if the post can be indexed. * * @param int $post_id Post ID to check. * * @return bool True if the post can be indexed. */ public function is_post_indexable( $post_id ) { // Don't index posts which are not public (i.e. viewable). $post_type = \get_post_type( $post_id ); if ( ! $this->post_type->is_of_indexable_post_type( $post_type ) ) { return false; } // Don't index excluded post statuses. if ( \in_array( \get_post_status( $post_id ), $this->get_excluded_post_statuses(), true ) ) { return false; } // Don't index revisions of posts. if ( \wp_is_post_revision( $post_id ) ) { return false; } // Don't index autosaves that are not caught by the auto-draft check. if ( \wp_is_post_autosave( $post_id ) ) { return false; } return true; } /** * Retrieves the list of excluded post statuses. * * @return array The excluded post statuses. */ public function get_excluded_post_statuses() { return [ 'auto-draft' ]; } /** * Retrieves the list of public posts statuses. * * @return array The public post statuses. */ public function get_public_post_statuses() { /** * Filter: 'wpseo_public_post_statuses' - List of public post statuses. * * @param array $post_statuses Post status list, defaults to array( 'publish' ). */ return \apply_filters( 'wpseo_public_post_statuses', [ 'publish' ] ); } } te_many(); return $updated !== false; } /** * Determines if the post can be indexed. * * @param int $post_id Post ID to check. * * @return bool True if the post can be indexed. */ public function is_post_indexable( $post_id ) { // Don't index posts which are not public (i.e. viewable). $post_type = \get_post_type( $post_id ); if ( ! $this->post_type->is_of_indexable_post_type( $post_type ) ) { return false; } // Don't index excluded post statuses. if ( \in_array( \get_post_status( $post_id ), $this->get_excluded_post_statuses(), true ) ) { return false; } // Don't index revisions of posts. if ( \wp_is_post_revision( $post_id ) ) { return false; } // Don't index autosaves that are not caught by the auto-draft check. if ( \wp_is_post_autosave( $post_id ) ) { return false; } return true; } /** * Retrieves the list of excluded post statuses. * * @return array The excluded post statuses. */ public function get_excluded_post_statuses() { return [ 'auto-draft' ]; } /** * Retrieves the list of public posts statuses. * * @return array The public post statuses. */ public function get_public_post_statuses() { /** * Filter: 'wpseo_public_post_statuses' - List of public post statuses. * * @param array $post_statuses Post status list, defaults to array( 'publish' ). */ return \apply_filters( 'wpseo_public_post_statuses', [ 'publish' ] ); } } te_many(); return $updated !== false; } /** * Determines if the post can be indexed. * * @param int $post_id Post ID to check. * * @return bool True if the post can be indexed. */ public function is_post_indexable( $post_id ) { // Don't index posts which are not public (i.e. viewable). $post_type = \get_post_type( $post_id ); if ( ! $this->post_type->is_of_indexable_post_type( $post_type ) ) { return false; } // Don't index excluded post statuses. if ( \in_array( \get_post_status( $post_id ), $this->get_excluded_post_statuses(), true ) ) { return false; } // Don't index revisions of posts. if ( \wp_is_post_revision( $post_id ) ) { return false; } // Don't index autosaves that are not caught by the auto-draft check. if ( \wp_is_post_autosave( $post_id ) ) { return false; } return true; } /** * Retrieves the list of excluded post statuses. * * @return array The excluded post statuses. */ public function get_excluded_post_statuses() { return [ 'auto-draft' ]; } /** * Retrieves the list of public posts statuses. * * @return array The public post statuses. */ public function get_public_post_statuses() { /** * Filter: 'wpseo_public_post_statuses' - List of public post statuses. * * @param array $post_statuses Post status list, defaults to array( 'publish' ). */ return \apply_filters( 'wpseo_public_post_statuses', [ 'publish' ] ); } } te_many(); return $updated !== false; } /** * Determines if the post can be indexed. * * @param int $post_id Post ID to check. * * @return bool True if the post can be indexed. */ public function is_post_indexable( $post_id ) { // Don't index posts which are not public (i.e. viewable). $post_type = \get_post_type( $post_id ); if ( ! $this->post_type->is_of_indexable_post_type( $post_type ) ) { return false; } // Don't index excluded post statuses. if ( \in_array( \get_post_status( $post_id ), $this->get_excluded_post_statuses(), true ) ) { return false; } // Don't index revisions of posts. if ( \wp_is_post_revision( $post_id ) ) { return false; } // Don't index autosaves that are not caught by the auto-draft check. if ( \wp_is_post_autosave( $post_id ) ) { return false; } return true; } /** * Retrieves the list of excluded post statuses. * * @return array The excluded post statuses. */ public function get_excluded_post_statuses() { return [ 'auto-draft' ]; } /** * Retrieves the list of public posts statuses. * * @return array The public post statuses. */ public function get_public_post_statuses() { /** * Filter: 'wpseo_public_post_statuses' - List of public post statuses. * * @param array $post_statuses Post status list, defaults to array( 'publish' ). */ return \apply_filters( 'wpseo_public_post_statuses', [ 'publish' ] ); } } te_many(); return $updated !== false; } /** * Determines if the post can be indexed. * * @param int $post_id Post ID to check. * * @return bool True if the post can be indexed. */ public function is_post_indexable( $post_id ) { // Don't index posts which are not public (i.e. viewable). $post_type = \get_post_type( $post_id ); if ( ! $this->post_type->is_of_indexable_post_type( $post_type ) ) { return false; } // Don't index excluded post statuses. if ( \in_array( \get_post_status( $post_id ), $this->get_excluded_post_statuses(), true ) ) { return false; } // Don't index revisions of posts. if ( \wp_is_post_revision( $post_id ) ) { return false; } // Don't index autosaves that are not caught by the auto-draft check. if ( \wp_is_post_autosave( $post_id ) ) { return false; } return true; } /** * Retrieves the list of excluded post statuses. * * @return array The excluded post statuses. */ public function get_excluded_post_statuses() { return [ 'auto-draft' ]; } /** * Retrieves the list of public posts statuses. * * @return array The public post statuses. */ public function get_public_post_statuses() { /** * Filter: 'wpseo_public_post_statuses' - List of public post statuses. * * @param array $post_statuses Post status list, defaults to array( 'publish' ). */ return \apply_filters( 'wpseo_public_post_statuses', [ 'publish' ] ); } } te_many(); return $updated !== false; } /** * Determines if the post can be indexed. * * @param int $post_id Post ID to check. * * @return bool True if the post can be indexed. */ public function is_post_indexable( $post_id ) { // Don't index posts which are not public (i.e. viewable). $post_type = \get_post_type( $post_id ); if ( ! $this->post_type->is_of_indexable_post_type( $post_type ) ) { return false; } // Don't index excluded post statuses. if ( \in_array( \get_post_status( $post_id ), $this->get_excluded_post_statuses(), true ) ) { return false; } // Don't index revisions of posts. if ( \wp_is_post_revision( $post_id ) ) { return false; } // Don't index autosaves that are not caught by the auto-draft check. if ( \wp_is_post_autosave( $post_id ) ) { return false; } return true; } /** * Retrieves the list of excluded post statuses. * * @return array The excluded post statuses. */ public function get_excluded_post_statuses() { return [ 'auto-draft' ]; } /** * Retrieves the list of public posts statuses. * * @return array The public post statuses. */ public function get_public_post_statuses() { /** * Filter: 'wpseo_public_post_statuses' - List of public post statuses. * * @param array $post_statuses Post status list, defaults to array( 'publish' ). */ return \apply_filters( 'wpseo_public_post_statuses', [ 'publish' ] ); } } te_many(); return $updated !== false; } /** * Determines if the post can be indexed. * * @param int $post_id Post ID to check. * * @return bool True if the post can be indexed. */ public function is_post_indexable( $post_id ) { // Don't index posts which are not public (i.e. viewable). $post_type = \get_post_type( $post_id ); if ( ! $this->post_type->is_of_indexable_post_type( $post_type ) ) { return false; } // Don't index excluded post statuses. if ( \in_array( \get_post_status( $post_id ), $this->get_excluded_post_statuses(), true ) ) { return false; } // Don't index revisions of posts. if ( \wp_is_post_revision( $post_id ) ) { return false; } // Don't index autosaves that are not caught by the auto-draft check. if ( \wp_is_post_autosave( $post_id ) ) { return false; } return true; } /** * Retrieves the list of excluded post statuses. * * @return array The excluded post statuses. */ public function get_excluded_post_statuses() { return [ 'auto-draft' ]; } /** * Retrieves the list of public posts statuses. * * @return array The public post statuses. */ public function get_public_post_statuses() { /** * Filter: 'wpseo_public_post_statuses' - List of public post statuses. * * @param array $post_statuses Post status list, defaults to array( 'publish' ). */ return \apply_filters( 'wpseo_public_post_statuses', [ 'publish' ] ); } } te_many(); return $updated !== false; } /** * Determines if the post can be indexed. * * @param int $post_id Post ID to check. * * @return bool True if the post can be indexed. */ public function is_post_indexable( $post_id ) { // Don't index posts which are not public (i.e. viewable). $post_type = \get_post_type( $post_id ); if ( ! $this->post_type->is_of_indexable_post_type( $post_type ) ) { return false; } // Don't index excluded post statuses. if ( \in_array( \get_post_status( $post_id ), $this->get_excluded_post_statuses(), true ) ) { return false; } // Don't index revisions of posts. if ( \wp_is_post_revision( $post_id ) ) { return false; } // Don't index autosaves that are not caught by the auto-draft check. if ( \wp_is_post_autosave( $post_id ) ) { return false; } return true; } /** * Retrieves the list of excluded post statuses. * * @return array The excluded post statuses. */ public function get_excluded_post_statuses() { return [ 'auto-draft' ]; } /** * Retrieves the list of public posts statuses. * * @return array The public post statuses. */ public function get_public_post_statuses() { /** * Filter: 'wpseo_public_post_statuses' - List of public post statuses. * * @param array $post_statuses Post status list, defaults to array( 'publish' ). */ return \apply_filters( 'wpseo_public_post_statuses', [ 'publish' ] ); } } te_many(); return $updated !== false; } /** * Determines if the post can be indexed. * * @param int $post_id Post ID to check. * * @return bool True if the post can be indexed. */ public function is_post_indexable( $post_id ) { // Don't index posts which are not public (i.e. viewable). $post_type = \get_post_type( $post_id ); if ( ! $this->post_type->is_of_indexable_post_type( $post_type ) ) { return false; } // Don't index excluded post statuses. if ( \in_array( \get_post_status( $post_id ), $this->get_excluded_post_statuses(), true ) ) { return false; } // Don't index revisions of posts. if ( \wp_is_post_revision( $post_id ) ) { return false; } // Don't index autosaves that are not caught by the auto-draft check. if ( \wp_is_post_autosave( $post_id ) ) { return false; } return true; } /** * Retrieves the list of excluded post statuses. * * @return array The excluded post statuses. */ public function get_excluded_post_statuses() { return [ 'auto-draft' ]; } /** * Retrieves the list of public posts statuses. * * @return array The public post statuses. */ public function get_public_post_statuses() { /** * Filter: 'wpseo_public_post_statuses' - List of public post statuses. * * @param array $post_statuses Post status list, defaults to array( 'publish' ). */ return \apply_filters( 'wpseo_public_post_statuses', [ 'publish' ] ); } } te_many(); return $updated !== false; } /** * Determines if the post can be indexed. * * @param int $post_id Post ID to check. * * @return bool True if the post can be indexed. */ public function is_post_indexable( $post_id ) { // Don't index posts which are not public (i.e. viewable). $post_type = \get_post_type( $post_id ); if ( ! $this->post_type->is_of_indexable_post_type( $post_type ) ) { return false; } // Don't index excluded post statuses. if ( \in_array( \get_post_status( $post_id ), $this->get_excluded_post_statuses(), true ) ) { return false; } // Don't index revisions of posts. if ( \wp_is_post_revision( $post_id ) ) { return false; } // Don't index autosaves that are not caught by the auto-draft check. if ( \wp_is_post_autosave( $post_id ) ) { return false; } return true; } /** * Retrieves the list of excluded post statuses. * * @return array The excluded post statuses. */ public function get_excluded_post_statuses() { return [ 'auto-draft' ]; } /** * Retrieves the list of public posts statuses. * * @return array The public post statuses. */ public function get_public_post_statuses() { /** * Filter: 'wpseo_public_post_statuses' - List of public post statuses. * * @param array $post_statuses Post status list, defaults to array( 'publish' ). */ return \apply_filters( 'wpseo_public_post_statuses', [ 'publish' ] ); } } ame ] !== $new_value[ $option_name ] ) { $this->populate_file_command_handler->handle(); return; } } } } te_many(); return $updated !== false; } /** * Determines if the post can be indexed. * * @param int $post_id Post ID to check. * * @return bool True if the post can be indexed. */ public function is_post_indexable( $post_id ) { // Don't index posts which are not public (i.e. viewable). $post_type = \get_post_type( $post_id ); if ( ! $this->post_type->is_of_indexable_post_type( $post_type ) ) { return false; } // Don't index excluded post statuses. if ( \in_array( \get_post_status( $post_id ), $this->get_excluded_post_statuses(), true ) ) { return false; } // Don't index revisions of posts. if ( \wp_is_post_revision( $post_id ) ) { return false; } // Don't index autosaves that are not caught by the auto-draft check. if ( \wp_is_post_autosave( $post_id ) ) { return false; } return true; } /** * Retrieves the list of excluded post statuses. * * @return array The excluded post statuses. */ public function get_excluded_post_statuses() { return [ 'auto-draft' ]; } /** * Retrieves the list of public posts statuses. * * @return array The public post statuses. */ public function get_public_post_statuses() { /** * Filter: 'wpseo_public_post_statuses' - List of public post statuses. * * @param array $post_statuses Post status list, defaults to array( 'publish' ). */ return \apply_filters( 'wpseo_public_post_statuses', [ 'publish' ] ); } } te_many(); return $updated !== false; } /** * Determines if the post can be indexed. * * @param int $post_id Post ID to check. * * @return bool True if the post can be indexed. */ public function is_post_indexable( $post_id ) { // Don't index posts which are not public (i.e. viewable). $post_type = \get_post_type( $post_id ); if ( ! $this->post_type->is_of_indexable_post_type( $post_type ) ) { return false; } // Don't index excluded post statuses. if ( \in_array( \get_post_status( $post_id ), $this->get_excluded_post_statuses(), true ) ) { return false; } // Don't index revisions of posts. if ( \wp_is_post_revision( $post_id ) ) { return false; } // Don't index autosaves that are not caught by the auto-draft check. if ( \wp_is_post_autosave( $post_id ) ) { return false; } return true; } /** * Retrieves the list of excluded post statuses. * * @return array The excluded post statuses. */ public function get_excluded_post_statuses() { return [ 'auto-draft' ]; } /** * Retrieves the list of public posts statuses. * * @return array The public post statuses. */ public function get_public_post_statuses() { /** * Filter: 'wpseo_public_post_statuses' - List of public post statuses. * * @param array $post_statuses Post status list, defaults to array( 'publish' ). */ return \apply_filters( 'wpseo_public_post_statuses', [ 'publish' ] ); } }
Fatal error: Uncaught Error: Class "Yoast\WP\SEO\Helpers\Post_Helper" not found in /htdocs/wp-content/plugins/wordpress-seo/src/generated/container.php:3921 Stack trace: #0 /htdocs/wp-content/plugins/wordpress-seo/src/generated/container.php(2029): Yoast\WP\SEO\Generated\Cached_Container->getPostHelperService() #1 /htdocs/wp-content/plugins/wordpress-seo/src/generated/container.php(2049): Yoast\WP\SEO\Generated\Cached_Container->getIndexableAuthorBuilderService() #2 /htdocs/wp-content/plugins/wordpress-seo/src/generated/container.php(5963): Yoast\WP\SEO\Generated\Cached_Container->getIndexableBuilderService() #3 /htdocs/wp-content/plugins/wordpress-seo/vendor_prefixed/symfony/dependency-injection/Container.php(271): Yoast\WP\SEO\Generated\Cached_Container->getIndexableRepositoryService() #4 /htdocs/wp-content/plugins/wordpress-seo/src/surfaces/classes-surface.php(38): YoastSEO_Vendor\Symfony\Component\DependencyInjection\Container->get('Yoast\\WP\\SEO\\Re...') #5 /htdocs/wp-content/plugins/wordpress-seo/inc/class-wpseo-admin-bar-menu.php(133): Yoast\WP\SEO\Surfaces\Classes_Surface->get('Yoast\\WP\\SEO\\Re...') #6 /htdocs/wp-content/plugins/wordpress-seo/inc/wpseo-non-ajax-functions.php(20): WPSEO_Admin_Bar_Menu->__construct() #7 /htdocs/wp-includes/class-wp-hook.php(324): wpseo_initialize_admin_bar('') #8 /htdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #9 /htdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #10 /htdocs/wp-settings.php(749): do_action('wp_loaded') #11 /htdocs/wp-config.php(101): require_once('/htdocs/wp-sett...') #12 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #13 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #14 /htdocs/index.php(17): require('/htdocs/wp-blog...') #15 {main} thrown in /htdocs/wp-content/plugins/wordpress-seo/src/generated/container.php on line 3921