generated from uriweb/uri-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from uriweb/release-1.0
Release 1.0
- Loading branch information
Showing
15 changed files
with
1,460 additions
and
1,033 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
.DS_Store | ||
node_modules | ||
work_files | ||
.vscode | ||
.vscode | ||
.vendor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
# URI Careers | ||
|
||
|
||
A plugin to display Major to Career data and information. | ||
A tool to display URI alumni career data and information. | ||
|
||
## Theme Details | ||
|
||
Contributors: Brandon Fuller, Alexandra Gauss, Sarah Pucino | ||
Tags: plugins | ||
Requires at least: 4.0 | ||
Tested up to: 5.7 | ||
Stable tag: 0.1.0 | ||
Stable tag: 1.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"name": "uriweb/uri-careers", | ||
"type": "wordpress-plugin", | ||
"description": "A tool to display URI alumni career data and information.", | ||
"authors": [ | ||
{ | ||
"name": "URI Web Communications", | ||
"email": "web-group@uri.edu", | ||
"homepage": "https://github.com/uriweb" | ||
} | ||
], | ||
"homepage": "https://www.uri.edu", | ||
"license": "GPL-3.0-only", | ||
"require": { | ||
"php": ">=7.4" | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?php | ||
/** | ||
* URI CAREERS SHORTCODES | ||
* | ||
* @package uri-careers | ||
*/ | ||
|
||
/** | ||
* Create a shortcode for the toggle. | ||
*/ | ||
function uri_careers_toggle_shortcode( $attributes ) { | ||
// normalize attribute keys, lowercase | ||
$attributes = array_change_key_case( (array) $attributes, CASE_LOWER ); | ||
|
||
// default attributes | ||
$attributes = shortcode_atts( | ||
array( | ||
'advising_link' => null, | ||
'careers_link' => null, | ||
), | ||
$attributes, | ||
); | ||
|
||
if ( null === $attributes['advising_link'] && null === $attributes['careers_link'] ) { | ||
$link_careers = get_permalink(); | ||
$link_advising = get_permalink(); | ||
$button_style = array( 'disabled', 'disabled' ); | ||
} | ||
|
||
if ( null !== $attributes['advising_link'] && null === $attributes['careers_link'] ) { | ||
$link_careers = get_permalink(); | ||
$link_advising = $attributes['advising_link']; | ||
$button_style = array( '', 'prominent' ); | ||
$style_class = array( 'on', 'off' ); | ||
} | ||
if ( null !== $attributes['careers_link'] && null === $attributes['advising_link'] ) { | ||
$link_careers = $attributes['careers_link']; | ||
$link_advising = get_permalink(); | ||
$button_style = array( 'prominent', '' ); | ||
$style_class = array( 'off', 'on' ); | ||
} | ||
return uri_careers_toggle( $link_careers, $link_advising, $button_style, $style_class ); | ||
|
||
} | ||
|
||
add_shortcode( 'uri-careers-toggle', 'uri_careers_toggle_shortcode' ); |
Oops, something went wrong.