Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update PHP #24

Merged
merged 1 commit into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<arg name="parallel" value="8"/><!-- Enables parallel processing when available for faster results. -->

<!-- Minimum support WP Version. -->
<config name="minimum_supported_wp_version" value="4.9"/>
<config name="minimum_wp_version" value="6.0"/>

<!-- Don't worry about files that don't contain any code -->
<rule ref="Internal.NoCodeFound">
Expand Down Expand Up @@ -120,5 +120,5 @@
<rule ref="PHPCompatibilityWP" />

<!-- PHP version check. -->
<config name="testVersion" value="5.6-"/>
<config name="testVersion" value="7.2-"/>
</ruleset>
1 change: 0 additions & 1 deletion .prettierrc

This file was deleted.

6 changes: 6 additions & 0 deletions .prettierrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import wpPrettierConfig from '@wordpress/prettier-config';

export default {
...wpPrettierConfig,
printWidth: 100,
};
3 changes: 1 addition & 2 deletions assets/js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@

var $targetStatus = $this.hasClass( 'selected' ) ? 'no' : 'yes';
var $unoStatus = typeof $this.data( 'uno' ) !== 'undefined' ? 1 : 0;
var $maxStatus =
typeof $this.data( 'max_status' ) !== 'undefined' ? 1 : 0;
var $maxStatus = typeof $this.data( 'max_status' ) !== 'undefined' ? 1 : 0;

$.post(
NSFP_OBJ.ajaxurl,
Expand Down
6 changes: 1 addition & 5 deletions assets/js/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,7 @@

data.forEach( function ( item ) {
output +=
'<li><a href="' +
item.url +
'" target="_blank">' +
item.title +
'</a></li>';
'<li><a href="' + item.url + '" target="_blank">' + item.title + '</a></li>';
} );
return $( '<' + settings.list_type + '/>' ).append( output );
}
Expand Down
30 changes: 15 additions & 15 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
}
],
"require": {
"php": ">=5.6",
"php": ">=7.2.24",
"ernilambar/optioner": "^2.0",
"ernilambar/wp-admin-notice": "^1.0"
"ernilambar/wp-admin-notice": "^2.0"
},
"minimum-stability": "dev",
"prefer-stable": true,
Expand All @@ -27,17 +27,17 @@
"sort-packages": true
},
"scripts": {
"phpcbf": [
"composer --working-dir=devtools update --no-interaction",
"devtools/vendor/bin/phpcbf --standard=.phpcs.xml.dist"
],
"phpcs": [
"composer --working-dir=devtools update --no-interaction",
"devtools/vendor/bin/phpcs --standard=.phpcs.xml.dist"
],
"pot": [
"composer --working-dir=devtools update --no-interaction",
"devtools/vendor/bin/wp i18n make-pot . --exclude=build,deploy,node_modules,vendor --headers='{\"POT-Creation-Date\":\"\"}'"
]
}
"phpcbf": [
"composer --working-dir=devtools update --no-interaction",
"devtools/vendor/bin/phpcbf --standard=.phpcs.xml.dist"
],
"phpcs": [
"composer --working-dir=devtools update --no-interaction",
"devtools/vendor/bin/phpcs --standard=.phpcs.xml.dist"
],
"pot": [
"composer --working-dir=devtools update --no-interaction",
"devtools/vendor/bin/wp i18n make-pot . --exclude=build,deploy,node_modules,vendor --headers='{\"POT-Creation-Date\":\"\"}'"
]
}
}
25 changes: 16 additions & 9 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 24 additions & 24 deletions languages/ns-featured-posts.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file is distributed under the GPL-2.0+.
msgid ""
msgstr ""
"Project-Id-Version: NS Featured Posts 2.0.13\n"
"Project-Id-Version: NS Featured Posts 3.0.0\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/ns-featured-posts\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand All @@ -16,9 +16,9 @@ msgstr ""

#. Plugin Name of the plugin
#: ns-featured-posts.php
#: includes/classes/class-ns-featured-posts-admin.php:115
#: includes/classes/class-ns-featured-posts-admin.php:130
#: includes/classes/class-ns-featured-posts-admin.php:118
#: includes/classes/class-ns-featured-posts-admin.php:133
#: includes/classes/class-ns-featured-posts-admin.php:136
#: includes/widgets/nsfp-featured-post-widget.php:28
msgid "NS Featured Posts"
msgstr ""
Expand All @@ -44,78 +44,78 @@ msgid "https://www.nilambar.net"
msgstr ""

#. translators: %s: version
#: includes/classes/class-ns-featured-posts-admin.php:132
#: includes/classes/class-ns-featured-posts-admin.php:135
msgid "Version: %s"
msgstr ""

#: includes/classes/class-ns-featured-posts-admin.php:159
#: includes/classes/class-ns-featured-posts-admin.php:277
#: includes/classes/class-ns-featured-posts-admin.php:162
#: includes/classes/class-ns-featured-posts-admin.php:280
msgid "Settings"
msgstr ""

#: includes/classes/class-ns-featured-posts-admin.php:169
#: includes/classes/class-ns-featured-posts-admin.php:172
msgid "Enable Featured for"
msgstr ""

#: includes/classes/class-ns-featured-posts-admin.php:180
#: includes/classes/class-ns-featured-posts-admin.php:183
msgid "Enable Radio Mode for"
msgstr ""

#: includes/classes/class-ns-featured-posts-admin.php:181
#: includes/classes/class-ns-featured-posts-admin.php:184
msgid "If checked, only one post can be made featured."
msgstr ""

