Changeset 3058080
- Timestamp:
- 03/25/2024 08:49:47 AM (4 months ago)
- Location:
- site-toolkit
- Files:
-
- 39 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
site-toolkit/trunk/.wp-env.json
r2993746 r3058080 18 18 "WP_DEBUG_LOG": true, 19 19 "WP_DEBUG_DISPLAY": false, 20 "SCRIPT_DEBUG": true 20 "SCRIPT_DEBUG": true, 21 "ALTERNATE_WP_CRON": true 21 22 } 22 23 } -
site-toolkit/trunk/composer.json
r2993746 r3058080 19 19 "wptrt/wpthemereview": "^0.2.1", 20 20 "php-parallel-lint/php-parallel-lint": "^1.3.2", 21 "wp-cli/i18n-command": "^2. 4.1",21 "wp-cli/i18n-command": "^2..1", 22 22 "wpreadme2markdown/wp2md": "^4.0.2" 23 23 }, -
site-toolkit/trunk/package.json
r2942395 r3058080 1 1 { 2 2 "devDependencies": { 3 "@wordpress/env": "^ 8.4.0"3 "@wordpress/env": "^.0" 4 4 } 5 5 } -
site-toolkit/trunk/phpcs.xml.dist
r2845968 r3058080 1 1 <?xml version="1.0"?> 2 <ruleset name="WordPress Theme Coding Standards"> 3 <!-- See https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml --> 4 <!-- See https://github.com/WordPress/WordPress-Coding-Standards --> 5 <!-- See https://github.com/WPTRT/WPThemeReview --> 6 <!-- See https://github.com/PHPCompatibility/PHPCompatibilityWP --> 2 <ruleset name="WordPress Plugin Coding Standards"> 7 3 8 <!-- Set a description for this ruleset. --> 9 <description>A custom set of code standard rules to check for WordPress themes.</description> 4 <description>A custom set of code standard rules to check for WordPress plugins.</description> 10 5 6 7 8 9 11 10 12 <!-- 13 ############################################################################# 14 COMMAND LINE ARGUMENTS 15 https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml 16 ############################################################################# 17 --> 18 19 <!-- Pass some flags to PHPCS: 20 p flag: Show progress of the run. 21 s flag: Show sniff codes in all reports. 22 --> 23 <arg value="ps"/> 24 25 <!-- Strip the filepaths down to the relevant bit. --> 26 <arg name="basepath" value="./"/> 27 28 <!-- Check up to 8 files simultaneously. --> 29 <arg name="parallel" value="8"/> 30 31 <!-- Check PHP files only. JavaScript and CSS files are checked separately using the @wordpress/scripts package. --> 32 <arg name="extensions" value="php"/> 33 34 <!-- Check all files in this directory and the directories below it. --> 35 <file>.</file> 36 37 <!-- Exclude patterns. --> 38 <exclude-pattern>/vendor/*</exclude-pattern> 39 <exclude-pattern>/node_modules/*</exclude-pattern> 40 41 42 <!-- 43 ############################################################################# 44 USE THE WordPress AND THE Theme Review RULESET 45 ############################################################################# 46 --> 11 <arg value="sp"/> 12 <arg name="basepath" value="."/> 13 <arg name="colors"/> 14 <arg name="extensions" value="php"/> 15 <arg name="parallel" value="50"/> 47 16 48 17 <rule ref="WordPress"> 49 <!-- This rule does not apply here since the _s prefix should be changed by the theme author. -->50 18 <exclude name="WordPress.NamingConventions.PrefixAllGlobals.ShortPrefixPassed"/> 51 19 </rule> 52 <rule ref="WPThemeReview"/>53 20 54 <!-- 55 ############################################################################# 56 SNIFF SPECIFIC CONFIGURATION 57 ############################################################################# 58 --> 21 <arg name="cache" value="./phpcs.cache"/> 59 22 60 <!-- Verify that the text_domain is set to the desired text-domain. 61 Multiple valid text domains can be provided as a comma-delimited list. --> 23 <rule ref="WordPress-Docs"/> 24 62 25 <rule ref="WordPress.WP.I18n"> 63 26 <properties> 64 <property name="text_domain" type="array" value=" site-toolkit"/>27 <property name="text_domain" type="array" value=""/> 65 28 </properties> 66 29 </rule> 67 30 68 <!-- Removes check for deregister jquery. -->69 <rule ref="WPThemeReview.CoreFunctionality.NoDeregisterCoreScript">70 <severity>0</severity>71 </rule>72 73 <!-- Allow for theme specific exceptions to the file name rules based74 on the theme hierarchy. -->75 <rule ref="WordPress.Files.FileName">76 <properties>77 <property name="is_theme" value="false"/>78 </properties>79 </rule>80 81 <!-- Set the minimum supported WP version. This is used by several sniffs.82 The minimum version set here should be in line with the minimum WP version83 as set in the "Requires at least" tag in the readme.txt file. -->84 31 <config name="minimum_supported_wp_version" value="5.9"/> 85 32 86 33 <rule ref="WordPress.Arrays.MultipleStatementAlignment"> 87 34 <properties> 88 <!-- No need to adjust alignment of large arrays when the item with the largest key is removed. -->89 35 <property name="exact" value="false"/> 90 <!-- Don't align multi-line items if ALL items in the array are multi-line. -->91 36 <property name="alignMultilineItems" value="!=100"/> 92 <!-- Array assignment operator should always be on the same line as the array key. -->93 37 <property name="ignoreNewlines" value="false"/> 94 38 </properties> 95 39 </rule> 96 40 97 <!-- Verify that everything in the global namespace is prefixed with a theme specific prefix. 98 Multiple valid prefixes can be provided as a comma-delimited list. --> 99 <rule ref="WordPress.NamingConventions.PrefixAllGlobals"> 100 <properties> 101 <property name="prefixes" type="array" value="_s" /> 102 </properties> 41 <config name="testVersion" value="7.4-"/> 42 <rule ref="PHPCompatibility"> 43 <exclude name="PHPCompatibility.PHP.NewConstants.t_finallyFound"/> 44 <exclude name="PHPCompatibility.PHP.NewConstants.t_yieldFound"/> 45 <exclude name="PHPCompatibility.PHP.NewConstants.t_ellipsisFound"/> 46 <exclude name="PHPCompatibility.PHP.NewConstants.t_powFound"/> 47 <exclude name="PHPCompatibility.PHP.NewConstants.t_pow_equalFound"/> 48 <exclude name="PHPCompatibility.PHP.NewConstants.t_spaceshipFound"/> 49 <exclude name="PHPCompatibility.PHP.NewConstants.t_coalesceFound"/> 50 <exclude name="PHPCompatibility.PHP.NewConstants.t_coalesce_equalFound"/> 51 <exclude name="PHPCompatibility.PHP.NewConstants.t_yield_fromFound"/> 52 <exclude name="PHPCompatibility.PHP.NewConstants.t_traitFound"/> 53 <exclude name="PHPCompatibility.Operators.NewOperators.t_coalesceFound"/> 54 <exclude name="PHPCompatibility.FunctionUse.NewFunctions.array_columnFound"/> 103 55 </rule> 104 56 105 106 <!--107 #############################################################################108 USE THE PHPCompatibility RULESET109 #############################################################################110 -->111 112 <config name="testVersion" value="7.4-"/>113 <rule ref="PHPCompatibilityWP"/>114 115 57 </ruleset> -
site-toolkit/trunk/readme.txt
r2993746 r3058080 4 4 Tags: archives,columns,emoji,header,tools,widgets 5 5 Requires at least: 5.9 6 Tested up to: 6. 46 Tested up to: 6. 7 7 Requires PHP: 7.4 8 Stable tag: 1.0. 38 Stable tag: 1.0. 9 9 License: GPLv3 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 77 77 == Changelog == 78 78 79 80 81 82 79 83 = 1.0.3 = 80 84 * Tested up to 6.4 -
site-toolkit/trunk/site-toolkit.php
r2993746 r3058080 14 14 * Plugin URI: https://wordpress.org/plugins/site-toolkit/ 15 15 * Description: Sets of tools for WordPress admin and frontend. 16 * Version: 1.0. 316 * Version: 1.0. 17 17 * Requires at least: 5.9 18 18 * Requires PHP: 7.4 -
site-toolkit/trunk/toolkit/admin/class-site-toolkit-options-page.php
r2993746 r3058080 181 181 <p><strong><?php echo esc_html( $text ); ?></strong></p> 182 182 <button type="button" class="notice-dismiss"> 183 <span class="screen-reader-text"><?php _e( 'Dismiss this notice.', 'site-toolkit' ); ?></span>183 <span class="screen-reader-text"><?php _e( 'Dismiss this notice.', 'site-toolkit' ); ?></span> 184 184 </button> 185 185 </div> … … 217 217 <h2 class="nav-tab-wrapper"> 218 218 <a href="?page=stk-settings&tab=general_options" 219 class="nav-tab <?php echo 'general_options' === $active_tab ? 'nav-tab-active' : ''; ?>"><?php _e( 'Header', 'site-toolkit' ); ?></a>219 class="nav-tab <?php echo 'general_options' === $active_tab ? 'nav-tab-active' : ''; ?>"><?php _e( 'Header', 'site-toolkit' ); ?></a> 220 220 <a href="?page=stk-settings&tab=seo_options" 221 class="nav-tab <?php echo 'seo_options' === $active_tab ? 'nav-tab-active' : ''; ?>"><?php _e( 'SEO', 'site-toolkit' ); ?></a>221 class="nav-tab <?php echo 'seo_options' === $active_tab ? 'nav-tab-active' : ''; ?>"><?php _e( 'SEO', 'site-toolkit' ); ?></a> 222 222 <a href="?page=stk-settings&tab=archives_options" 223 class="nav-tab <?php echo 'archives_options' === $active_tab ? 'nav-tab-active' : ''; ?>"><?php _e( 'Archives', 'site-toolkit' ); ?></a>223 class="nav-tab <?php echo 'archives_options' === $active_tab ? 'nav-tab-active' : ''; ?>"><?php _e( 'Archives', 'site-toolkit' ); ?></a> 224 224 <a href="?page=stk-settings&tab=dashboard_options" 225 class="nav-tab <?php echo 'dashboard_options' === $active_tab ? 'nav-tab-active' : ''; ?>"><?php _e( 'Dashboard', 'site-toolkit' ); ?></a>225 class="nav-tab <?php echo 'dashboard_options' === $active_tab ? 'nav-tab-active' : ''; ?>"><?php _e( 'Dashboard', 'site-toolkit' ); ?></a> 226 226 <a href="?page=stk-settings&tab=listing_options" 227 class="nav-tab <?php echo 'listing_options' === $active_tab ? 'nav-tab-active' : ''; ?>"><?php _e( 'Listing', 'site-toolkit' ); ?></a>227 class="nav-tab <?php echo 'listing_options' === $active_tab ? 'nav-tab-active' : ''; ?>"><?php _e( 'Listing', 'site-toolkit' ); ?></a> 228 228 <a href="?page=stk-settings&tab=login_options" 229 class="nav-tab <?php echo 'login_options' === $active_tab ? 'nav-tab-active' : ''; ?>"><?php _e( 'Login', 'site-toolkit' ); ?></a>229 class="nav-tab <?php echo 'login_options' === $active_tab ? 'nav-tab-active' : ''; ?>"><?php _e( 'Login', 'site-toolkit' ); ?></a> 230 230 <a href="?page=stk-settings&tab=uploads_options" 231 class="nav-tab <?php echo 'uploads_options' === $active_tab ? 'nav-tab-active' : ''; ?>"><?php _e( 'Uploads', 'site-toolkit' ); ?></a>231 class="nav-tab <?php echo 'uploads_options' === $active_tab ? 'nav-tab-active' : ''; ?>"><?php _e( 'Uploads', 'site-toolkit' ); ?></a> 232 232 233 233 </h2> … … 601 601 <label> 602 602 <input name="<?php echo esc_attr( $group ) . '[' . esc_attr( $name ) . ']'; ?>" type="radio" 603 value="yes" <?php checked( 'yes', esc_attr( $this->options[ $name ] ) ); ?> /> <?php _e( 'Yes', 'site-toolkit' ); ?>603 value="yes" <?php checked( 'yes', esc_attr( $this->options[ $name ] ) ); ?> /> <?php _e( 'Yes', 'site-toolkit' ); ?> 604 604 </label> 605 605 <label> 606 606 <input name="<?php echo esc_attr( $group ) . '[' . esc_attr( $name ) . ']'; ?>" type="radio" 607 value="no" <?php checked( 'no', esc_attr( $this->options[ $name ] ) ); ?> /> <?php _e( 'No', 'site-toolkit' ); ?>607 value="no" <?php checked( 'no', esc_attr( $this->options[ $name ] ) ); ?> /> <?php _e( 'No', 'site-toolkit' ); ?> 608 608 </label> 609 609 <br/> … … 705 705 706 706 ?> 707 <p><strong><?php _e( 'Context', 'site-toolkit' ); ?></strong> 707 <p><strong><?php _e( 'Context', 'site-toolkit' ); ?></strong> 708 708 <label> 709 709 <input name="stk_dashboard[custom_widgets_context]" type="radio" 710 value="normal" <?php checked( 'normal', esc_attr( $this->options['custom_widgets_context'] ) ); ?> /> <?php _e( 'Normal', 'site-toolkit' ); ?>710 value="normal" <?php checked( 'normal', esc_attr( $this->options['custom_widgets_context'] ) ); ?> /> <?php _e( 'Normal', 'site-toolkit' ); ?> 711 711 </label> 712 712 <label> 713 713 <input name="stk_dashboard[custom_widgets_context]" type="radio" 714 value="side" <?php checked( 'side', esc_attr( $this->options['custom_widgets_context'] ) ); ?> /> <?php _e( 'Side', 'site-toolkit' ); ?>714 value="side" <?php checked( 'side', esc_attr( $this->options['custom_widgets_context'] ) ); ?> /> <?php _e( 'Side', 'site-toolkit' ); ?> 715 715 </label></p> 716 716 <p class="description"> 717 <small><?php _e( 'You can create a custom text Dashboard widget.', 'site-toolkit' ); ?></small>717 <small><?php _e( 'You can create a custom text Dashboard widget.', 'site-toolkit' ); ?></small> 718 718 </p> 719 719 <?php … … 791 791 ?> 792 792 <p> 793 <strong><?php _e( 'Redirect author', 'site-toolkit' ); ?></strong><br/>793 <strong><?php _e( 'Redirect author', 'site-toolkit' ); ?></strong><br/> 794 794 <label> 795 795 <input name="stk_archives[redirect_author]" type="radio" 796 value="yes" <?php checked( 'yes', esc_attr( $this->options['redirect_author'] ) ); ?> /> <?php _e( 'Yes', 'site-toolkit' ); ?>796 value="yes" <?php checked( 'yes', esc_attr( $this->options['redirect_author'] ) ); ?> /> <?php _e( 'Yes', 'site-toolkit' ); ?> 797 797 </label> 798 798 <label> 799 799 <input name="stk_archives[redirect_author]" type="radio" 800 value="no" <?php checked( 'no', esc_attr( $this->options['redirect_author'] ) ); ?> /> <?php _e( 'No', 'site-toolkit' ); ?>800 value="no" <?php checked( 'no', esc_attr( $this->options['redirect_author'] ) ); ?> /> <?php _e( 'No', 'site-toolkit' ); ?> 801 801 </label> 802 802 </p> 803 803 <br/> 804 804 <p> 805 <strong><?php _e( 'Redirect date', 'site-toolkit' ); ?></strong><br/>805 <strong><?php _e( 'Redirect date', 'site-toolkit' ); ?></strong><br/> 806 806 <label> 807 807 <input name="stk_archives[redirect_date]" type="radio" 808 value="yes" <?php checked( 'yes', esc_attr( $this->options['redirect_date'] ) ); ?> /> <?php _e( 'Yes', 'site-toolkit' ); ?>808 value="yes" <?php checked( 'yes', esc_attr( $this->options['redirect_date'] ) ); ?> /> <?php _e( 'Yes', 'site-toolkit' ); ?> 809 809 </label> 810 810 <label> 811 811 <input name="stk_archives[redirect_date]" type="radio" 812 value="no" <?php checked( 'no', esc_attr( $this->options['redirect_date'] ) ); ?> /> <?php _e( 'No', 'site-toolkit' ); ?>812 value="no" <?php checked( 'no', esc_attr( $this->options['redirect_date'] ) ); ?> /> <?php _e( 'No', 'site-toolkit' ); ?> 813 813 </label> 814 814 </p> 815 815 <br/> 816 816 <p> 817 <strong><?php _e( 'Redirect tags', 'site-toolkit' ); ?></strong><br/>817 <strong><?php _e( 'Redirect tags', 'site-toolkit' ); ?></strong><br/> 818 818 <label> 819 819 <input name="stk_archives[redirect_tag]" type="radio" 820 value="yes" <?php checked( 'yes', esc_attr( $this->options['redirect_tag'] ) ); ?> /> <?php _e( 'Yes', 'site-toolkit' ); ?>820 value="yes" <?php checked( 'yes', esc_attr( $this->options['redirect_tag'] ) ); ?> /> <?php _e( 'Yes', 'site-toolkit' ); ?> 821 821 </label> 822 822 <label> 823 823 <input name="stk_archives[redirect_tag]" type="radio" 824 value="no" <?php checked( 'no', esc_attr( $this->options['redirect_tag'] ) ); ?> /> <?php _e( 'No', 'site-toolkit' ); ?>824 value="no" <?php checked( 'no', esc_attr( $this->options['redirect_tag'] ) ); ?> /> <?php _e( 'No', 'site-toolkit' ); ?> 825 825 </label> 826 826 </p> 827 827 <br/> 828 828 <p class="description"> 829 <small><?php _e( 'Redirects authors archive, dates archive, tags archive to the homepage.', 'site-toolkit' ); ?></small>829 <small><?php _e( 'Redirects authors archive, dates archive, tags archive to the homepage.', 'site-toolkit' ); ?></small> 830 830 </p> 831 831 <?php … … 876 876 echo '<p>'; 877 877 if ( get_option( 'permalink_structure' ) ) { 878 echo '<code>' . trailingslashit( home_url() ). '</code> <input type="text" name="stk_login[stk_login]" value="' . esc_html( $this->options['stk_login'] ) . '">' . ( $this->stk_use_trailing_slashes() ? ' <code>/</code>' : '' );878 echo '<code>' . . '</code> <input type="text" name="stk_login[stk_login]" value="' . esc_html( $this->options['stk_login'] ) . '">' . ( $this->stk_use_trailing_slashes() ? ' <code>/</code>' : '' ); 879 879 } else { 880 echo '<code>' . trailingslashit( home_url() ) . '?</code> <input type="text" name="stk_login[stk_login]" value="' . esc_html( $this->options['stk_login'] ) . '">';880 echo '<code>' . ) ) . '?</code> <input type="text" name="stk_login[stk_login]" value="' . esc_html( $this->options['stk_login'] ) . '">'; 881 881 } 882 882 echo '</p>'; … … 884 884 <br/> 885 885 <p class="description"> 886 <small><?php _e( 'You can choose your own URL instead of using the default WordPress URL.', 'site-toolkit' ); ?></small>886 <small><?php _e( 'You can choose your own URL instead of using the default WordPress URL.', 'site-toolkit' ); ?></small> 887 887 </p> 888 888 <?php
Note: See TracChangeset
for help on using the changeset viewer.