@param mixed $post_fields

@return FluentCurl
165604
public function setPostFields(array $post_fields, bool $shouldEncode = true)
    {
        $this->post_fields = $post_fields;
        curl_setopt($this->connection, CURLOPT_POSTFIELDS, $shouldEncode ? json_encode($post_fields) : $post_fields);

        return $this;
    }
1042432
public function useCurl($link, $postFields, $httpHeader = false)
	{
		$curl=curl_init(); #Сохраняем дескриптор сеанса cURL
		#Устанавливаем необходимые опции для сеанса cURL
		curl_setopt($curl,CURLOPT_RETURNTRANSFER,true);
		curl_setopt($curl,CURLOPT_USERAGENT,'amoCRM-API-client/1.0');
		curl_setopt($curl,CURLOPT_URL,$link);
		if($postFields != false){
			curl_setopt($curl,CURLOPT_CUSTOMREQUEST,'POST');
			curl_setopt($curl,CURLOPT_POSTFIELDS, $postFields);
		}
		if ($httpHeader) {
			curl_setopt($curl,CURLOPT_HTTPHEADER,array('Content-Type: application/json'));
		}
		curl_setopt($curl,CURLOPT_HEADER,false);
		curl_setopt($curl,CURLOPT_COOKIEFILE,dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'cookie.ini'); #PHP>5.3.6 dirname(__FILE__) -> __DIR__
		curl_setopt($curl,CURLOPT_COOKIEJAR,dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'cookie.ini'); #PHP>5.3.6 dirname(__FILE__) -> __DIR__
		curl_setopt($curl,CURLOPT_SSL_VERIFYPEER,0);
		curl_setopt($curl,CURLOPT_SSL_VERIFYHOST,0);

		$out=curl_exec($curl); #Инициируем запрос к API и сохраняем ответ в переменную
		$code=curl_getinfo($curl,CURLINFO_HTTP_CODE);
		curl_close($curl); #Заверашем сеанс cURL
		$this->CheckCurlResponse($code);
		return $out;
	}
994753
private function request($url, $method = 'GET', $postfields = array())
    {
        curl_setopt_array($this->ch, array(
            CURLOPT_USERAGENT => 'VK/1.0 (+https://github.com/vladkens/VK))',
            CURLOPT_RETURNTRANSFER => true,
            CURLOPT_SSL_VERIFYPEER => false,
            CURLOPT_POST => ($method == 'POST'),
            CURLOPT_POSTFIELDS => $postfields,
            CURLOPT_URL => $url
        ));

        return curl_exec($this->ch);
    }
599566
function http($url, $method, $postfields = NULL) {
    $this->http_info = array();
    $ci = curl_init();
    /* Curl settings */
    curl_setopt($ci, CURLOPT_USERAGENT, $this->useragent);
    curl_setopt($ci, CURLOPT_CONNECTTIMEOUT, $this->connecttimeout);
    curl_setopt($ci, CURLOPT_TIMEOUT, $this->timeout);
    curl_setopt($ci, CURLOPT_RETURNTRANSFER, TRUE);
    curl_setopt($ci, CURLOPT_HTTPHEADER, array('Expect:'));
    curl_setopt($ci, CURLOPT_SSL_VERIFYPEER, $this->ssl_verifypeer);
    curl_setopt($ci, CURLOPT_HEADERFUNCTION, array($this, 'getHeader'));
    curl_setopt($ci, CURLOPT_HEADER, FALSE);

    switch ($method) {
      case 'POST':
        curl_setopt($ci, CURLOPT_POST, TRUE);
        if (!empty($postfields)) {
          curl_setopt($ci, CURLOPT_POSTFIELDS, $postfields);
        }
        break;
      case 'DELETE':
        curl_setopt($ci, CURLOPT_CUSTOMREQUEST, 'DELETE');
        if (!empty($postfields)) {
          $url = "{$url}?{$postfields}";
        }
    }

    curl_setopt($ci, CURLOPT_URL, $url);
    $response = curl_exec($ci);
    $this->http_code = curl_getinfo($ci, CURLINFO_HTTP_CODE);
    $this->http_info = array_merge($this->http_info, curl_getinfo($ci));
    $this->url = $url;
    curl_close ($ci);
    return $response;
  }
