From 4c623b296ed391e59bdf322e3c0dbd781fb64803 Mon Sep 17 00:00:00 2001 From: Brandon Fuller Date: Thu, 29 Jun 2023 14:10:26 -0400 Subject: [PATCH 1/2] Add field for customizing the accelerated program link --- inc/uri-program-finder-fields.php | 14 +++++++++++++- package-lock.json | 30 ++++++++++++++++++++---------- template-parts/single-program.php | 17 ++++++++++++----- 3 files changed, 45 insertions(+), 16 deletions(-) diff --git a/inc/uri-program-finder-fields.php b/inc/uri-program-finder-fields.php index 5d6893a..5c61e90 100755 --- a/inc/uri-program-finder-fields.php +++ b/inc/uri-program-finder-fields.php @@ -251,7 +251,19 @@ function uri_program_finder_create_taxonomy() { 'type' => 'text', 'instructions' => 'Modify the display language for accelerated programs (if applicable)', 'default_value' => '', - 'placeholder' => '', + 'placeholder' => 'Optional bachelor's to master's in five years', + 'prepend' => '', + 'append' => '', + 'maxlength' => '', + ), + array( + 'key' => 'field_649dad533ea3c', + 'label' => 'Accelerated program link', + 'name' => 'accelerated_link', + 'type' => 'text', + 'instructions' => 'URL to accelerated program department page (if applicable)', + 'default_value' => '', + 'placeholder' => 'https://www.uri.edu/programs/abm/', 'prepend' => '', 'append' => '', 'maxlength' => '', diff --git a/package-lock.json b/package-lock.json index 22d914e..02b86c5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1577,14 +1577,24 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001252", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001252.tgz", - "integrity": "sha512-I56jhWDGMtdILQORdusxBOH+Nl/KgQSdDmpJezYddnAkVOmnoU8zwjTV9xAjMIYxr0iPreEAVylCGcmHCjfaOw==", + "version": "1.0.30001509", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001509.tgz", + "integrity": "sha512-2uDDk+TRiTX5hMcUYT/7CSyzMZxjfGu0vAUjS2g0LSD8UoXOv0LtpH4LxGMemsiPq6LCVIUjNwVM0erkOkGCDA==", "dev": true, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - } + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ] }, "node_modules/chalk": { "version": "2.4.2", @@ -10361,9 +10371,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001252", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001252.tgz", - "integrity": "sha512-I56jhWDGMtdILQORdusxBOH+Nl/KgQSdDmpJezYddnAkVOmnoU8zwjTV9xAjMIYxr0iPreEAVylCGcmHCjfaOw==", + "version": "1.0.30001509", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001509.tgz", + "integrity": "sha512-2uDDk+TRiTX5hMcUYT/7CSyzMZxjfGu0vAUjS2g0LSD8UoXOv0LtpH4LxGMemsiPq6LCVIUjNwVM0erkOkGCDA==", "dev": true }, "chalk": { diff --git a/template-parts/single-program.php b/template-parts/single-program.php index 478b141..9e17da5 100755 --- a/template-parts/single-program.php +++ b/template-parts/single-program.php @@ -67,11 +67,18 @@
Optional bachelor's to master's in five years

"; - } + $accelerated_link = 'https://' . uri_modern_get_the_domain() . '/programs/abm/'; + $accelerated_language = 'Optional bachelor's to master's in five years'; + + if ( $accelerated_custom_language = uri_modern_get_field( 'accelerated_language' ) ) { + $accelerated_language = $accelerated_custom_language; + } + + if ( $accelerated_custom_link = uri_modern_get_field( 'accelerated_link' ) ) { + $accelerated_link = $accelerated_custom_link; + } + + echo '' . $accelerated_language . ''; ?>
From ea9701e7598e9ec8a58d123e6179e1567f11420b Mon Sep 17 00:00:00 2001 From: alexandragauss <“alexandra_gauss@uri.edu”> Date: Thu, 29 Jun 2023 14:37:11 -0400 Subject: [PATCH 2/2] Bump version to 1.7.0 --- README.md | 8 ++++---- package-lock.json | 4 ++-- package.json | 2 +- template-parts/single-program.php | 12 ++++++------ uri-program-finder.php | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index b64d351..8519161 100644 --- a/README.md +++ b/README.md @@ -8,11 +8,11 @@ Add `[programs-categories]` to a page and a form magically appears. -## What's new in 1.6.0 +## What's new in 1.7.0 -Program Finder 1.6.0 is a minor release. +Program Finder 1.7.0 is a minor release. -* Adds a composer.json file +* Adds field for customizing the accelerated program link For complete details, see the [commit history](https://github.com/uriweb/uri-program-finder/pull/20/commits) and the [issue tracker](https://github.com/uriweb/uri-program-finder/issues). @@ -26,6 +26,6 @@ __Contributors:__ [johnpennypacker](https://github.com/johnpennypacker), [bjcful __Tags:__ plugins, shortcodes __Requires at least:__ 4.0 __Tested up to:__ 5.5 -__Stable tag:__ 1.6.0 +__Stable tag:__ 1.7.0 __License:__ GPL-3.0 __Licence URI:__ https://www.gnu.org/licenses/gpl-3.0.html diff --git a/package-lock.json b/package-lock.json index 02b86c5..9aa971e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "uri-program-finder", - "version": "1.6.0", + "version": "1.7.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "uri-program-finder", - "version": "1.6.0", + "version": "1.7.0", "license": "GPL-3.0", "devDependencies": { "@wordpress/eslint-plugin": "^9.1.1", diff --git a/package.json b/package.json index e03570f..34d7fab 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "uri-program-finder", "description": "URI Program Finder", - "version": "1.6.0", + "version": "1.7.0", "homepage": "https://www.uri.edu", "repository": { "type": "git", diff --git a/template-parts/single-program.php b/template-parts/single-program.php index 9e17da5..f6d2566 100755 --- a/template-parts/single-program.php +++ b/template-parts/single-program.php @@ -70,13 +70,13 @@ $accelerated_link = 'https://' . uri_modern_get_the_domain() . '/programs/abm/'; $accelerated_language = 'Optional bachelor's to master's in five years'; - if ( $accelerated_custom_language = uri_modern_get_field( 'accelerated_language' ) ) { - $accelerated_language = $accelerated_custom_language; - } + if ( $accelerated_custom_language = uri_modern_get_field( 'accelerated_language' ) ) { + $accelerated_language = $accelerated_custom_language; + } - if ( $accelerated_custom_link = uri_modern_get_field( 'accelerated_link' ) ) { - $accelerated_link = $accelerated_custom_link; - } + if ( $accelerated_custom_link = uri_modern_get_field( 'accelerated_link' ) ) { + $accelerated_link = $accelerated_custom_link; + } echo '' . $accelerated_language . ''; ?> diff --git a/uri-program-finder.php b/uri-program-finder.php index c9e69b7..1d7b835 100755 --- a/uri-program-finder.php +++ b/uri-program-finder.php @@ -3,7 +3,7 @@ * Plugin Name: URI Program Finder * Plugin URI: http://www.uri.edu * Description: Program finder tools - * Version: 1.6.0 + * Version: 1.7.0 * Author: URI Web Communications * Author URI: *