id !== 'acf_page_acf-table-field-plugin-settings' && $screen && $screen->id !== 'scf_page_acf-table-field-plugin-settings' ) { return false; } return true; } public function remove_all_help_tabs() { if ( ! $this->is_settings_page() ) { return; } $screen = get_current_screen(); $screen->remove_help_tabs(); } public function register_styles() { if ( ! $this->is_settings_page() ) { return; } if ( version_compare( get_bloginfo('version'), '7.0', '<' ) ) { wp_register_style( 'acf-table-settings-page', FileSystem::get('plugin_dir_url') . 'css/settings-wpv6.css', array( 'acf-global' ), PluginInfo::get('version') ); } else { wp_register_style( 'acf-table-settings-page', FileSystem::get('plugin_dir_url') . 'css/settings.css', array( 'acf-global' ), PluginInfo::get('version') ); } wp_enqueue_style( 'acf-table-settings-page' ); } private function _get_option( $option_name ) { if ( $this->_is_license_site() ) { $option = get_option( $option_name ); } else { $main_site_id = get_network()->site_id; switch_to_blog( $main_site_id ); $option = get_option( $option_name ); restore_current_blog(); } return $option; } private function _update_option( $option_name, $value ) { update_option( $option_name, $value ); } private function _is_license_site() { if ( ! is_multisite() || get_current_blog_id() === get_network()->site_id ) { return true; } return false; } public function init_options_settings() { $this->settings = $this->_get_option( 'acf_table_field_plugin_settings' ); if ( empty( $this->settings ) ) { $this->settings = array(); } $defaults = array( ); $this->settings = array_replace_recursive( $defaults, $this->settings ); $this->_update_option( 'acf_table_field_plugin_settings', $this->settings ); } public function init_options_data() { $this->data = $this->_get_option( 'acf_table_field_plugin_data' ); if ( empty( $this->data ) ) { $this->data = array(); } $defaults = array( ); $this->data = array_replace_recursive( $defaults, $this->data ); $this->_update_option( 'acf_table_field_plugin_data', $this->data ); } public function init_settings_page() { add_submenu_page( 'edit.php?post_type=acf-field-group', // slug still works also for SCF 'Table Field', // page_title 'Table Field', // menu_title 'manage_options', // capability 'acf-table-field-plugin-settings', // option page menu_slug array( $this, 'settings_page_view' ) // function ); register_setting( 'acf_table_field_plugin_settings_option_group', // option_group 'acf_table_field_plugin_settings', // option_name array( $this, 'settings_data_sanitize' ) // sanitize_callback ); add_filter('admin_body_class', function ($classes) { if ( ! $this->is_settings_page() ) { return $classes; } $classes .= ' acf-admin-page'; return $classes; }); } public function settings_page_view() { ?>
%s', 'settings', PluginInfo::get('text_domain') ), $this->wordpress_website_url, $this->wordpress_website_url ); ?>
support, please use the plugin’s official WordPress support forum.
I appreciate any feedback.
Cheers, Johann', 'settings', PluginInfo::get('text_domain') ), $this->wordpress_repository_support_url ); ?>
%s Github Sponsors', 'settings', PluginInfo::get('text_domain') ), $this->github_sponsors_url, '' ); ?>
%s Donate via Stripe', 'settings', PluginInfo::get('text_domain') ), $this->buy_stripe_url, '' ); ?>
%s Buy me a coffee', 'settings', PluginInfo::get('text_domain') ), $this->buy_me_a_coffee_url, '' ); ?>
Cheers, Johann', 'settings', PluginInfo::get('text_domain') ); ?>
Table Field Pro brings clarity, organization and powerful configurability to your data workflows — with a modern UI, advanced editing tools, and productivity features built for real-world projects.', 'settings', PluginInfo::get('text_domain') ); ?>
Pro gives you the control, flexibility and a clean, intuitive UI you always wanted.', 'settings', PluginInfo::get('text_domain') ); ?>
%s', 'settings', PluginInfo::get('text_domain') ), $this->website_url, str_replace( 'https://www.', '', $this->website_url ) ); ?>
By choosing the Pro version, you help ensure the ongoing maintenance and long-term preservation of this open-source version.', 'settings', PluginInfo::get('text_domain') ), $this->website_url, str_replace( 'https://www.', '', $this->website_url ) ); ?>