Dre4m Shell
Server IP : 85.214.239.14  /  Your IP : 3.145.72.55
Web Server : Apache/2.4.62 (Debian)
System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.18
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/wordpress/wp-content/themes/Divi/includes/builder/plugin-compat/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /var/www/wordpress/wp-content/themes/Divi/includes/builder/plugin-compat/wp-job-manager.php
<?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();

Anon7 - 2022
AnonSec Team