File tree Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change 8
8
* @package wordpress/secure-custom-fields
9
9
*
10
10
* IMPORTANT NOTE:
11
- * This plugin uses a hacky approach to create a test post type that SCF will recognize as its own:
11
+ * This plugin uses a hacky approach to create a test post type that SCF will recognize as its own, don't replicate in production code :
12
12
*
13
- * 1. We use SCF's internal APIs (acf_get_internal_post_type_instance) that aren't meant for public use
13
+ * - We use SCF's internal APIs (acf_get_internal_post_type_instance) that aren't meant for public use
14
14
* and could change between versions without notice.
15
15
*
16
- * 2. We're directly creating database entries that SCF normally manages through its UI,
16
+ * - We're directly creating database entries that SCF normally manages through its UI,
17
17
* bypassing the normal workflow and validation that the UI might provide.
18
- *
19
- * 3. This approach requires intimate knowledge of SCF's internal data structures to know
20
- * exactly what fields the post type configuration needs.
21
- *
22
- * 4. The REST API endpoint determines SCF post types by calling acf_get_internal_post_type_posts(),
23
- * so we need to create a database entry that this function will return.
24
- *
25
- * This works for testing purposes but should NOT be considered a recommended pattern for
26
- * working with SCF in production environments.
27
18
*/
28
19
29
20
// Exit if accessed directly
You can’t perform that action at this time.
0 commit comments