You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/stored-id-handling.md
+52-1Lines changed: 52 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,6 +40,10 @@ This function registers a data piece by providing details about its location and
40
40
-`block_name` (`string`): The block name. **(Required)**
41
41
-`block_attribute` (`string|array`): The attribute(s) containing the data. **(Required)**
42
42
43
+
-**`type`** (`string`):
44
+
Type of data. Accepted values are `'media'`, `'post'`, or `'term'`. If set, the default callbacks will be used.
45
+
**Note:** If this parameter is used in conjunction with custom callbacks, the custom callbacks will be used instead.
46
+
43
47
-**`pre_distribute_cb`** (`callable`):
44
48
A callback function that prepares the data on the source site before distribution. It should return extra data that is required for processing on the target site.
45
49
@@ -56,6 +60,8 @@ Below are several examples demonstrating how to use the `distributor_register_da
56
60
57
61
In this example, we register an image ID stored in post meta under the key `example_image_id`.
If you have any doubts, encounter any different scenarios to handle, or need further assistance, please feel free to report an issue on our [GitHub repository](https://github.com/10up/distributor) and we would be happy to help.
0 commit comments