settings = $settings; $this->security = $security; } /** * Render main settings page * * @return void */ public function render() { ?>

render_checkbox(array( 'key' => 'tool-blockcomment', 'label' => __('Block All Comments', 'ai-auto-tool'), 'description' => __('If active, block all comments on posts.', 'ai-auto-tool') )); $this->render_checkbox(array( 'key' => 'tool-edit1', 'label' => __('Turn On Classic Editor', 'ai-auto-tool'), 'description' => __('Active Classic Editor for new posts and edits', 'ai-auto-tool') )); $this->render_checkbox(array( 'key' => 'tool-edit11', 'label' => __('Add Extra Buttons to Classic Editor', 'ai-auto-tool'), 'description' => __('Add font select, font size, and table buttons to editor', 'ai-auto-tool') )); $this->render_checkbox(array( 'key' => 'tool-widget1', 'label' => __('Turn On Classic Widgets', 'ai-auto-tool'), 'description' => __('Active old classic widgets interface', 'ai-auto-tool') )); ?>

render_checkbox(array( 'key' => 'speed-off1', 'label' => __('Turn off jQuery Migrate', 'ai-auto-tool'), 'description' => __('jQuery Migrate is for backward compatibility. Turn off if not needed.', 'ai-auto-tool') )); $this->render_checkbox(array( 'key' => 'speed-off2', 'label' => __('Turn off Gutenberg CSS on Homepage', 'ai-auto-tool'), 'description' => __('If you don\'t use Gutenberg on homepage, turn this off.', 'ai-auto-tool') )); $this->render_checkbox(array( 'key' => 'speed-off3', 'label' => __('Turn off Classic CSS on Homepage', 'ai-auto-tool'), 'description' => __('If you don\'t use classic theme styles, turn this off.', 'ai-auto-tool') )); $this->render_checkbox(array( 'key' => 'speed-off4', 'label' => __('Turn off Emoji', 'ai-auto-tool'), 'description' => __('Disable WordPress emoji scripts and styles if not needed.', 'ai-auto-tool') )); ?>

render_checkbox(array( 'key' => 'speed-link1', 'label' => __('Enable Instant Page', 'ai-auto-tool'), 'description' => __('Preload pages on hover for faster navigation.', 'ai-auto-tool') )); $this->render_checkbox(array( 'key' => 'speed-link2', 'label' => __('Enable Smooth Scroll', 'ai-auto-tool'), 'description' => __('Add smooth scrolling effects to your website.', 'ai-auto-tool') )); ?>

render_checkbox(array( 'key' => 'speed-zip1', 'label' => __('Enable HTML Compression', 'ai-auto-tool'), 'description' => __('Compress HTML output by removing unnecessary whitespace.', 'ai-auto-tool') )); ?>

render_checkbox(array( 'key' => 'scuri-off1', 'label' => __('Disable REST API for Non-Logged Users', 'ai-auto-tool'), 'description' => __('Restrict REST API access to logged-in users only.', 'ai-auto-tool') )); $this->render_checkbox(array( 'key' => 'scuri-off2', 'label' => __('Disable XML-RPC', 'ai-auto-tool'), 'description' => __('Turn off XML-RPC if not using remote publishing.', 'ai-auto-tool') )); $this->render_checkbox(array( 'key' => 'scuri-off3', 'label' => __('Disable WP Embed', 'ai-auto-tool'), 'description' => __('Remove WordPress embed script if not needed.', 'ai-auto-tool') )); $this->render_checkbox(array( 'key' => 'scuri-off4', 'label' => __('Disable X-Pingback', 'ai-auto-tool'), 'description' => __('Remove X-Pingback header from responses.', 'ai-auto-tool') )); $this->render_checkbox(array( 'key' => 'scuri-off5', 'label' => __('Remove Unnecessary Header Info', 'ai-auto-tool'), 'description' => __('Remove feed links, RSD link, and other meta tags.', 'ai-auto-tool') )); $this->render_checkbox(array( 'key' => 'scuri-off6', 'label' => __('Disable Feeds', 'ai-auto-tool'), 'description' => __('Disable RSS/Atom feeds if not used.', 'ai-auto-tool') )); ?>

render_checkbox(array( 'key' => 'scuri-verof1', 'label' => __('Remove Version from CSS/JS', 'ai-auto-tool'), 'description' => __('Hide version numbers from stylesheet and script URLs.', 'ai-auto-tool') )); $this->render_checkbox(array( 'key' => 'scuri-verof2', 'label' => __('Remove WordPress Version', 'ai-auto-tool'), 'description' => __('Hide WordPress version from meta tags.', 'ai-auto-tool') )); ?>

render_checkbox(array( 'key' => 'scuri-sql1', 'label' => __('Enable SQL Injection Protection', 'ai-auto-tool'), 'description' => __('Block common SQL injection and XSS attempts.', 'ai-auto-tool') )); ?>

render_checkbox(array( 'key' => 'speed-data1', 'label' => __('Limit Post Revisions', 'ai-auto-tool'), )); $this->render_number_input(array( 'key' => 'speed-data11', 'label' => __('Max Number of Revisions', 'ai-auto-tool'), 'placeholder' => '3', 'min' => 1, 'max' => 100, 'description' => __('Maximum number of revisions to keep per post.', 'ai-auto-tool') )); $this->render_checkbox(array( 'key' => 'speed-data2', 'label' => __('Change Autosave Interval', 'ai-auto-tool'), )); $this->render_number_input(array( 'key' => 'speed-data21', 'label' => __('Autosave Interval (minutes)', 'ai-auto-tool'), 'placeholder' => '1', 'min' => 1, 'max' => 30, 'description' => __('How often to autosave posts (in minutes).', 'ai-auto-tool') )); ?>

render_checkbox(array( 'key' => 'tool-mana1', 'label' => __('Redirect 404 to Homepage', 'ai-auto-tool'), 'description' => __('Automatically redirect 404 errors to homepage.', 'ai-auto-tool') )); $this->render_checkbox(array( 'key' => 'tool-mana2', 'label' => __('Block Copy Content & DevTools', 'ai-auto-tool'), 'description' => __('Prevent users from copying content and using developer tools.', 'ai-auto-tool') )); $this->render_checkbox(array( 'key' => 'tool-mana3', 'label' => __('Enable TinyMCE for Category Description', 'ai-auto-tool'), 'description' => __('Add visual editor to category description.', 'ai-auto-tool') )); ?>

render_checkbox(array( 'key' => 'tool-upload1', 'label' => __('Disable Core Updates', 'ai-auto-tool'), )); $this->render_checkbox(array( 'key' => 'tool-upload2', 'label' => __('Disable Translation Updates', 'ai-auto-tool'), )); $this->render_checkbox(array( 'key' => 'tool-upload3', 'label' => __('Disable Plugin Updates', 'ai-auto-tool'), )); $this->render_checkbox(array( 'key' => 'tool-upload4', 'label' => __('Disable Theme Updates', 'ai-auto-tool'), )); ?>

__('Dashboard', 'ai-auto-tool'), 'tool-hiden2' => __('Posts', 'ai-auto-tool'), 'tool-hiden3' => __('Pages', 'ai-auto-tool'), 'tool-hiden4' => __('Comments', 'ai-auto-tool'), 'tool-hiden5' => __('Media', 'ai-auto-tool'), 'tool-hiden6' => __('Appearance', 'ai-auto-tool'), 'tool-hiden7' => __('Plugins', 'ai-auto-tool'), 'tool-hiden8' => __('Users', 'ai-auto-tool'), 'tool-hiden9' => __('Tools', 'ai-auto-tool'), 'tool-hiden10' => __('Settings', 'ai-auto-tool'), ); foreach ($hide_items as $key => $label) { $this->render_checkbox(array( 'key' => $key, 'label' => $label, 'inline' => true )); } ?>

settings->get($key, 0); $checked = checked(1, $value, false); $class = $inline ? 'inline-checkbox' : ''; ?>

settings->get($key, $placeholder); ?>