add_help_tab( array( 'id' => 'wp360-so-help-basics', 'title' => __( 'What does Speed Optimizer do?', '360-orbit-speed-optimizer' ), 'content' => '

' . __( 'It writes a managed block into .htaccess for GZIP compression, browser caching and cleanup (emoji scripts, query strings, Heartbeat throttling). Quickstart applies safe defaults with one click, backs up .htaccess first, and rolls back automatically if the homepage responds with a server error afterwards.', '360-orbit-speed-optimizer' ) . '

', ) ); $screen->add_help_tab( array( 'id' => 'wp360-so-help-broke', 'title' => __( 'My site broke after Quickstart or a settings change — what now?', '360-orbit-speed-optimizer' ), 'content' => '

' . __( 'A self-test runs automatically after every write and rolls back on a server error, so this should be rare. If something still looks off, use "Restore backup" on the Status tab, or run "wp 360-orbit-speed-optimizer restore" via WP-CLI.', '360-orbit-speed-optimizer' ) . '

', ) ); $screen->add_help_tab( array( 'id' => 'wp360-so-help-no-htaccess', 'title' => __( '".htaccess writable: No" — what do I do?', '360-orbit-speed-optimizer' ), 'content' => '

' . __( 'The plugin could not write to .htaccess, usually a file-permission issue. Ask your host to make it writable by the web server user, or apply the rules manually via SSH/FTP based on what Quickstart would have written.', '360-orbit-speed-optimizer' ) . '

', ) ); } /** * Deaktivierungs-Rückfrage (README "Suite-übergreifend"): kein Formular, * nur ein kurzer Hinweis vor dem eigentlichen Deaktivieren in der * Plugin-Liste, was dabei aufhoert und was erhalten bleibt. */ public static function enqueue_deactivation_notice_script( $hook ) { if ( 'plugins.php' !== $hook || ! defined( 'WP360_SO_FILE' ) ) { return; } $basename = plugin_basename( WP360_SO_FILE ); $message = __( 'Deactivate Speed Optimizer? The managed .htaccess block (caching, compression, cleanup) is removed immediately. Your settings stay saved and the block comes back if you reactivate the plugin.', '360-orbit-speed-optimizer' ); // Kein eigenes Script-Tag im Markup (WordPress.org-Richtlinie): ein Handle // ohne Datei, an das der Code per wp_add_inline_script() haengt. wp_register_script( 'wp360-so-deactivate', false, array(), WP360_SO_VERSION, true ); wp_enqueue_script( 'wp360-so-deactivate' ); wp_add_inline_script( 'wp360-so-deactivate', sprintf( '( function () { var row = document.querySelector( %s ); var link = row ? row.querySelector( \'a[href*="action=deactivate"]\' ) : null; if ( ! link ) { return; } link.addEventListener( \'click\', function ( event ) { if ( ! window.confirm( %s ) ) { event.preventDefault(); } } ); } )();', wp_json_encode( 'tr[data-plugin="' . $basename . '"]' ), wp_json_encode( $message ) ) ); } /** * Gesundheitscheck (README "Suite-übergreifend"): traegt zur * gemeinsamen "360 WP Orbit"-Uebersicht bei -- rein lesend, nichts * wird hier ausgeloest. Bewusst am gemeinsamen, nicht praefigierten * Filter 'wp360_orbit_health' registriert (siehe class-orbit-menu.php). */ public static function health_lines( array $lines, $slug ) { if ( '360-orbit-speed-optimizer' !== $slug ) { return $lines; } if ( class_exists( 'Wp360_Speed_Optimizer_Htaccess' ) ) { $status = Wp360_Speed_Optimizer_Htaccess::status(); if ( empty( $status['block_present'] ) ) { $lines[] = __( '.htaccess block not active — run Quickstart or save settings once.', '360-orbit-speed-optimizer' ); } elseif ( ! empty( $status['last_test'] ) && empty( $status['last_test']['ok'] ) ) { $lines[] = __( 'Last self-test failed.', '360-orbit-speed-optimizer' ); } } return $lines; } private static function current_tab() { $valid = array( 'status', 'doctor', 'caching', 'cleanup', 'hints' ); if ( self::show_pro_tab() ) { $valid[] = 'pro'; } if ( isset( $_GET['tab'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended $tab = sanitize_key( wp_unslash( $_GET['tab'] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended if ( in_array( $tab, $valid, true ) ) { return $tab; } } return 'status'; } public static function enqueue_assets( $hook ) { if ( self::$hook !== $hook ) { return; } wp_enqueue_style( 'wp360-so-admin', WP360_SO_URL . 'assets/admin.css', array(), WP360_SO_VERSION ); if ( 'doctor' === self::current_tab() ) { self::enqueue_doctor_assets(); } wp_enqueue_script( 'wp360-so-admin', WP360_SO_URL . 'assets/admin.js', array( 'jquery' ), WP360_SO_VERSION, true ); wp_localize_script( 'wp360-so-admin', 'wp360SpeedOptimizer', array( 'ajaxUrl' => admin_url( 'admin-ajax.php' ), 'nonce' => wp_create_nonce( 'wp360_so_nonce' ), 'strings' => array( 'quickstartError' => __( 'Error while applying quickstart.', '360-orbit-speed-optimizer' ), 'saved' => __( 'Saved.', '360-orbit-speed-optimizer' ), 'saveError' => __( 'Error while saving.', '360-orbit-speed-optimizer' ), 'testing' => __( 'Testing …', '360-orbit-speed-optimizer' ), 'testError' => __( 'Error while testing.', '360-orbit-speed-optimizer' ), 'restoring' => __( 'Restoring …', '360-orbit-speed-optimizer' ), ), ) ); } /** * Skript und Stil des Performance Doctors: nur auf seinem Tab. */ private static function enqueue_doctor_assets() { wp_enqueue_style( 'wp360-so-doctor', WP360_SO_URL . 'assets/doctor.css', array( 'wp360-so-admin' ), WP360_SO_VERSION ); wp_enqueue_script( 'wp360-so-doctor', WP360_SO_URL . 'assets/doctor.js', array(), WP360_SO_VERSION, true ); wp_localize_script( 'wp360-so-doctor', 'wp360SoDoctor', array( 'ajaxUrl' => admin_url( 'admin-ajax.php' ), 'nonce' => wp_create_nonce( 'wp360_so_nonce' ), 'strings' => array( 'running' => __( 'Measuring … this can take up to half a minute.', '360-orbit-speed-optimizer' ), 'failed' => __( 'The request failed. Please try again.', '360-orbit-speed-optimizer' ), 'working' => __( 'Working …', '360-orbit-speed-optimizer' ), 'fixedAdvice' => __( 'Measure again to see the effect.', '360-orbit-speed-optimizer' ), 'copied' => __( 'Copied.', '360-orbit-speed-optimizer' ), 'copyFailed' => __( 'Copying is not possible here. Select the text by hand.', '360-orbit-speed-optimizer' ), ), ) ); } private static function render_tabs( $current_tab ) { $tabs = array( 'status' => __( 'Status & Quickstart', '360-orbit-speed-optimizer' ), 'doctor' => __( 'Performance Doctor', '360-orbit-speed-optimizer' ), 'caching' => __( 'Caching & Compression', '360-orbit-speed-optimizer' ), 'cleanup' => __( 'Cleanup & Scripts', '360-orbit-speed-optimizer' ), 'hints' => __( 'Resource Hints', '360-orbit-speed-optimizer' ), ); // FREE: ein einziger Pro-Tab statt mehrerer gesperrter Attrappen-Tabs // (WordPress.org-Richtlinie 11: Upgrade-Hinweise sparsam und nur auf // der eigenen Einstellungsseite). if ( self::show_pro_tab() ) { $tabs['pro'] = __( 'Speed Optimizer Pro', '360-orbit-speed-optimizer' ); } ?>

✓' : '✕'; return $icon . ' ' . esc_html( $label ); } private static function render_status_tab() { $status = Wp360_Speed_Optimizer_Htaccess::status(); ?>

$present ) { ?>
–

' . esc_html( $label ) . ''; if ( $description ) { echo '

' . esc_html( $description ) . '

'; } } private static function render_caching_tab( array $settings ) { ?>



360 Orbit ()

-- das steckt hier im Flex-Branding-Block, die Meldung erschiene also neben der Ueberschrift statt darunter. ?>