| Server IP : 213.186.33.4 / Your IP : 216.73.216.222 Web Server : Apache System : Linux webm005.cluster103.gra.hosting.ovh.net 6.18.39-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Tue Jul 21 12:03:15 CEST 2026 x86_64 User : karinebmkh ( 644538) PHP Version : 8.4.22 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/karinebmkh/www/wp-content/themes/Divi/includes/builder/plugin-compat/ |
Upload File : |
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
/**
* Plugin compatibility for WP Job Manager.
*
* @since 4.0.10
*
* @link https://wordpress.org/plugins/wp-job-manager/
*/
class ET_Builder_Plugin_Compat_WPJobManager extends ET_Builder_Plugin_Compat_Base {
/**
* Constructor.
*
* @since 4.0.10
*/
public function __construct() {
$this->plugin_id = 'wp-job-manager/wp-job-manager.php';
$this->init_hooks();
}
/**
* Hook methods to WordPress.
* Latest plugin version: 1.33.3
*
* @since 4.0.10
*
* @return void
*/
public function init_hooks() {
// Bail if there's no version found
if ( ! $this->get_plugin_version() ) {
return;
}
add_filter( 'option_job_manager_hide_expired_content', array( $this, 'never_hide_content_in_builder' ) );
add_filter( 'wpjm_the_job_description', array( $this, 'maybe_call_the_content' ) );
}
/**
* Always show the content even for expired jobs when editing in the builder.
*
* @since 4.0.10
*
* @param mixed $hide
*
* @return boolean
*/
public function never_hide_content_in_builder( $hide ) {
if ( et_core_is_fb_enabled() ) {
return false;
}
return $hide;
}
/**
* Maybe trigger the_content() instead of returning the description as the plugin
* does not call the_content().
* Do this only if the builder is used for the current post.
*
* @since 4.0.10
*
* @param string $content
*
* @return string
*/
public function maybe_call_the_content( $content ) {
static $output = false;
if ( ! $output && et_core_is_builder_used_on_current_request() ) {
if ( doing_action( 'wp_footer' ) ) {
// Do not use the full content when outputting structured data.
return truncate_post( apply_filters( 'excerpt_length', 55 ), false );
}
$output = true;
the_content();
return '';
}
return $content;
}
}
new ET_Builder_Plugin_Compat_WPJobManager();