diff --git a/README.md b/README.md index c930b42..08fcf78 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Contest data is provided by [OI-contest-fetch](https://github.com/hanyixuanten/O - Adds an **Upcoming OI Contests** widget to the WordPress dashboard. - Provides a **vblg OI Contest Schedule** block for posts and pages. -- Keeps the `[oi_contest_schedule]` shortcode available for compatibility and templates. +- Keeps the `[oics_oi_contest_schedule]` shortcode available for compatibility and templates. - Shows contest platform, title, start and end times, and a live countdown. - Identifies contests that are currently running. - Supports responsive and compact layouts. @@ -49,7 +49,7 @@ The block is rendered dynamically, so contest data remains current without editi For classic editors or templates, the shortcode remains available: ```text -[oi_contest_schedule] +[oics_oi_contest_schedule] ``` The shortcode accepts the following attributes: diff --git a/README_zh.md b/README_zh.md index c4205cb..cfa19c0 100644 --- a/README_zh.md +++ b/README_zh.md @@ -10,7 +10,7 @@ vblg OI Contest Schedule 是一款轻量级 WordPress 插件,可在 WordPress - 在 WordPress 仪表盘中添加“即将到来的 OI 赛事”小组件。 - 提供“**OI 赛事日程**”区块,可直接插入文章或页面。 -- 保留 `[oi_contest_schedule]` 短代码,兼容经典编辑器和模板。 +- 保留 `[oics_oi_contest_schedule]` 短代码,兼容经典编辑器和模板。 - 展示比赛平台、标题、开始和结束时间,以及实时倒计时。 - 自动标记正在进行的比赛。 - 支持响应式布局和紧凑布局。 @@ -49,7 +49,7 @@ vblg OI Contest Schedule 是一款轻量级 WordPress 插件,可在 WordPress 经典编辑器或模板仍可使用以下短代码: ```text -[oi_contest_schedule] +[oics_oi_contest_schedule] ``` 短代码支持以下属性: diff --git a/includes/class-plugin.php b/includes/class-plugin.php index 8edb279..0365527 100644 --- a/includes/class-plugin.php +++ b/includes/class-plugin.php @@ -21,7 +21,7 @@ final class OICS_Plugin { add_action( 'wp_dashboard_setup', array( $this, 'register_dashboard_widget' ) ); add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_frontend_assets' ) ); add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_assets' ) ); - add_shortcode( 'oi_contest_schedule', array( $this, 'render_shortcode' ) ); + add_shortcode( 'oics_oi_contest_schedule', array( $this, 'render_shortcode' ) ); } public function register_block() { @@ -89,7 +89,7 @@ final class OICS_Plugin { public function enqueue_frontend_assets() { $post = get_post(); - if ( ! $post || ( ! has_shortcode( $post->post_content, 'oi_contest_schedule' ) && ! has_block( 'oics/contest-schedule', $post ) ) ) { + if ( ! $post || ( ! has_shortcode( $post->post_content, 'oics_oi_contest_schedule' ) && ! has_block( 'oics/contest-schedule', $post ) ) ) { return; } diff --git a/readme.txt b/readme.txt index 2019dda..b2460ed 100644 --- a/readme.txt +++ b/readme.txt @@ -33,7 +33,7 @@ Add the **vblg OI Contest Schedule** block from the block inserter. Its settings The shortcode remains available for classic editors and templates. By default it displays up to 10 contests: -`[oi_contest_schedule]` +`[oics_oi_contest_schedule]` Use `limit` to display between 1 and 50 contests: @@ -91,7 +91,7 @@ Service and data source: * Added the upcoming contest dashboard widget. * Added the **vblg OI Contest Schedule** editor block with limit and compact layout settings. -* Added the `[oi_contest_schedule]` shortcode with `limit` and `compact` options. +* Added the `[oics_oi_contest_schedule]` shortcode with `limit` and `compact` options. * Added visitor-local time formatting and live countdowns. * Added platform styling and responsive layouts. * Added five-minute transient caching for the contest feed.