HEX
Server: Apache
System: Linux srv-plesk28.ps.kz 5.14.0-284.18.1.el9_2.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jun 29 17:06:27 EDT 2023 x86_64
User: greencl1 (10085)
PHP: 8.1.33
Disabled: apache_setenv,dl,eval,exec,openlog,passthru,pcntl_exec,pcntl_fork,popen,posix_getpwuid,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,socket_create,socket_create_listen,socket_create_pair,syslog,system,socket_listen,stream_socket_server
Upload Files
File: /var/www/vhosts/greenclinic.kz/httpdocs/wp-content/plugins/acf-repeater/acf-repeater.php
<?php
/*
Plugin Name: Advanced Custom Fields: Repeater Field
Plugin Slug: acf-repeater
Plugin URI: http://www.advancedcustomfields.com/
Description: This premium Add-on adds a repeater field type for the Advanced Custom Fields plugin
Version: 2.1.0
Author: Elliot Condon
Author URI: http://www.elliotcondon.com/
License: GPL
Copyright: Elliot Condon
*/

if( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

if( !class_exists('acf_plugin_repeater') ):

class acf_plugin_repeater {
	
	// vars
	var $settings;
	
	
	/*
	*  __construct
	*
	*  This function will setup the class functionality
	*
	*  @type	function
	*  @date	5/03/2014
	*  @since	5.0.0
	*
	*  @param	n/a
	*  @return	n/a
	*/
	
	function __construct() {
		
		// vars
		$this->settings = array(
			
			// basic
			'name'				=> __('Advanced Custom Fields: Repeater Field', 'acf'),
			'version'			=> '2.1.0',
						
			// urls
			'slug'				=> dirname(plugin_basename( __FILE__ )),
			'basename'			=> plugin_basename( __FILE__ ),
			'path'				=> plugin_dir_path( __FILE__ ),
			'dir'				=> plugin_dir_url( __FILE__ ),
			
		);
		
		// include v5 field
		add_action('acf/include_field_types', array($this, 'include_field_types'));
		
		// include v4 field
		add_action('acf/register_fields', array($this, 'include_field_types'));
		
		// include updates
		if( is_admin() ) {
			$this->include_file('acf-repeater-update.php');
		}
		
	}
	
	
	/*
	*  include_file
	*
	*  This function will check if a file exists before including it
	*
	*  @type	function
	*  @date	22/2/17
	*  @since	5.5.8
	*
	*  @param	$file (string)
	*  @return	n/a
	*/
	
	function include_file( $file = '' ) {
		$file = dirname(__FILE__) . '/'. $file;
		if( file_exists($file) ) include_once( $file );
	}
	
	
	/*
	*  include_field_types
	*
	*  This function will include the v5 field type
	*
	*  @type	function
	*  @date	12/06/2015
	*  @since	5.2.3
	*
	*  @param	n/a
	*  @return	n/a
	*/
	
	function include_field_types() {
		
		// vars
		$version = '';
		
		// version 5
		if( defined('ACF_VERSION') ) {
			
			// version 5.7+
			if( version_compare(ACF_VERSION, '5.7.0', '>=') ) {
				$version = '5-7';
			
			//  version 5.0
			} else {
				$version = '5-0';
			}
		
		// version 4
		} else {
			$version = '4-0';
		}
		
		// include
		$this->include_file( "includes/$version/acf-repeater-field.php" );
	}
}


// globals
global $acf_plugin_repeater;


// instantiate
$acf_plugin_repeater = new acf_plugin_repeater();


// end class
endif;

?>