#: includes/classes/class-ns-featured-posts-admin.php:192
#: includes/classes/class-ns-featured-posts-admin.php:195
msgid "Max Posts Number"
msgstr ""

#: includes/classes/class-ns-featured-posts-admin.php:193
#: includes/classes/class-ns-featured-posts-admin.php:196
msgid "Maximum posts for the post type."
msgstr ""

#: includes/classes/class-ns-featured-posts-admin.php:205
#: includes/classes/class-ns-featured-posts-admin.php:208
msgid "Enable Max Posts for"
msgstr ""

#: includes/classes/class-ns-featured-posts-admin.php:247
#: includes/classes/class-ns-featured-posts-admin.php:250
#: includes/widgets/nsfp-featured-post-widget.php:155
msgid "Post"
msgstr ""

#: includes/classes/class-ns-featured-posts-admin.php:248
#: includes/classes/class-ns-featured-posts-admin.php:251
#: includes/widgets/nsfp-featured-post-widget.php:156
msgid "Page"
msgstr ""

#: includes/classes/class-ns-featured-posts-admin.php:307
#: includes/classes/class-ns-featured-posts-admin.php:547
#: includes/classes/class-ns-featured-posts-admin.php:670
#: includes/classes/class-ns-featured-posts-admin.php:766
#: includes/classes/class-ns-featured-posts-admin.php:310
#: includes/classes/class-ns-featured-posts-admin.php:556
#: includes/classes/class-ns-featured-posts-admin.php:679
#: includes/classes/class-ns-featured-posts-admin.php:771
msgid "Featured"
msgstr ""

#: includes/classes/class-ns-featured-posts-admin.php:372
#: includes/classes/class-ns-featured-posts-admin.php:375
msgid "Nonce verification failed."
msgstr ""

#. translators: %s: max posts number
#: includes/classes/class-ns-featured-posts-admin.php:410
#: includes/classes/class-ns-featured-posts-admin.php:413
msgid "Maximum %s posts can be set as featured."
msgstr ""

#: includes/classes/class-ns-featured-posts-admin.php:567
#: includes/classes/class-ns-featured-posts-admin.php:576
msgid "Check this to make featured."
msgstr ""

#: includes/classes/class-ns-featured-posts-admin.php:637
#: includes/classes/class-ns-featured-posts-admin.php:646
msgid "Post could not be set as featured. Maximum posts limit reached."
msgstr ""

#: includes/classes/class-ns-featured-posts-admin.php:669
#: includes/classes/class-ns-featured-posts-admin.php:678
msgid "Show All"
msgstr ""

#: includes/classes/class-ns-featured-posts-admin.php:671
#: includes/classes/class-ns-featured-posts-admin.php:680
msgid "Not Featured"
msgstr ""

Expand Down
6 changes: 4 additions & 2 deletions ns-featured-posts.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
* Plugin Name: NS Featured Posts
* Plugin URI: https://www.nilambar.net/2014/07/ns-featured-posts-wordpress-plugin.html
* Description: Plugin to make your posts, pages and custom post types Featured
* Version: 2.0.13
* Version: 3.0.0
* Requires at least: 6.0
* Requires PHP: 7.2
* Author: Nilambar Sharma
* Author URI: https://www.nilambar.net
* Text Domain: ns-featured-posts
Expand All @@ -19,7 +21,7 @@
die;
}

define( 'NS_FEATURED_POSTS_VERSION', '2.0.13' );
define( 'NS_FEATURED_POSTS_VERSION', '3.0.0' );
define( 'NS_FEATURED_POSTS_BASENAME', basename( __DIR__ ) );
define( 'NS_FEATURED_POSTS_DIR', rtrim( plugin_dir_path( __FILE__ ), '/' ) );
define( 'NS_FEATURED_POSTS_URL', rtrim( plugin_dir_url( __FILE__ ), '/' ) );
Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ns-featured-posts",
"version": "2.0.13",
"version": "3.0.0",
"description": "NS Featured Posts",
"author": "Nilambar Sharma",
"license": "GPL-2.0-or-later",
Expand All @@ -17,12 +17,14 @@
"bugs": {
"url": "https://github.com/ernilambar/ns-featured-posts/issues"
},
"browserslist": "> 1%, not dead",
"packtor": {
"files": [
"**/*",
"!*.js",
"!*.json",
"!*.lock",
"!*.md",
"!*.yaml",
"!devtools/**/*"
]
Expand All @@ -33,7 +35,6 @@
"buildDir": "deploy/ns-featured-posts",
"deployAssets": false
},
"browserslist": "> 1%, not dead",
"npmpackagejsonlint": {
"extends": "@wordpress/npm-package-json-lint-config"
},
Expand All @@ -44,7 +45,7 @@
"npm-package-json-lint": "^8.0.0",
"packtor": "^1.0.2",
"prettier": "npm:wp-prettier@^3.0.3",
"shx": "^0.3.4",
"rimraf": "^6.0.1",
"wp-deployer": "^1.0.3"
},
"scripts": {
Expand All @@ -54,7 +55,7 @@
"lint-pkg-json": "npmPkgJsonLint .",
"prewpdeploy": "pnpm run deploy",
"wpdeploy": "wp-deployer",
"predeploy": "shx rm -rf vendor/ && composer install --no-dev --no-scripts -o",
"predeploy": "rimraf deploy vendor && composer install --no-dev --no-scripts -o",
"deploy": "packtor"
}
}
Loading
Loading