Skip to content

Commit

Permalink
Update UP jobs site members only message
Browse files Browse the repository at this point in the history
  • Loading branch information
mikethicke committed Dec 20, 2024
1 parent d2a0f82 commit ac2af54
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions themes/aupresses-jobs/wp-job-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
function hc_custom_wp_jobs_can_post_job_up( $can_post ) {
$current_site = get_site_url();
if ( ! $can_post || strpos( $current_site, 'jobs.up.hcommons' ) === False ) {
if ( ! $can_post || strpos( $current_site, 'jobs.up.hcommons' ) === false ) {
return $can_post;
}
if ( ! class_exists( 'Humanities_Commons' ) ) {
Expand All @@ -25,9 +25,9 @@ function hc_custom_wp_jobs_can_post_job_up( $can_post ) {

$memberships = Humanities_Commons::hcommons_get_user_memberships();
if ( is_array($memberships['societies'] ) && in_array( 'up', $memberships['societies'] ) ) {
return True;
return true;
} else {
return False;
return false;
}
}
add_filter( 'job_manager_user_can_post_job', 'hc_custom_wp_jobs_can_post_job_up', 10, 1 );
Expand All @@ -43,14 +43,20 @@ function hc_custom_wp_jobs_can_post_job_up( $can_post ) {
function hc_job_form_disabled_message() {
?>
<p id="hc-job-form-disabled-message">
The AUPresses Jobs List is integrated with UP Commons,
the collaborative online platform built for our community. In order to post to the Jobs List,
AUPresses members will need to have an active account on UP Commons. If you don’t already have a UP Commons account,
please find
<a href='https://www.dropbox.com/s/vn95l5sn1raz2ce/UP_Commons_Registration_Instructions_General.pdf?dl=0'>
The AUPresses Jobs List is integrated with UP Commons, the collaborative online platform built for our community.
In order to post to the Jobs List, AUPresses members need to have an active account on UP Commons. If you don’t
already have a UP Commons account, please find
<a href='https://up.hcommons.org/up-commons-101/up-commons-101-lesson-1-getting-registered/'>
instructions to register here.
</a>
</p>
<p>
If you are not a member of the Association, learn
<a href='https://jobs.up.hcommons.org/job-posting-service/'>
more about advertising positions
</a>
via the AUPresses Jobs List.
</p>
<?php
}
add_action( 'submit_job_form_disabled', 'hc_job_form_disabled_message', 10, 0 );

0 comments on commit ac2af54

Please sign in to comment.