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: README.md
+53-21Lines changed: 53 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -111,27 +111,59 @@ A demo is available in [WordPress Playground](https://playground.wordpress.net/?
111
111
112
112
- If you activate the Restricted Site Access plugin (included), you'll see a red icon next to the site name. ATM, this only works on the main site due to [issues with WordPress Playground](https://github.com/WordPress/wordpress-playground/issues/2054).
113
113
114
-
## Flow
115
-
116
-
```mermaid
117
-
sequenceDiagram
118
-
Actor User
119
-
participant Menu
120
-
participant IndexedDB
121
-
participant WordPress
122
-
User->>Menu: Open the menu
123
-
Menu->>IndexedDB: Check if IndexedDB in sync
124
-
IndexedDB->>Menu: Update sites menu
125
-
Note over Menu,IndexedDB: If in sync.
126
-
IndexedDB->>WordPress: Request sites
127
-
Note over IndexedDB,WordPress: If not in sync.
128
-
WordPress->>IndexedDB: Get sites
129
-
IndexedDB->>IndexedDB: Update IndexedDB
130
-
IndexedDB->>Menu: Update sites menu
131
-
Menu->>User: Read Menu
132
-
133
-
134
-
```
114
+
## Behide the scenes
115
+
116
+
Let me break down the dataflow related to the timestamp in the super-admin-all-sites-menu plugin:
117
+
118
+
1. Initial Timestamp Creation:
119
+
- In super-admin-all-sites-menu.php, a timestamp is generated when the plugin initializes
120
+
- This is exposed via the `get_timestamp()` method of the main plugin class
121
+
2. PHP to JavaScript Transfer:
122
+
- The timestamp is passed to JavaScript via `wp_add_inline_script()` in super-admin-all-sites-menu.php around line 409:
0 commit comments