Upload via GUI (182 Dateien)

This commit is contained in:
2026-08-13 21:22:59 +00:00
parent 0fda461bec
commit 5e0c026da0
17 changed files with 278 additions and 4140 deletions
+5
View File
@@ -2,6 +2,11 @@
define('WP_USE_THEMES', false);
require('../../../wp-load.php');
if ( php_sapi_name() !== 'cli' && ! current_user_can( 'manage_options' ) ) {
http_response_code( 403 );
exit( 'Forbidden: Admin-Login erforderlich.' );
}
global $wpdb;
$deleted1 = $wpdb->query("DELETE FROM {$wpdb->options} WHERE option_name LIKE '_transient_mm_yt_live%'");
$deleted2 = $wpdb->query("DELETE FROM {$wpdb->options} WHERE option_name LIKE '_transient_timeout_mm_yt_live%'");
@@ -6,6 +6,11 @@
define('WP_USE_THEMES', false);
require('../../../wp-load.php');
if ( php_sapi_name() !== 'cli' && ! current_user_can( 'manage_options' ) ) {
http_response_code( 403 );
exit( 'Forbidden: Admin-Login erforderlich.' );
}
echo "=== Cache löschen ===\n\n";
// Zähler
File diff suppressed because it is too large Load Diff
+14 -3
View File
@@ -2,8 +2,16 @@
/**
* Hilfsskript: Finde Channel-ID für einen @Handle
* Verwendet direkt die YouTube API (ohne WordPress)
*
* SICHERHEIT: Nur per CLI ausführbar (php get-channel-id.php @handle).
* Über den Browser aufgerufen bricht das Skript sofort ab.
*/
if ( php_sapi_name() !== 'cli' ) {
http_response_code( 403 );
exit( 'Forbidden: Dieses Skript darf nur per CLI ausgeführt werden.' );
}
// API Key aus wp-config.php lesen
$wp_config_path = __DIR__ . '/../../../wp-config.php';
$api_key = '';
@@ -16,10 +24,13 @@ if ( file_exists( $wp_config_path ) ) {
}
}
// Fallback: Direkte Eingabe hier (NUR FÜR TESTS!)
// Fallback: API Key per Umgebungsvariable übergeben (NUR FÜR TESTS!)
// Beispiel: YOUTUBE_API_KEY=dein_key php get-channel-id.php @handle
if ( empty( $api_key ) ) {
// TEMPORÄR: Trage hier deinen API Key ein
$api_key = 'AIzaSyD-jSXZO-R4NJBySF0WL6SoFJmBDk2Gdbk'; // ← Dein API Key aus dem Customizer
$env_key = getenv( 'YOUTUBE_API_KEY' );
if ( $env_key !== false ) {
$api_key = $env_key;
}
}
if ( ! isset( $argv[1] ) ) {
+1 -1
View File
@@ -4,7 +4,7 @@
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="referrer" content="strict-origin-when-cross-origin">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
<?php // Font Awesome wird lokal über wp_enqueue_style() in functions.php geladen. ?>
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
@@ -11,11 +11,14 @@
const previewWrap = $('#mm-announcement-preview');
const positionSelect = $('#mm-announcement-position');
// Helper: lädt Google-Font-Link oder updatet existing
function ensureGoogleFont(googleName) {
if (!googleName) return;
const id = 'mm-admin-google-font';
const href = 'https://fonts.googleapis.com/css2?family=' + encodeURIComponent(googleName) + ':wght@400;700&display=swap';
// Helper: bindet die lokal gehostete Schrift für die Vorschau ein.
// Kein Aufruf von fonts.googleapis.com die Dateien liegen im Theme
// unter /fonts/<slug>/font.css (siehe mm_enqueue_local_font() in PHP).
function ensureLocalFont(fontKey) {
if (!fontKey || !current.fontsBase) return;
const slug = String(fontKey).toLowerCase().replace(/ /g, '-');
const id = 'mm-admin-local-font';
const href = current.fontsBase + slug + '/font.css';
let link = document.getElementById(id);
if (link) {
if (link.getAttribute('href') !== href) link.setAttribute('href', href);
@@ -36,8 +39,8 @@
return;
}
previewText.css('font-family', meta.css);
if (meta.google && meta.google_name) {
ensureGoogleFont(meta.google_name);
if (meta.google) {
ensureLocalFont(key);
}
}
File diff suppressed because one or more lines are too long
+5
View File
@@ -2,6 +2,11 @@
define('WP_USE_THEMES', false);
require('../../../wp-load.php');
if ( php_sapi_name() !== 'cli' && ! current_user_can( 'manage_options' ) ) {
http_response_code( 403 );
exit( 'Forbidden: Admin-Login erforderlich.' );
}
$posts = get_posts(array(
'post_type' => 'mm_livestream',
'posts_per_page' => -1,
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.