diff --git a/src/img/footnotes.png b/.github/img/footnotes.png similarity index 100% rename from src/img/footnotes.png rename to .github/img/footnotes.png diff --git a/.php-commitizen.php b/.php-commitizen.php deleted file mode 100644 index 04d9da8..0000000 --- a/.php-commitizen.php +++ /dev/null @@ -1,30 +0,0 @@ - [ - 'lengthMin' => 1, // Min length of the type - 'lengthMax' => 8, // Max length of the type - 'acceptExtra' => false, // Allow adding types not listed in 'values' key - 'values' => ['feat', 'fix', 'refactor', 'style', 'docs', 'chore', 'test', 'perf', 'build', 'ci'], // All the values usable as type - ], - 'scope' => [ - 'lengthMin' => 0, // Min length of the scope - 'lengthMax' => 10, // Max length of the scope - 'acceptExtra' => true, // Allow adding scopes not listed in 'values' key - 'values' => [], // All the values usable as scope - ], - 'description' => [ - 'lengthMin' => 1, // Min length of the description - 'lengthMax' => 65, // Max length of the description - ], - 'subject' => [ - 'lengthMin' => 1, // Min length of the subject - 'lengthMax' => 80, // Max length of the subject - ], - 'body' => [ - 'wrap' => 72, // Wrap the body at 72 characters - ], - 'footer' => [ - 'wrap' => 72, // Wrap the footer at 72 characters - ], -]; diff --git a/CHANGELOG.md b/CHANGELOG.md index e206947..662d255 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog += 2.7.3 = + +- Bugfix: fix WYSIWYG editor error message, thanks to @ogbcashdown bug report. + += 2.7.2 = + +- Reissue of 2.7.1. + = 2.7.1 = - Bugfix: Stylesheets: namespace collapsed CSS class, thanks to @cybermrmotte diff --git a/README.md b/README.md index e979d0c..9a7db75 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/) -![footnotes](https://raw.githubusercontent.com/markcheret/footnotes/main/img/footnotes.png) +![footnotes](https://raw.githubusercontent.com/markcheret/footnotes/main/.github/img/footnotes.png) **footnotes** aims to be the all-in-one solution for displaying an automatically-generated list of references on your Page or Post. The Plugin diff --git a/_tools/build.sh b/_tools/build.sh index 8a021f9..d0f5782 100755 --- a/_tools/build.sh +++ b/_tools/build.sh @@ -6,11 +6,7 @@ echo "Building Plugin..." echo "Copying directories..." rm -rf dist/ mkdir dist -cp -r -t dist src/{class,languages,templates}/ -# Among the images, only 2 out of 3 are distributed. -echo "Copying the needed images..." -mkdir -p dist/img -cp -t dist/img src/img/fn-wysiwyg.png +cp -r -t dist src/{class,languages,templates,img}/ echo "Copying files..." cp -t dist ./{SECURITY.md,CHANGELOG.md,wpml-config.xml} src/{license.txt,readme.txt,includes.php} echo "Setting production flag..." diff --git a/_tools/release.sh b/_tools/release.sh index a0221f2..4a9f0ec 100755 --- a/_tools/release.sh +++ b/_tools/release.sh @@ -200,6 +200,7 @@ read -p "Are you ready to continue? (Y/N): " CONFIRM && [[ $CONFIRM == [yY] || $ echo "Creating local copy of SVN repo..." svn checkout https://plugins.svn.wordpress.org/footnotes svn-tmp --depth immediates svn update --quiet svn-tmp/trunk --set-depth infinity +svn update --quiet svn-tmp/assets --set-depth infinity svn update --quiet svn-tmp/tags/$PRERELEASE_VERSION --set-depth infinity echo -e "Local copy created.\n" diff --git a/_tools/setup.sh b/_tools/setup.sh deleted file mode 100755 index fd4c786..0000000 --- a/_tools/setup.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -cp contrib/pre-commit .git/hooks/pre-commit -chmod +x .git/hooks/pre-commit diff --git a/contrib/pre-commit b/contrib/pre-commit deleted file mode 100644 index 65f5a1f..0000000 --- a/contrib/pre-commit +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/sh - -# Modified from: https://github.com/bjornjohansen/wp-pre-commit-hook -# Also: https://softdiscover.com/wordpress/perfect-setup-for-a-wordpress-project-development/ - -PROJECT=`php -r "echo dirname(dirname(dirname(realpath('$0'))));"` -STAGED_FILES_CMD=`git diff --cached --name-only --diff-filter=ACMR HEAD | grep \\\\.php` - -# Determine if a file list is passed -if [ "$#" -eq 1 ] -then - oIFS=$IFS - IFS=' - ' - SFILES="$1" - IFS=$oIFS -fi -SFILES=${SFILES:-$STAGED_FILES_CMD} - -echo "Checking PHP Lint..." -for FILE in $SFILES -do - php -l -d display_errors=0 $PROJECT/$FILE - if [ $? != 0 ] - then - echo "Fix the error before commit." - exit 1 - fi - FILES="$FILES $PROJECT/$FILE" -done - -#if [ -f "$PROJECT/phpcs.ruleset.xml" ] -#then -# RULESET="$PROJECT/phpcs.ruleset.xml" -#elif [ -f "$PROJECT/phpcs.xml.dist" ] -#then -# RULESET="$PROJECT/phpcs.xml.dist" -#else -# -#fi - -if [ "$FILES" != "" ] -then - for RULESET in WordPress PHPCompatibilityWP; do - echo "Checking Code Standard Compliance, using $RULESET as ruleset standard..." - ./vendor/bin/phpcs --standard="$RULESET" --runtime-set testVersion 7.0- --colors --encoding=utf-8 -n -p $FILES - if [ $? != 0 ] - then - echo "Coding standards errors have been detected. Running phpcbf..." - ./vendor/bin/phpcbf --standard="$RULESET" --runtime-set testVersion 7.0- --encoding=utf-8 -n -p $FILES - git add $FILES - echo "Running Code Sniffer again..." - ./vendor/bin/phpcs --standard="$RULESET" --runtime-set testVersion 7.0- --colors --encoding=utf-8 -n -p $FILES - if [ $? != 0 ] - then - echo "Errors found not fixable automatically. You need to manually fix them." - exit 1 - fi - fi - echo "$RULESET passed." - done -fi - -exit $? diff --git a/package.json b/package.json index 7564103..fbddb8d 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "husky": { "hooks": { "pre-commit": "lint-staged", - "pre-push": "composer run docs && git add docs && git commit -m \"docs: update documentation\" --no-verify" + "pre-push": "composer run docs" } }, "lint-staged": { diff --git a/src/class/wysiwyg.php b/src/class/wysiwyg.php index d472225..f68ea8c 100644 --- a/src/class/wysiwyg.php +++ b/src/class/wysiwyg.php @@ -74,7 +74,7 @@ class Footnotes_WYSIWYG { * @return array */ public static function include_scripts( $p_arr_plugins ) { - $p_arr_plugins[ Footnotes_Config::C_STR_PLUGIN_NAME ] = plugins_url( '/../js/wysiwyg-editor ' . ( ( Footnotes::PRODUCTION_ENV ) ? '.min' : '' ) . '.js', __FILE__ ); + $p_arr_plugins[ Footnotes_Config::C_STR_PLUGIN_NAME ] = plugins_url( '/../js/wysiwyg-editor' . ( ( PRODUCTION_ENV ) ? '.min' : '' ) . '.js', __FILE__ ); return $p_arr_plugins; } diff --git a/src/footnotes.php b/src/footnotes.php index dc44466..26b7367 100755 --- a/src/footnotes.php +++ b/src/footnotes.php @@ -5,7 +5,7 @@ * Description: footnotes lets you easily add highly-customisable footnotes on your WordPress Pages and Posts. * Author: Mark Cheret * Author URI: https://cheret.org/footnotes - * Version: 2.7.1 + * Version: 2.7.3 * Text Domain: footnotes * Domain Path: /languages * Requires at least: 3.9 @@ -25,7 +25,7 @@ * @since 2.5.3 (Hungarian) * @var str */ -define( 'C_STR_FOOTNOTES_VERSION', '2.7.2' ); +define( 'C_STR_FOOTNOTES_VERSION', '2.7.3' ); /** * Defines the current environment ('development' or 'production'). diff --git a/src/js/wysiwyg-editor.js b/src/js/wysiwyg-editor.js index e3e1ef9..5371271 100644 --- a/src/js/wysiwyg-editor.js +++ b/src/js/wysiwyg-editor.js @@ -54,24 +54,24 @@ return null; }, - /** - * Returns information about the plugin as a name/value array. - * The current keys are longname, author, authorurl, infourl and version. - * - * @return {Object} Name/value array containing information about the plugin. - * - * Edit: needs updating the version number manually - */ - getInfo : function() { - return { - longname : 'Inserts the Footnotes short code.', - author : 'Mark Cheret', - authorurl : 'https://cheret.org/footnotes/', - infourl : 'https://wordpress.org/plugins/footnotes/', - version : '2.7.2d' - }; - } - }); + /** + * Returns information about the plugin as a name/value array. + * The current keys are longname, author, authorurl, infourl and version. + * + * @return {Object} Name/value array containing information about the plugin. + * + * Edit: needs updating the version number manually + */ + getInfo: function () { + return { + longname: 'Inserts the Footnotes short code.', + author: 'Mark Cheret', + authorurl: 'https://cheret.org/footnotes/', + infourl: 'https://wordpress.org/plugins/footnotes/', + version: '2.7.4d', + }; + }, + }); // Register plugin tinymce.PluginManager.add('footnotes', tinymce.plugins.Footnotes); diff --git a/src/readme.txt b/src/readme.txt index c9d0c5f..7119741 100644 --- a/src/readme.txt +++ b/src/readme.txt @@ -5,7 +5,7 @@ Tags: footnote, footnotes, bibliography, formatting, notes, Post, posts, referen Requires at least: 3.9 Tested up to: 5.7.1 Requires PHP: 7.0 -Stable Tag: 2.7.0 +Stable Tag: 2.7.3 License: GPLv3 License URI: https://www.gnu.org/licenses/gpl-3.0.html @@ -60,7 +60,16 @@ No, this Plugin has been written from scratch. Of course some inspirations on ho == Changelog == += 2.7.3 = + +- Bugfix: fix WYSIWYG editor error message, thanks to @ogbcashdown bug report. + += 2.7.2 = + +- Reissue of 2.7.1. + = 2.7.1 = + - Bugfix: Stylesheets: namespace collapsed CSS class, thanks to @cybermrmotte @markyz89 bug reports. - Dashboard: move Plugin settings under default WP Settings menu. - Bugfix: Footnotes: fix bug when using multiple paragraphs in footnotes. @@ -68,20 +77,15 @@ No, this Plugin has been written from scratch. Of course some inspirations on ho - Documentation: split changelog into seperate file. = 2.7.0 = + - Adding: Reference container: optionally per section by shortcode, thanks to @grflukas issue report. - Bugfix: Excerpts: make excerpt handling backward compatible, thanks to @mfessler bug report. - Bugfix: Dashboard: debug the 'Quick start guide' tab, thanks to @rumperuu bug report. -= 2.6.6 = -- Bugfix: Process: fix issue that caused some footnotes to not be processed, thanks to @docteurfitness @rkupadhya @offpeakdesign bug reports. - -= 2.6.5 = -- Bugfix: Editor buttons: debug button by reverting name change in PHP file while JS file and HTML template remained unsynced, thanks to @gova bug report. -- Bugfix: Hooks: default-disable the_excerpt hook with respect to theme-specific excerpt handling, thanks to @mmallett bug reports. - == Upgrade Notice == -= 2.7.1 = += 2.7.3 = + This release resolves a CSS class conflict with the commonly-used `.collapsed` class. == Usage ==