rename
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
name: Bug Report and Feature Request
|
||||
description: Report an OI Contest Schedule issue or suggest a feature or documentation improvement
|
||||
description: Report a vblg OI Contest Schedule issue or suggest a feature or documentation improvement
|
||||
title: "[Issue]: "
|
||||
body:
|
||||
- type: markdown
|
||||
@@ -32,7 +32,7 @@ body:
|
||||
- type: input
|
||||
id: plugin-version
|
||||
attributes:
|
||||
label: OI Contest Schedule version
|
||||
label: vblg OI Contest Schedule version
|
||||
placeholder: "For example: 0.1.0"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
name: 问题反馈与功能建议
|
||||
description: 反馈 OI Contest Schedule 的问题,或提出功能和文档改进建议
|
||||
description: 反馈 vblg OI Contest Schedule 的问题,或提出功能和文档改进建议
|
||||
title: "[Issue]: "
|
||||
body:
|
||||
- type: markdown
|
||||
@@ -32,7 +32,7 @@ body:
|
||||
- type: input
|
||||
id: plugin-version
|
||||
attributes:
|
||||
label: OI Contest Schedule 版本
|
||||
label: vblg OI Contest Schedule 版本
|
||||
placeholder: 例如:0.1.0
|
||||
validations:
|
||||
required: true
|
||||
|
||||
@@ -21,8 +21,8 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
PLUGIN_SLUG: oi-contest-schedule
|
||||
SVN_URL: https://plugins.svn.wordpress.org/oi-contest-schedule
|
||||
PLUGIN_SLUG: vblg-oi-contest-schedule
|
||||
SVN_URL: https://plugins.svn.wordpress.org/vblg-oi-contest-schedule
|
||||
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
|
||||
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
|
||||
|
||||
|
||||
@@ -29,8 +29,8 @@ jobs:
|
||||
id: package
|
||||
run: |
|
||||
set -eu
|
||||
version="$(grep -E '^ \* Version:' oi-contest-schedule.php | sed -E 's/^ \* Version: *//')"
|
||||
archive_name="oi-contest-schedule-${version}.zip"
|
||||
version="$(grep -E '^ \* Version:' vblg-oi-contest-schedule.php | sed -E 's/^ \* Version: *//')"
|
||||
archive_name="vblg-oi-contest-schedule-${version}.zip"
|
||||
if [ "${GITHUB_REF_TYPE}" = "tag" ] && [ "${GITHUB_REF_NAME}" != "v${version}" ]; then
|
||||
printf 'Tag %s does not match plugin version %s.\n' "${GITHUB_REF_NAME}" "${version}" >&2
|
||||
exit 1
|
||||
@@ -41,7 +41,7 @@ jobs:
|
||||
- name: Upload plugin archive
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: oi-contest-schedule-plugin
|
||||
name: vblg-oi-contest-schedule-plugin
|
||||
path: ${{ steps.package.outputs.archive }}
|
||||
if-no-files-found: error
|
||||
retention-days: 30
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
## Architecture
|
||||
|
||||
- `oi-contest-schedule.php` owns plugin metadata, constants, loading, and startup hooks.
|
||||
- `vblg-oi-contest-schedule.php` owns plugin metadata, constants, loading, and startup hooks.
|
||||
- `includes/class-plugin.php` owns WordPress integration, widgets, shortcode registration, and asset enqueueing.
|
||||
- `includes/class-contest-client.php` owns remote fetching, transient caching, validation, normalization, and sorting.
|
||||
- `includes/class-schedule-renderer.php` owns escaped server-rendered markup.
|
||||
@@ -19,8 +19,8 @@
|
||||
|
||||
## Localization and text changes
|
||||
|
||||
- Whenever modifying a file that contains text, explicitly check whether the change adds, removes, or changes user-facing/translatable strings and whether `languages/oi-contest-schedule.pot` and `languages/oi-contest-schedule-zh_CN.po` must also change.
|
||||
- PHP gettext calls use the `oi-contest-schedule` text domain. JavaScript-facing translated strings are localized from PHP.
|
||||
- Whenever modifying a file that contains text, explicitly check whether the change adds, removes, or changes user-facing/translatable strings and whether `languages/vblg-oi-contest-schedule.pot` and `languages/vblg-oi-contest-schedule-zh_CN.po` must also change.
|
||||
- PHP gettext calls use the `vblg-oi-contest-schedule` text domain. Translations are loaded by WordPress automatically; the plugin does not call `load_plugin_textdomain()`, and the packaged ZIP does not include `languages/`. JavaScript-facing translated strings are localized from PHP.
|
||||
- Treat POT and PO files as editable localization sources. MO files are generated by the build and must not be committed from the source tree.
|
||||
- After PO changes, run `./build.sh build`; it validates gettext syntax and format placeholders with `msgfmt`.
|
||||
|
||||
@@ -36,7 +36,7 @@ When the user's message is exactly `release X.Y.Z` or `release vX.Y.Z` (allowing
|
||||
|
||||
1. Confirm the version is valid SemVer and inspect the worktree before editing. Do not overwrite unrelated user changes.
|
||||
2. Find the previous release tag from Git history, preferring the nearest reachable version tag: `git describe --tags --abbrev=0 --match 'v*'`. If none exists, state that the release notes cover the full repository history.
|
||||
3. Search tracked source files for the current version and release metadata. Update every applicable version occurrence, including the plugin header and `OICS_VERSION` in `oi-contest-schedule.php`, `Stable tag` plus changelog/upgrade-notice headings in `readme.txt`, and `Project-Id-Version` in both PO and POT files. Review other search results rather than assuming this list is exhaustive. Do not edit generated copies under `build/`.
|
||||
3. Search tracked source files for the current version and release metadata. Update every applicable version occurrence, including the plugin header and `OICS_VERSION` in `vblg-oi-contest-schedule.php`, `Stable tag` plus changelog/upgrade-notice headings in `readme.txt`, and `Project-Id-Version` in both PO and POT files. Review other search results rather than assuming this list is exhaustive. Do not edit generated copies under `build/`.
|
||||
4. Review `git diff <previous-tag>..HEAD` and the commit log over the same range. Derive release notes only from that evidence; group user-visible changes, fixes, compatibility changes, and developer-facing changes as appropriate. Do not include uncommitted release-preparation edits as previously completed work unless clearly labeled.
|
||||
5. Add concise release entries to the repository changelog/upgrade notice where appropriate, keeping WordPress.org formatting valid. Check whether English and Chinese documentation or translations need corresponding updates.
|
||||
6. Run `./build.sh build` and report any validation failures. Confirm the produced ZIP version and the requested tag agree with the plugin header and `Stable tag`.
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
# OI Contest Schedule
|
||||
# vblg OI Contest Schedule
|
||||
|
||||
[简体中文](README_zh.md)
|
||||
|
||||
OI Contest Schedule is a lightweight WordPress plugin that displays currently running and upcoming competitive programming contests in the WordPress dashboard or on any post or page. Contests that have ended are not displayed.
|
||||
vblg OI Contest Schedule is a lightweight WordPress plugin that displays currently running and upcoming competitive programming contests in the WordPress dashboard or on any post or page. Contests that have ended are not displayed.
|
||||
|
||||
Contest data is provided by [OI-contest-fetch](https://github.com/hanyixuanten/OI-contest-fetch) and displayed in each visitor's client device time zone, not the time zone configured in WordPress. The schedule identifies the client time zone by its IANA name, such as `Asia/Shanghai`.
|
||||
|
||||
## Features
|
||||
|
||||
- Adds an **Upcoming OI Contests** widget to the WordPress dashboard.
|
||||
- Provides an **OI Contest Schedule** block for posts and pages.
|
||||
- Provides a **vblg OI Contest Schedule** block for posts and pages.
|
||||
- Keeps the `[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.
|
||||
@@ -27,20 +27,20 @@ Contest data is provided by [OI-contest-fetch](https://github.com/hanyixuanten/O
|
||||
|
||||
### Install a release package
|
||||
|
||||
1. Download the latest plugin ZIP from the repository's [Releases](https://github.com/hanyixuanten/oi-contest-schedule/releases) page.
|
||||
1. Download the latest plugin ZIP from the repository's [Releases](https://github.com/hanyixuanten/vblg-oi-contest-schedule/releases) page.
|
||||
2. In WordPress, go to **Plugins > Add New Plugin > Upload Plugin**.
|
||||
3. Select the ZIP file, then install and activate the plugin.
|
||||
|
||||
### Install from source
|
||||
|
||||
1. Copy or clone this repository to `wp-content/plugins/oi-contest-schedule`.
|
||||
2. Activate **OI Contest Schedule** from the WordPress **Plugins** page.
|
||||
1. Copy or clone this repository to `wp-content/plugins/vblg-oi-contest-schedule`.
|
||||
2. Activate **vblg OI Contest Schedule** from the WordPress **Plugins** page.
|
||||
|
||||
After activation, the dashboard widget appears automatically on **Dashboard > Home**.
|
||||
|
||||
## Editor Block
|
||||
|
||||
In the post or page editor, select **Add block**, search for **OI Contest Schedule**, and insert the block. Use the block settings sidebar to choose how many contests to display (1-50) and whether to use the compact layout.
|
||||
In the post or page editor, select **Add block**, search for **vblg OI Contest Schedule**, and insert the block. Use the block settings sidebar to choose how many contests to display (1-50) and whether to use the compact layout.
|
||||
|
||||
The block is rendered dynamically, so contest data remains current without editing the post.
|
||||
|
||||
@@ -90,7 +90,7 @@ The plugin has no Composer or npm dependencies. To build an installable archive,
|
||||
./build.sh build
|
||||
```
|
||||
|
||||
The command validates translations and package contents, then creates `oi-contest-schedule-<version>.zip` in the repository root. To remove local build artifacts, run:
|
||||
The command validates translations and package contents, then creates `vblg-oi-contest-schedule-<version>.zip` in the repository root. The packaged archive does not include the `languages/` directory. To remove local build artifacts, run:
|
||||
|
||||
```bash
|
||||
./build.sh clean
|
||||
@@ -99,10 +99,10 @@ The command validates translations and package contents, then creates `oi-contes
|
||||
## Project Structure
|
||||
|
||||
```text
|
||||
oi-contest-schedule.php Plugin bootstrap and metadata
|
||||
vblg-oi-contest-schedule.php Plugin bootstrap and metadata
|
||||
includes/ Data client, renderer, and plugin integration
|
||||
assets/ Frontend styles and countdown script
|
||||
languages/ Translation template and Chinese translation
|
||||
languages/ Translation template and Chinese translation (not packaged)
|
||||
uninstall.php Cache cleanup on uninstall
|
||||
build.sh Release package builder
|
||||
```
|
||||
|
||||
+8
-8
@@ -1,8 +1,8 @@
|
||||
# OI Contest Schedule
|
||||
# vblg OI Contest Schedule
|
||||
|
||||
[English](README.md)
|
||||
|
||||
OI Contest Schedule 是一款轻量级 WordPress 插件,可在 WordPress 仪表盘、文章或页面中展示正在进行和即将开始的程序设计竞赛,不显示已结束的赛事。
|
||||
vblg OI Contest Schedule 是一款轻量级 WordPress 插件,可在 WordPress 仪表盘、文章或页面中展示正在进行和即将开始的程序设计竞赛,不显示已结束的赛事。
|
||||
|
||||
比赛数据由 [OI-contest-fetch](https://github.com/hanyixuanten/OI-contest-fetch) 提供,时间会根据访客客户端设备的时区显示,而非 WordPress 中设置的站点时区。日程中会标明客户端时区的 IANA 名称,例如 `Asia/Shanghai`。
|
||||
|
||||
@@ -27,14 +27,14 @@ OI Contest Schedule 是一款轻量级 WordPress 插件,可在 WordPress 仪
|
||||
|
||||
### 安装发行包
|
||||
|
||||
1. 从仓库的 [Releases](https://github.com/hanyixuanten/oi-contest-schedule/releases) 页面下载最新的插件 ZIP 包。
|
||||
1. 从仓库的 [Releases](https://github.com/hanyixuanten/vblg-oi-contest-schedule/releases) 页面下载最新的插件 ZIP 包。
|
||||
2. 在 WordPress 后台进入 **插件 > 安装插件 > 上传插件**。
|
||||
3. 选择 ZIP 文件,然后安装并启用插件。
|
||||
|
||||
### 从源码安装
|
||||
|
||||
1. 将本仓库复制或克隆到 `wp-content/plugins/oi-contest-schedule`。
|
||||
2. 在 WordPress 后台的 **插件** 页面启用 **OI Contest Schedule**。
|
||||
1. 将本仓库复制或克隆到 `wp-content/plugins/vblg-oi-contest-schedule`。
|
||||
2. 在 WordPress 后台的 **插件** 页面启用 **vblg OI Contest Schedule**。
|
||||
|
||||
启用后,赛事小组件会自动显示在 **仪表盘 > 首页** 中。
|
||||
|
||||
@@ -90,7 +90,7 @@ add_filter(
|
||||
./build.sh build
|
||||
```
|
||||
|
||||
该命令会检查翻译和安装包内容,并在仓库根目录生成 `oi-contest-schedule-<版本>.zip`。清理本地构建产物可运行:
|
||||
该命令会检查翻译和安装包内容,并在仓库根目录生成 `vblg-oi-contest-schedule-<版本>.zip`。生成的安装包不包含 `languages/` 目录。清理本地构建产物可运行:
|
||||
|
||||
```bash
|
||||
./build.sh clean
|
||||
@@ -99,10 +99,10 @@ add_filter(
|
||||
## 项目结构
|
||||
|
||||
```text
|
||||
oi-contest-schedule.php 插件入口与元数据
|
||||
vblg-oi-contest-schedule.php 插件入口与元数据
|
||||
includes/ 数据客户端、渲染器和插件集成
|
||||
assets/ 前端样式与倒计时脚本
|
||||
languages/ 翻译模板与中文翻译
|
||||
languages/ 翻译模板与中文翻译(不打包)
|
||||
uninstall.php 卸载时清理缓存
|
||||
build.sh 发布包构建脚本
|
||||
```
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
set -eu
|
||||
|
||||
plugin_slug="oi-contest-schedule"
|
||||
plugin_slug="vblg-oi-contest-schedule"
|
||||
plugin_file="${plugin_slug}.php"
|
||||
script_dir="$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd)"
|
||||
build_dir="${script_dir}/build"
|
||||
@@ -34,23 +34,17 @@ build() {
|
||||
"${plugin_dir}/"
|
||||
cp -R "${script_dir}/includes" "${plugin_dir}/"
|
||||
cp -R "${script_dir}/assets" "${plugin_dir}/"
|
||||
mkdir -p "${plugin_dir}/languages"
|
||||
cp "${script_dir}/languages/${plugin_slug}.pot" \
|
||||
"${script_dir}/languages/${plugin_slug}-zh_CN.po" \
|
||||
"${plugin_dir}/languages/"
|
||||
msgfmt --check --check-format \
|
||||
--output-file="${plugin_dir}/languages/${plugin_slug}-zh_CN.mo" \
|
||||
msgfmt --check --check-format --output-file=/dev/null \
|
||||
"${script_dir}/languages/${plugin_slug}-zh_CN.po"
|
||||
(
|
||||
cd "${build_dir}"
|
||||
zip -qr "${archive_path}" "${plugin_slug}"
|
||||
)
|
||||
|
||||
unzip -p "${archive_path}" "${plugin_slug}/${plugin_file}" | grep -q '^ \* Plugin Name: OI Contest Schedule$'
|
||||
unzip -p "${archive_path}" "${plugin_slug}/${plugin_file}" | grep -q '^ \* Plugin Name: vblg OI Contest Schedule$'
|
||||
unzip -p "${archive_path}" "${plugin_slug}/readme.txt" | grep -q "^Stable tag: ${version}$"
|
||||
unzip -Z1 "${archive_path}" | grep -q "^${plugin_slug}/languages/${plugin_slug}-zh_CN.mo$"
|
||||
if unzip -Z1 "${archive_path}" | grep -q '/wp-plugins-.*\.po$'; then
|
||||
printf 'Unexpected GlotPress submission file found in archive.\n' >&2
|
||||
if unzip -Z1 "${archive_path}" | grep -q "^${plugin_slug}/languages/"; then
|
||||
printf 'Unexpected languages directory found in archive.\n' >&2
|
||||
exit 1
|
||||
fi
|
||||
unzip -Z1 "${archive_path}" | grep -q "^${plugin_slug}/includes/class-contest-client.php$"
|
||||
|
||||
@@ -17,7 +17,7 @@ final class OICS_Contest_Client {
|
||||
apply_filters( 'oics_contest_data_url', self::DATA_URL ),
|
||||
array(
|
||||
'timeout' => 10,
|
||||
'user-agent' => 'OI Contest Schedule/' . OICS_VERSION . '; ' . home_url( '/' ),
|
||||
'user-agent' => 'vblg OI Contest Schedule/' . OICS_VERSION . '; ' . home_url( '/' ),
|
||||
)
|
||||
);
|
||||
|
||||
@@ -26,12 +26,12 @@ final class OICS_Contest_Client {
|
||||
}
|
||||
|
||||
if ( 200 !== wp_remote_retrieve_response_code( $response ) ) {
|
||||
return new WP_Error( 'oics_http_error', __( 'The contest data source returned an unexpected response.', 'oi-contest-schedule' ) );
|
||||
return new WP_Error( 'oics_http_error', __( 'The contest data source returned an unexpected response.', 'vblg-oi-contest-schedule' ) );
|
||||
}
|
||||
|
||||
$payload = json_decode( wp_remote_retrieve_body( $response ), true );
|
||||
if ( ! $this->is_valid_payload( $payload ) ) {
|
||||
return new WP_Error( 'oics_invalid_payload', __( 'The contest data source returned invalid data.', 'oi-contest-schedule' ) );
|
||||
return new WP_Error( 'oics_invalid_payload', __( 'The contest data source returned invalid data.', 'vblg-oi-contest-schedule' ) );
|
||||
}
|
||||
|
||||
$normalized = array(
|
||||
|
||||
+12
-12
@@ -37,11 +37,11 @@ final class OICS_Plugin {
|
||||
'oics-schedule-editor',
|
||||
'oicsScheduleEditorL10n',
|
||||
array(
|
||||
'title' => __( 'OI Contest Schedule', 'oi-contest-schedule' ),
|
||||
'description' => __( 'Display upcoming OI contests with local times and live countdowns.', 'oi-contest-schedule' ),
|
||||
'settings' => __( 'Schedule settings', 'oi-contest-schedule' ),
|
||||
'limit' => __( 'Number of contests', 'oi-contest-schedule' ),
|
||||
'compact' => __( 'Compact layout', 'oi-contest-schedule' ),
|
||||
'title' => __( 'vblg OI Contest Schedule', 'vblg-oi-contest-schedule' ),
|
||||
'description' => __( 'Display upcoming OI contests with local times and live countdowns.', 'vblg-oi-contest-schedule' ),
|
||||
'settings' => __( 'Schedule settings', 'vblg-oi-contest-schedule' ),
|
||||
'limit' => __( 'Number of contests', 'vblg-oi-contest-schedule' ),
|
||||
'compact' => __( 'Compact layout', 'vblg-oi-contest-schedule' ),
|
||||
)
|
||||
);
|
||||
|
||||
@@ -77,12 +77,12 @@ final class OICS_Plugin {
|
||||
'oics-schedule',
|
||||
'oicsScheduleL10n',
|
||||
array(
|
||||
'running' => __( 'Running', 'oi-contest-schedule' ),
|
||||
'ended' => __( 'Ended', 'oi-contest-schedule' ),
|
||||
'day' => __( 'd', 'oi-contest-schedule' ),
|
||||
'hour' => __( 'h', 'oi-contest-schedule' ),
|
||||
'minute' => __( 'm', 'oi-contest-schedule' ),
|
||||
'second' => __( 's', 'oi-contest-schedule' ),
|
||||
'running' => __( 'Running', 'vblg-oi-contest-schedule' ),
|
||||
'ended' => __( 'Ended', 'vblg-oi-contest-schedule' ),
|
||||
'day' => __( 'd', 'vblg-oi-contest-schedule' ),
|
||||
'hour' => __( 'h', 'vblg-oi-contest-schedule' ),
|
||||
'minute' => __( 'm', 'vblg-oi-contest-schedule' ),
|
||||
'second' => __( 's', 'vblg-oi-contest-schedule' ),
|
||||
)
|
||||
);
|
||||
}
|
||||
@@ -113,7 +113,7 @@ final class OICS_Plugin {
|
||||
public function register_dashboard_widget() {
|
||||
wp_add_dashboard_widget(
|
||||
'oics_contest_schedule',
|
||||
esc_html__( 'Upcoming OI Contests', 'oi-contest-schedule' ),
|
||||
esc_html__( 'Upcoming OI Contests', 'vblg-oi-contest-schedule' ),
|
||||
array( $this, 'render_dashboard_widget' )
|
||||
);
|
||||
}
|
||||
|
||||
@@ -12,12 +12,12 @@ final class OICS_Schedule_Renderer {
|
||||
public function render( $limit = 10, $compact = false ) {
|
||||
$payload = $this->client->get_payload();
|
||||
if ( is_wp_error( $payload ) ) {
|
||||
return $this->render_notice( __( 'Contest data is temporarily unavailable. Please try again later.', 'oi-contest-schedule' ), 'error' );
|
||||
return $this->render_notice( __( 'Contest data is temporarily unavailable. Please try again later.', 'vblg-oi-contest-schedule' ), 'error' );
|
||||
}
|
||||
|
||||
$contests = array_slice( $payload['contests'], 0, $limit );
|
||||
if ( empty( $contests ) ) {
|
||||
return $this->render_notice( __( 'No upcoming contests.', 'oi-contest-schedule' ), 'empty' );
|
||||
return $this->render_notice( __( 'No upcoming contests.', 'vblg-oi-contest-schedule' ), 'empty' );
|
||||
}
|
||||
|
||||
$classes = 'oics-schedule';
|
||||
@@ -30,13 +30,13 @@ final class OICS_Schedule_Renderer {
|
||||
<div class="<?php echo esc_attr( $classes ); ?>" data-oics-schedule>
|
||||
<div class="oics-schedule__header">
|
||||
<div>
|
||||
<h2 class="oics-schedule__heading"><?php esc_html_e( 'Upcoming OI Contests', 'oi-contest-schedule' ); ?></h2>
|
||||
<h2 class="oics-schedule__heading"><?php esc_html_e( 'Upcoming OI Contests', 'vblg-oi-contest-schedule' ); ?></h2>
|
||||
<p class="oics-schedule__meta">
|
||||
<?php esc_html_e( 'Device time zone', 'oi-contest-schedule' ); ?>:
|
||||
<?php esc_html_e( 'Device time zone', 'vblg-oi-contest-schedule' ); ?>:
|
||||
<span data-oics-time-zone>UTC</span>
|
||||
</p>
|
||||
</div>
|
||||
<span class="oics-schedule__count"><?php echo esc_html( sprintf( _n( '%d contest', '%d contests', count( $contests ), 'oi-contest-schedule' ), count( $contests ) ) ); ?></span>
|
||||
<span class="oics-schedule__count"><?php echo esc_html( sprintf( _n( '%d contest', '%d contests', count( $contests ), 'vblg-oi-contest-schedule' ), count( $contests ) ) ); ?></span>
|
||||
</div>
|
||||
<div class="oics-schedule__list">
|
||||
<?php foreach ( $contests as $contest ) : ?>
|
||||
@@ -45,7 +45,7 @@ final class OICS_Schedule_Renderer {
|
||||
</div>
|
||||
<?php if ( ! empty( $payload['generated_at'] ) ) : ?>
|
||||
<p class="oics-schedule__updated">
|
||||
<?php esc_html_e( 'Data updated', 'oi-contest-schedule' ); ?>:
|
||||
<?php esc_html_e( 'Data updated', 'vblg-oi-contest-schedule' ); ?>:
|
||||
<time data-oics-time="<?php echo esc_attr( $payload['generated_at'] ); ?>" data-oics-seconds></time>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
@@ -69,7 +69,7 @@ final class OICS_Schedule_Renderer {
|
||||
</span>
|
||||
</span>
|
||||
<span class="oics-contest__countdown" data-oics-start="<?php echo esc_attr( $contest['start_time'] ); ?>" data-oics-end="<?php echo esc_attr( $contest['end_time'] ); ?>">
|
||||
<?php echo 'running' === $contest['status'] ? esc_html__( 'Running', 'oi-contest-schedule' ) : esc_html__( 'Upcoming', 'oi-contest-schedule' ); ?>
|
||||
<?php echo 'running' === $contest['status'] ? esc_html__( 'Running', 'vblg-oi-contest-schedule' ) : esc_html__( 'Upcoming', 'vblg-oi-contest-schedule' ); ?>
|
||||
</span>
|
||||
</a>
|
||||
<?php
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OI Contest Schedule 0.1.0\n"
|
||||
"Project-Id-Version: vblg OI Contest Schedule 0.1.0\n"
|
||||
"Report-Msgid-Bugs-To: https://github.com/hanyixuanten/OI-contest-fetch/issues\n"
|
||||
"POT-Creation-Date: 2026-08-06 00:00+0000\n"
|
||||
"PO-Revision-Date: 2026-08-06 00:00+0000\n"
|
||||
@@ -11,12 +11,12 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Domain: oi-contest-schedule\n"
|
||||
"X-Domain: vblg-oi-contest-schedule\n"
|
||||
|
||||
msgid "Upcoming OI Contests"
|
||||
msgstr "即将到来的 OI 赛事"
|
||||
|
||||
msgid "OI Contest Schedule"
|
||||
msgid "vblg OI Contest Schedule"
|
||||
msgstr "OI 赛事日程"
|
||||
|
||||
msgid "Display upcoming OI contests with local times and live countdowns."
|
||||
@@ -1,17 +1,17 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OI Contest Schedule 0.1.0\n"
|
||||
"Project-Id-Version: vblg OI Contest Schedule 0.1.0\n"
|
||||
"Report-Msgid-Bugs-To: https://github.com/hanyixuanten/OI-contest-fetch/issues\n"
|
||||
"POT-Creation-Date: 2026-08-06 00:00+0000\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Domain: oi-contest-schedule\n"
|
||||
"X-Domain: vblg-oi-contest-schedule\n"
|
||||
|
||||
msgid "Upcoming OI Contests"
|
||||
msgstr ""
|
||||
|
||||
msgid "OI Contest Schedule"
|
||||
msgid "vblg OI Contest Schedule"
|
||||
msgstr ""
|
||||
|
||||
msgid "Display upcoming OI contests with local times and live countdowns."
|
||||
+8
-8
@@ -1,4 +1,4 @@
|
||||
=== OI Contest Schedule ===
|
||||
=== vblg OI Contest Schedule ===
|
||||
Contributors: hanyixuanten
|
||||
Tags: contest, schedule, block, dashboard, competitive programming
|
||||
Requires at least: 6.4
|
||||
@@ -12,9 +12,9 @@ Display currently running and upcoming OI contests in the WordPress dashboard or
|
||||
|
||||
== Description ==
|
||||
|
||||
OI Contest Schedule displays currently running and upcoming competitive programming contests with local times and live countdowns. Contests that have ended are not displayed.
|
||||
vblg OI Contest Schedule displays currently running and upcoming competitive programming contests with local times and live countdowns. Contests that have ended are not displayed.
|
||||
|
||||
The plugin adds an **Upcoming OI Contests** widget to the WordPress dashboard. To display the schedule on the front end, add the **OI Contest Schedule** block to a post or page.
|
||||
The plugin adds an **Upcoming OI Contests** widget to the WordPress dashboard. To display the schedule on the front end, add the **vblg OI Contest Schedule** block to a post or page.
|
||||
|
||||
Features include:
|
||||
|
||||
@@ -27,7 +27,7 @@ Features include:
|
||||
|
||||
= Block settings =
|
||||
|
||||
Add the **OI Contest Schedule** block from the block inserter. Its settings sidebar lets you display between 1 and 50 contests and enable the compact layout. The block is rendered dynamically so it always uses current contest data.
|
||||
Add the **vblg OI Contest Schedule** block from the block inserter. Its settings sidebar lets you display between 1 and 50 contests and enable the compact layout. The block is rendered dynamically so it always uses current contest data.
|
||||
|
||||
= Shortcode options =
|
||||
|
||||
@@ -45,10 +45,10 @@ Set `compact` to `true` to use the compact layout:
|
||||
|
||||
== Installation ==
|
||||
|
||||
1. Upload the `oi-contest-schedule` directory to `/wp-content/plugins/`, or install the plugin ZIP through the WordPress Plugins screen.
|
||||
2. Activate **OI Contest Schedule** through the Plugins screen.
|
||||
1. Upload the `vblg-oi-contest-schedule` directory to `/wp-content/plugins/`, or install the plugin ZIP through the WordPress Plugins screen.
|
||||
2. Activate **vblg OI Contest Schedule** through the Plugins screen.
|
||||
3. Open the WordPress dashboard to see the contest widget.
|
||||
4. To show the schedule on the front end, add the **OI Contest Schedule** block to a post or page.
|
||||
4. To show the schedule on the front end, add the **vblg OI Contest Schedule** block to a post or page.
|
||||
|
||||
== Frequently Asked Questions ==
|
||||
|
||||
@@ -90,7 +90,7 @@ Service and data source:
|
||||
= 0.1.0 =
|
||||
|
||||
* Added the upcoming contest dashboard widget.
|
||||
* Added the **OI Contest Schedule** editor block with limit and compact layout settings.
|
||||
* 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 visitor-local time formatting and live countdowns.
|
||||
* Added platform styling and responsive layouts.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Plugin Name: OI Contest Schedule
|
||||
* Plugin Name: vblg OI Contest Schedule
|
||||
* Plugin URI: https://github.com/hanyixuanten/oi-contest-schedule
|
||||
* Description: Display upcoming OI contests in a dashboard widget or with an editor block.
|
||||
* Version: 0.1.0
|
||||
@@ -10,8 +10,7 @@
|
||||
* Author URI: https://www.vblg.top
|
||||
* License: GPL-3.0-only
|
||||
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
||||
* Text Domain: oi-contest-schedule
|
||||
* Domain Path: /languages
|
||||
* Text Domain: vblg-oi-contest-schedule
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
@@ -25,9 +24,4 @@ require_once OICS_PATH . 'includes/class-contest-client.php';
|
||||
require_once OICS_PATH . 'includes/class-schedule-renderer.php';
|
||||
require_once OICS_PATH . 'includes/class-plugin.php';
|
||||
|
||||
function oics_load_textdomain() {
|
||||
load_plugin_textdomain( 'oi-contest-schedule', false, dirname( plugin_basename( OICS_FILE ) ) . '/languages' );
|
||||
}
|
||||
|
||||
add_action( 'init', 'oics_load_textdomain' );
|
||||
add_action( 'plugins_loaded', array( 'OICS_Plugin', 'instance' ) );
|
||||
Reference in New Issue
Block a user