ACF_Rest_Api::make_identifier()
Make the ACF identifier string for the given object.
Метод класса: ACF_Rest_Api{}
Хуков нет.
Возвращает
Строку
.
Использование
// private - только в коде основоного (родительского) класса $result = $this->make_identifier( $object_id, $object_type );
- $object_id(int) (обязательный)
- -
- $object_type(строка) (обязательный)
- 'user', 'term', or 'post'
Код ACF_Rest_Api::make_identifier() ACF Rest Api::make identifier 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; }