SILENT KILLERPanel

Current Path: > home > codekrsu > > ameliagraphics.com > wp-content > plugins > > jetpack > src


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: /home/codekrsu//ameliagraphics.com/wp-content/plugins//jetpack/src

NameTypeSizeLast ModifiedActions
class-deprecate.php File 7053 bytes November 12 2024 03:13:18.
class-jetpack-crm-data.php File 2405 bytes April 16 2024 00:40:26.
class-jetpack-modules-overrides.php File 3681 bytes April 26 2023 01:22:16.
class-tracking.php File 7159 bytes September 16 2024 19:58:12.

Reading File: /home/codekrsu//ameliagraphics.com/wp-content/plugins//jetpack/src/class-jetpack-crm-data.php

<?php
/**
 * Compatibility functions for the Jetpack CRM plugin.
 *
 * @since 9.0.0
 *
 * @package automattic/jetpack
 */

namespace Automattic\Jetpack;

use WP_Error;

/**
 * Provides Jetpack CRM plugin data.
 */
class Jetpack_CRM_Data {

	const JETPACK_CRM_PLUGIN_SLUG = 'zero-bs-crm/ZeroBSCRM.php';

	/**
	 * Provides Jetpack CRM plugin data for use in the Contact Form block sidebar menu.
	 *
	 * @return array An array containing the Jetpack CRM plugin data.
	 */
	public function get_crm_data() {
		$plugins = Plugins_Installer::get_plugins();

		// Set default values.
		$response = array(
			'crm_installed'          => false,
			'crm_active'             => false,
			'crm_version'            => null,
			'jp_form_ext_enabled'    => null,
			'can_install_crm'        => false,
			'can_activate_crm'       => false,
			'can_activate_extension' => false,
		);

		if ( isset( $plugins[ self::JETPACK_CRM_PLUGIN_SLUG ] ) ) {
			$response['crm_installed'] = true;

			$crm_data = $plugins[ self::JETPACK_CRM_PLUGIN_SLUG ];

			$response['crm_active']  = $crm_data['active'];
			$response['crm_version'] = $crm_data['Version'];

			if ( $response['crm_active'] ) {
				if ( function_exists( 'zeroBSCRM_isExtensionInstalled' ) ) {
					$response['jp_form_ext_enabled'] = zeroBSCRM_isExtensionInstalled( 'jetpackforms' );
				}
			}
		}

		$response['can_install_crm']  = $response['crm_installed'] ? false : current_user_can( 'install_plugins' );
		$response['can_activate_crm'] = $response['crm_active'] ? false : current_user_can( 'activate_plugins' );

		if ( $response['crm_active'] && function_exists( 'zeroBSCRM_extension_install_jetpackforms' ) ) {
			// phpcs:ignore WordPress.WP.Capabilities.Unknown
			$response['can_activate_extension'] = current_user_can( 'admin_zerobs_manage_options' );
		}

		return $response;
	}

	/**
	 * Activates Jetpack CRM's Jetpack Forms extension. This is used by a button in the Jetpack Contact Form
	 * sidebar menu.
	 *
	 * @return true|WP_Error Returns true if activation is success, else returns a WP_Error object.
	 */
	public function activate_crm_jetpackforms_extension() {
		if ( function_exists( 'zeroBSCRM_extension_install_jetpackforms' ) ) {
			return zeroBSCRM_extension_install_jetpackforms();
		}

		return new WP_Error( 'jp_forms_extension_activation_failed', esc_html__( 'The Jetpack Forms extension could not be activated.', 'jetpack' ) );
	}
}

SILENT KILLER Tool