Compare commits
4 Commits
849d7a89fd
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| d8afed24d5 | |||
| fa672eb78f | |||
| ff5d4df930 | |||
| 38b18e7150 |
@@ -15,8 +15,8 @@ if ( ! class_exists( 'conv_protection_txt' ) ) {
|
|||||||
|
|
||||||
public function add_pages() {
|
public function add_pages() {
|
||||||
add_menu_page(
|
add_menu_page(
|
||||||
'限定公開ページテキストカスタマイズ',
|
'Convert Protection Text',
|
||||||
'限定公開ページテキストカスタマイズ',
|
'Convert Protection Text',
|
||||||
'level_8',
|
'level_8',
|
||||||
__FILE__,
|
__FILE__,
|
||||||
array(
|
array(
|
||||||
@@ -27,7 +27,7 @@ if ( ! class_exists( 'conv_protection_txt' ) ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function show_text_option_page() {
|
public function show_text_option_page() {
|
||||||
$update_option = filter_input( INPUT_POST, 'conv_protection_options', FILTER_SANITIZE_STRING, FILTER_REQUIRE_ARRAY );
|
$update_option = filter_input( INPUT_POST, 'conv_protection_options', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY );
|
||||||
if ( ! empty( $update_option ) ) {
|
if ( ! empty( $update_option ) ) {
|
||||||
check_admin_referer( 'conv_options' );
|
check_admin_referer( 'conv_options' );
|
||||||
update_option( 'conv_protection_options', $update_option );
|
update_option( 'conv_protection_options', $update_option );
|
||||||
@@ -48,17 +48,17 @@ if ( ! class_exists( 'conv_protection_txt' ) ) {
|
|||||||
//パスワード保護時のメッセージ
|
//パスワード保護時のメッセージ
|
||||||
public function protect_password_form( $form_text ): string {
|
public function protect_password_form( $form_text ): string {
|
||||||
$opt = get_option( 'conv_protection_options' );
|
$opt = get_option( 'conv_protection_options' );
|
||||||
if ( isset( $opt['text'] ) && ! empty( $opt['text'] ) ) {
|
if (! empty( $opt['text'] )) {
|
||||||
$alert_text = $opt['text'];
|
$alert_text = $opt['text'];
|
||||||
} else {
|
} else {
|
||||||
$alert_text = conv_protection_txt_settings::ALERT_TEXT;
|
$alert_text = conv_protection_txt_settings::ALERT_TEXT;
|
||||||
}
|
}
|
||||||
if ( isset( $opt['label'] ) && ! empty( $opt['label'] ) ) {
|
if (! empty( $opt['label'] )) {
|
||||||
$btn_label = $opt['label'] . ' : ';
|
$btn_label = $opt['label'] . ' : ';
|
||||||
} else {
|
} else {
|
||||||
$btn_label = conv_protection_txt_settings::BTN_LABEL . ' : ';
|
$btn_label = conv_protection_txt_settings::BTN_LABEL . ' : ';
|
||||||
}
|
}
|
||||||
if ( isset( $opt['btn'] ) && ! empty( $opt['btn'] ) ) {
|
if (! empty( $opt['btn'] )) {
|
||||||
$btn_text = $opt['btn'];
|
$btn_text = $opt['btn'];
|
||||||
} else {
|
} else {
|
||||||
$btn_text = conv_protection_txt_settings::BTN_TEXT;
|
$btn_text = conv_protection_txt_settings::BTN_TEXT;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ Plugin URI: https://develop.n-k-y.net/wordpress/convert-protection-text
|
|||||||
Author: NBK45
|
Author: NBK45
|
||||||
Author URI: https://develop.n-k-y.net
|
Author URI: https://develop.n-k-y.net
|
||||||
Description: Convert Protection Text はWordPressで記事(ページ)の公開状態を限定公開(「パスワード保護」)にしたときのテキストをカスタマイズするプラグインです。
|
Description: Convert Protection Text はWordPressで記事(ページ)の公開状態を限定公開(「パスワード保護」)にしたときのテキストをカスタマイズするプラグインです。
|
||||||
Version: 1.0.1
|
Version: 1.0.2
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
+11
-6
@@ -1,10 +1,10 @@
|
|||||||
=== Convert Protection Text ===
|
=== Convert Protection Text ===
|
||||||
Contributors: NBK45
|
Contributors: NBK45
|
||||||
Tags: password protected
|
Tags: password protected
|
||||||
Requires at least: 4.9
|
Requires at least: 6.7
|
||||||
Tested up to: 6.6
|
Tested up to: 6.9
|
||||||
Requires PHP: 7.4
|
Requires PHP: 8.3
|
||||||
Stable tag: 1.0.1
|
Stable tag: 1.0.2
|
||||||
License: GPLv2 or later
|
License: GPLv2 or later
|
||||||
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
|
||||||
@@ -48,10 +48,15 @@ WordPressで記事(ページ)の限定公開(「パスワード保護」
|
|||||||
== Screenshots ==
|
== Screenshots ==
|
||||||
|
|
||||||
screenshot-1.png
|
screenshot-1.png
|
||||||
|
screenshot-2.png
|
||||||
|
screenshot-3.png
|
||||||
|
|
||||||
== Changelog ==
|
== Changelog ==
|
||||||
= 1.0.0 =
|
= 1.0.2 =
|
||||||
|
・WordPress6.9動作確認
|
||||||
|
・PHP8.3対応修正
|
||||||
|
|
||||||
|
= 1.0.1 =
|
||||||
初回リリース
|
初回リリース
|
||||||
|
|
||||||
== Upgrade Notice ==
|
== Upgrade Notice ==
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||||||
} // Exit if accessed directly
|
} // Exit if accessed directly
|
||||||
?>
|
?>
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<h2>限定公開ページテキストカスタマイズ</h2>
|
<h2>Convert Protection Text - 限定公開ページテキストカスタマイズ</h2>
|
||||||
<form action="" method="post">
|
<form action="" method="post">
|
||||||
<?php
|
<?php
|
||||||
wp_nonce_field( 'conv_options' );
|
wp_nonce_field( 'conv_options' );
|
||||||
|
|||||||
Reference in New Issue
Block a user