ACF_Rest_Api::make_identifier
Make the ACF identifier string for the given object.
Method of the class: ACF_Rest_Api{}
No Hooks.
Returns
String.
Usage
// private - for code of main (parent) class only $result = $this->make_identifier( $object_id, $object_type );
- $object_id(int) (required)
- .
- $object_type(string) (required)
'user','term', or'post'.
ACF_Rest_Api::make_identifier() ACF Rest Api::make identifier code ACF 6.0.4
private function make_identifier( $object_id, $object_type ) {
$formats = array(
'user' => 'user_%s',
'term' => 'term_%s',
'comment' => 'comment_%s',
);
return isset( $formats[ $object_type ] )
? sprintf( $formats[ $object_type ], $object_id )
: $object_id;
}