Done !
| Server IP : 46.105.57.169 / Your IP : 216.73.216.67 Web Server : Apache System : Linux webm002.cluster120.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64 User : verseaumee ( 152031) PHP Version : 8.5.7 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/verseaumee/blueversion/wp-content/plugins/wp-freeio/includes/3rd-party/ |
Upload File : |
<?php
/**
* Yoast
*
* @package wp-job-board
* @author Habq
* @license GNU General Public License, version 3
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
class WP_Freeio_Yoast {
public static function init() {
add_action( 'wpseo_sitemap_entry', array(__CLASS__, 'skip_filled_job_listings'), 10, 3 );
}
public static function skip_filled_job_listings($url, $type, $post) {
if ( 'job_listing' !== $post->post_type && 'freelancer' !== $post->post_type ) {
return $url;
}
if ( $post->post_type == 'job_listing' ) {
if ( $post->post_status == 'expired' || WP_Freeio_Job_Listing::is_filled( $post->ID ) ) {
return false;
}
} elseif ( $post->post_type == 'freelancer' ) {
$meta_obj = WP_Freeio_Freelancer_Meta::get_instance($post->ID);
if ( $post->post_status == 'expired' || ($meta_obj->check_post_meta_exist('show_profile') && $meta_obj->get_post_meta('show_profile') == 'hide') ) {
return false;
}
} elseif ( $post->post_type == 'employer' ) {
$meta_obj = WP_Freeio_Employer_Meta::get_instance($post->ID);
if ( $post->post_status == 'expired' || ($meta_obj->check_post_meta_exist('show_profile') && $meta_obj->get_post_meta('show_profile') == 'hide') ) {
return false;
}
}
return $url;
}
}
WP_Freeio_Yoast::init();