Files
wp-asciiplayer/asciicast-player.php
LamGC 85e5ffa0ec
Build and WordPress integration / PHP 7.4 syntax and regression tests (push) Canceled after 0s
Build and WordPress integration / PHP 8.3 syntax and regression tests (push) Canceled after 0s
Build and WordPress integration / WordPress 6.3 / PHP 7.4 (push) Canceled after 0s
Build and WordPress integration / WordPress latest / PHP 8.2 (push) Canceled after 0s
Refresh wp-asciiplayer with native block editor playback (#36)
* Refresh player with native block editor preview and local assets

Preserve shortcode rendering, normalize options, bundle the player locally,
and add reproducible packaging and WordPress integration tests.

* Fix emitted frontend boot and verify bundled runtime initialization

* Record verified WordPress 7.1.3 compatibility

* Use WordPress readme major-version compatibility format

* Add responsive player layout, captions and native terminal sizing

* Keep editor caption geometry stable during block selection

* Respect WordPress editor gutters with border-box sizing

* Improve automatic previews and toolbar terminal sizing (1.2.1)

* Show native cast dimensions and add Media Library recordings (1.2.2)

* Fix Media Library test storage and scope sidebar selectors

* Document bounded temporary-upload stream exceptions

* Move block explanations into collapsed sidebar help (1.2.3)

* Add bundled English and Simplified Chinese UI translations (1.1.0-dev)

* Use native RichText labels and supported Chinese HTML language tags in locale tests
2026-10-14 15:56:05 +08:00

42 lines
1.4 KiB
PHP

<?php
/**
* Plugin Name: Asciicast Player
* Plugin URI: https://github.com/LamGC/wp-asciiplayer
* Description: Add interactive terminal recordings to posts and pages with a block or shortcode.
* Version: 1.1.0-dev
* Requires at least: 6.3
* Requires PHP: 7.4
* Author: LamGC
* Author URI: https://blog.lamgc.moe
* License: GPL-3.0-only
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
* Domain Path: /languages
* Text Domain: wp-asciiplayer
*
* @package LamGC\Asciiplayer
*/
namespace LamGC\Asciiplayer;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
const VERSION = '1.1.0-dev';
const PLUGIN_FILE = __FILE__;
const SHORTCODE = 'asciiplayer';
require_once __DIR__ . '/includes/options.php';
require_once __DIR__ . '/includes/render.php';
require_once __DIR__ . '/includes/assets.php';
require_once __DIR__ . '/includes/uploads.php';
add_action( 'init', __NAMESPACE__ . '\\register_plugin' );
add_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\\enqueue_content_assets' );
add_action( 'wp_footer', __NAMESPACE__ . '\\print_late_styles', 5 );
add_filter( 'upload_mimes', __NAMESPACE__ . '\\allow_cast_upload_mime', 10, 2 );
add_filter( 'wp_check_filetype_and_ext', __NAMESPACE__ . '\\check_cast_filetype', 10, 5 );
add_filter( 'wp_handle_upload_prefilter', __NAMESPACE__ . '\\validate_cast_upload' );
add_filter( 'wp_handle_sideload_prefilter', __NAMESPACE__ . '\\validate_cast_upload' );