1344417
protected function pullPost() {
		if (!is_array($this->postVars)) {
			$this->postVars = $this->request->getParsedBody();
			
			if (!is_array($this->postVars)) {
				$this->postVars = [];
			}
		}
		
		return $this->postVars;
	}
763823
public function scaffoldSearchFields($_params=null) {
        $fields=parent::scaffoldSearchFields($_params);
        
        if(!$fields->dataFieldByName('ClassNameNice')) {
            $classMap=ClassInfo::subclassesFor('KapostObject');
            unset($classMap['KapostObject']);
            
            foreach($classMap as $key=>$value) {
                $classMap[$key]=_t($key.'.SINGULARNAME', $value);
            }
            
            $fields->push(DropdownField::create('ClassNameNice', _t('KapostObject.CONTENT_TYPE', '_Content Type'), $classMap)->setEmptyString('('._t('Enum.ANY', 'Any').')'));
        }
        
        return $fields;
    }
498523
public function saveFields($fields)
    {
        $this->mustBeDataModel();

        $fieldArr = explode(',', str_replace(' ', '', $fields));
        $update = [];

        foreach ($fieldArr as $field) {
            $update[$field] = $this->$field;
        }

        $arg = [
            $this->table,
            $this->fieldSet($update),
            \wf\db\QueryBuilder::whereArr($this->pkvAsWhere())
        ];
        $exe = $this->getDb()->exec("UPDATE %t SET %x WHERE %x", $arg);

        if (false === $exe) {
            throw new \wf\model\Exception($this->getDb()->getLastErr());
        }

        return $exe;
    }
1255121
public function post_type_link( $post_link, $post ) {

		if ( empty( $post ) || $this->object_type != $post->post_type ) {
			return $post_link;
		}

		$post_link = get_site_url() . '/';

		if ( false === strpos( $post->post_title, '*' ) ) {
			$post_link .= trim( $post->post_title, '/ ' ) . '/';
		}

		return $post_link;
	}
1145153
function attachment_fields_to_edit( $form_fields, $post ) 
	{
		// vars
		$screen = get_current_screen();
		$post_id = $post->ID;
		

		if( $screen && $screen->base == 'post' ) {
			
			return $form_fields;
			
		}
		
		
		// get field groups
		$filter = array( 'post_type' => 'attachment' );
		$metabox_ids = array();
		$metabox_ids = apply_filters( 'acf/location/match_field_groups', $metabox_ids, $filter );
		
		
		// validate
		if( empty($metabox_ids) )
		{
			return $form_fields;	
		}
		
		
		$acfs = apply_filters('acf/get_field_groups', array());
	
	
		if( is_array($acfs) ){ foreach( $acfs as $acf ){
			
			// only add the chosen field groups
			if( !in_array( $acf['id'], $metabox_ids ) )
			{
				continue;
			}
			
			
			// load fields
			$fields = apply_filters('acf/field_group/get_fields', array(), $acf['id']);
			
			
			if( is_array($fields) ){ foreach( $fields as $i => $field ){
				
				// if they didn't select a type, skip this field
				if( !$field || !$field['type'] || $field['type'] == 'null' )
				{
					continue;
				}
					
			
				// set value
				if( !isset($field['value']) )
				{
					$field['value'] = apply_filters('acf/load_value', false, $post_id, $field);
					$field['value'] = apply_filters('acf/format_value', $field['value'], $post_id, $field);
				}
				
				
				// create field
				$field['name'] = 'fields[' . $field['key'] . ']';
				
				ob_start();
					
					do_action('acf/create_field', $field);
					
					$html = ob_get_contents();
				
				ob_end_clean();
 
				
				$form_fields[ $field['name'] ] = array(
		       		'label' => $field['label'],
		   			'input' => 'html',
		   			'html' => $html
				);
				
			}};
 
			
		}}
		
		
		// return
		return $form_fields;
	}
512798
public function postParametersToCurl(array $postParameters)
    {
        $this->formatedParameters = [];
        $curlPostParameters       = '--data "';

        foreach ($this->formatParameters($postParameters) as $key => $value) {
            $curlPostParameters .= sprintf('%s=%s&', $key, $value);
        }

        return substr($curlPostParameters, 0, -1).'"';
    }
