@@ -53,7 +53,7 @@ public function add_hooks() {
5353 // Plugin row links
5454 add_filter ('plugin_action_links_ ' . TNCTOOLBOX_PLUGIN_BASE , array ($ this , 'add_plugin_action_link ' ), 20 );
5555
56- // Admin bar customization
56+ // Admin bar customisation
5757 add_action ('admin_enqueue_scripts ' , array ($ this , 'enqueue_custom_css ' ));
5858 add_action ('admin_bar_menu ' , array ($ this , 'add_parent_menu_entry ' ), 99 );
5959 add_action ('admin_bar_menu ' , array ($ this , 'add_cache_purge_button ' ), 100 );
@@ -63,12 +63,12 @@ public function add_hooks() {
6363 add_action ('post_updated ' , array ($ this , 'purge_cache_on_update ' ), 10 , 3 );
6464 add_action ('_core_updated_successfully ' , array ($ this , 'nginx_cache_purge ' ));
6565
66- // Notices
66+ // Notices (Admin GUI)
6767 add_action ('admin_notices ' , array ($ this , 'display_admin_notices ' ));
6868
69- // ACF Save
69+ // ACF Save (#24)
7070 if (has_action ('acf/options_page/save ' ) === true ) {
71- add_action ('acf/options_page/save ' , array ( $ this , ' purge_cache_on_update ' ), 20 , 3 );
71+ add_action ('acf/options_page/save ' , TNC_cPanel_UAPI:: make_api_request ( ' NginxCaching/clear_cache ' ), 10 , 3 );
7272 }
7373 }
7474
@@ -257,7 +257,7 @@ public function nginx_cache_on() {
257257 public function purge_cache_on_update ($ post_id , $ post_after , $ post_before ) {
258258 if ('publish ' === $ post_after ->post_status ||
259259 ($ post_before ->post_status === 'publish ' && $ post_after ->post_status !== 'trash ' )) {
260- // Use the UAPI directly rather than function, to support automated
260+ // Use the UAPI directly rather than function, to support automated (#31)
261261 TNC_cPanel_UAPI::make_api_request ('NginxCaching/clear_cache ' );
262262 }
263263 }
0 commit comments