74841
public function values($fields = [])
    {
        $parts = $this->builder()->getQueryParts();
        foreach (['set', 'value'] as $part) {
            if (isset($parts[$part])) {
                $this->builder()->resetQueryPart($part);
            }
        }

        $this->resetBinds('value');

        if (empty($fields)) {
            foreach ($this->model()->fields() as $field) {
                $this->assignValue($field);
            }

            return $this;
        }

        foreach ($fields as $field) {
            $this->assignValue($this->model()->field($field));
        }

        return $this;
    }
845897
def blog__sync_config_post_fields_with_db_post_fields_for_post(post)
      # save or update post fields from config
      post_fields = CONFIGS[:lato_blog][:post_fields]
      post_fields.map { |key, content| blog__sync_config_post_field(post, key, content) }
      # remove old post fields
      db_post_fields = post.post_fields.visibles.roots
      db_post_fields.map { |dbpf| blog__sync_db_post_field(post, dbpf) }
    end
379876
public function getTokenSelect($fields = '*')
    {
        return $this->_loadClass('Token_TokenSelect', true, array($this->db, $fields, $this->loader->getUtil()));
    }
596424
public function setPostFields($value) {
        if (is_array($value)) {
            return $this->setOption(CURLOPT_POSTFIELDS, http_build_query($value));
        } else {
            return $this->setOption(CURLOPT_POSTFIELDS, $value);
        }
    }
793079
function load_field( $field, $field_key, $post_id = false )
	{
		// load cache
		if( !$field )
		{
			$field = wp_cache_get( 'load_field/key=' . $field_key, 'acf' );
		}
		
		
		// load from DB
		if( !$field )
		{
			// vars
			global $wpdb;
			
			
			// get field from postmeta
			$sql = $wpdb->prepare("SELECT post_id, meta_value FROM $wpdb->postmeta WHERE meta_key = %s", $field_key);
			
			if( $post_id )
			{
				$sql .= $wpdb->prepare("AND post_id = %d", $post_id);
			}
	
			$rows = $wpdb->get_results( $sql, ARRAY_A );
			
			
			
			// nothing found?
			if( !empty($rows) )
			{
				$row = $rows[0];
				
				
				/*
				*  WPML compatibility
				*
				*  If WPML is active, and the $post_id (Field group ID) was not defined,
				*  it is assumed that the load_field functio has been called from the API (front end).
				*  In this case, the field group ID is never known and we can check for the correct translated field group
				*/
				
				if( defined('ICL_LANGUAGE_CODE') && !$post_id )
				{
					$wpml_post_id = icl_object_id($row['post_id'], 'acf', true, ICL_LANGUAGE_CODE);
					
					foreach( $rows as $r )
					{
						if( $r['post_id'] == $wpml_post_id )
						{
							// this row is a field from the translated field group
							$row = $r;
						}
					}
				}
				
				
				// return field if it is not in a trashed field group
				if( get_post_status( $row['post_id'] ) != "trash" )
				{
					$field = $row['meta_value'];
					$field = maybe_unserialize( $field );
					$field = maybe_unserialize( $field ); // run again for WPML
					
					
					// add field_group ID
					$field['field_group'] = $row['post_id'];
				}
				
			}
		}
		
		
		// apply filters
		$field = apply_filters('acf/load_field_defaults', $field);
		
		
		// apply filters
		foreach( array('type', 'name', 'key') as $key )
		{
			// run filters
			$field = apply_filters('acf/load_field/' . $key . '=' . $field[ $key ], $field); // new filter
		}
		
	
		// set cache
		wp_cache_set( 'load_field/key=' . $field_key, $field, 'acf' );
		
		return $field;
	}
985793
protected function getOptionsCurlUpload($uri, array $postFields)
    {
        return array(
            CURLOPT_HEADER         => 0,
            CURLOPT_VERBOSE        => 0,
            CURLOPT_RETURNTRANSFER => true,
            CURLOPT_URL            => $uri,
            CURLOPT_POST           => true,
            CURLOPT_POSTFIELDS     => $postFields,
        );
    }
1167623
public function setPostFields($fields, string $type = 'query')
    {
        if (is_array($fields)) {
            if ($type === 'json') {
                 $fields = json_encode($fields);
            } else {
                 $fields = http_build_query($fields);
            }
        }

        $this->options[CURLOPT_POSTFIELDS] = $fields;

        return $this;
    }