Skip to content
Open
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
7 changes: 4 additions & 3 deletions environments/jobs/bin/after-start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ create_page_if_missing() {
}
create_page_if_missing 'post-a-job' 'Post a Job'
create_page_if_missing 'remove-a-job' 'Remove a Job'
create_page_if_missing 'feedback' 'Feedback' '<p>We are sorry, but we do not have any additional information about job postings other than what was posted to the site.</p><p>If you are writing about your already-submitted job posting, please be sure to provide the email address you specified when you filled out the job form.</p><form method="post"><p><label for="feedback-name">Name *</label><input type="text" id="feedback-name" name="name" required /></p><p><label for="feedback-email">Email *</label><input type="email" id="feedback-email" name="email" required /></p><p><label for="feedback-subject">Subject *</label><input type="text" id="feedback-subject" name="subject" required /></p><p><label for="feedback-message">Message *</label><textarea id="feedback-message" name="message" rows="8" required></textarea></p><p><input type="submit" value="Send Feedback" /></p></form>'
create_page_if_missing 'faq' 'FAQ' '<h2>General</h2><dl><dt>What is this site?</dt><dd>This is a job board for WordPress-related jobs. Anyone can post a job opening or browse available positions.</dd><dt>How long do job postings stay up?</dt><dd>Job postings remain active for 21 days from the date of approval, after which they are automatically removed.</dd><dt>How much does it cost to post a job?</dt><dd>Posting a job is completely free.</dd></dl><h2>For Employers</h2><dl><dt>What kinds of jobs can I post?</dt><dd>Any job that is directly related to WordPress. This includes development, design, support, writing, translation, and more.</dd><dt>What is NOT acceptable for a job posting?</dt><dd>Jobs that are not related to WordPress, jobs that require payment from applicants, and jobs offering illegally low compensation are not acceptable.</dd><dt>How do I remove my job posting?</dt><dd>When you submit a job, you receive a job token. Use that token on the Remove a Job page to remove your listing at any time.</dd></dl>'

# Create job categories.
Expand Down Expand Up @@ -74,21 +75,21 @@ else
JOB1=$($WP wp post create --post_type=job --post_status=publish \
--post_title='Senior WordPress Developer' \
--post_content='We are looking for an experienced WordPress developer to join our team. You will be responsible for building custom plugins and themes.' \
'--meta_input={"jobtype":"ft","location":"Remote","company":"Starter Corp"}' \
'--meta_input={"jobtype":"ft","location":"Remote","company":"Starter Corp","howtoapply":"https://example.com/apply","howtoapply_method":"web"}' \
--porcelain 2>/dev/null) && echo " Created job: Senior WordPress Developer" || true
[ -n "$JOB1" ] && $WP wp post term set "$JOB1" job_category development > /dev/null 2>&1

JOB2=$($WP wp post create --post_type=job --post_status=publish \
--post_title='WordPress Theme Designer' \
--post_content='Seeking a creative designer with WordPress theme development experience. Must have strong CSS and design skills.' \
'--meta_input={"jobtype":"ppt","location":"New York, NY","company":"Design Studio"}' \
'--meta_input={"jobtype":"ppt","location":"New York, NY","company":"Design Studio","howtoapply":"jobs@designstudio.example.com","howtoapply_method":"email"}' \
--porcelain 2>/dev/null) && echo " Created job: WordPress Theme Designer" || true
[ -n "$JOB2" ] && $WP wp post term set "$JOB2" job_category design > /dev/null 2>&1

JOB3=$($WP wp post create --post_type=job --post_status=publish \
--post_title='Plugin Support Specialist' \
--post_content='Help our users get the most out of our WordPress plugins. Provide technical support and write documentation.' \
'--meta_input={"jobtype":"pt","location":"Remote","company":"Plugin Inc"}' \
'--meta_input={"jobtype":"pt","location":"Remote","company":"Plugin Inc","howtoapply":"https://plugininc.example.com/careers","howtoapply_method":"web"}' \
--porcelain 2>/dev/null) && echo " Created job: Plugin Support Specialist" || true
[ -n "$JOB3" ] && $WP wp post term set "$JOB3" job_category support > /dev/null 2>&1
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,20 @@ function jobswp_get_job_meta( $post_id, $meta_key ) {
$method = 'phone';
}
if ( 'email' == $method ) {
$val = sprintf( __( 'Via <a href="%s">email</a>', 'jobswp' ), esc_attr( 'mailto:' . sanitize_email( $val ) ) );
$val = sprintf(
/* translators: %s: mailto link wrapping the word "email". */
__( 'Via %s', 'jobswp' ),
sprintf( '<a href="%s">email</a>', esc_attr( 'mailto:' . sanitize_email( $val ) ) )
);
} elseif ( 'web' == $method ) {
// Prepend 'http://' if no protocol was specified by job poster
if ( 0 !== strpos( $val, 'http' ) )
$val = 'http://' . $val;
$val = sprintf(
/* translators: %s: Link to job application web form. */
/* translators: %s: Link wrapping the words "web form". */
__( 'Via %s', 'jobswp' ),
sprintf(
/* translators: %s: URL to job application web form. */
'<a href="%s" rel="nofollow ugc noopener">' . __( 'web form', 'jobswp' ) . '</a>',
'<a href="%s" rel="nofollow ugc noopener">web form</a>',
esc_url( $val )
)
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,18 +134,20 @@
</p>
</a>
<?php endforeach; ?>
<?php else : ?>
<div class="jobs-empty">
<p>
<?php
printf(
<?php endif; ?>
<div class="jobs-empty" <?php echo ! empty( $all_jobs ) ? 'style="display:none"' : ''; ?>>
<p>
<?php
echo wp_kses(
sprintf(
/* translators: %s: URL to post a job */
wp_kses_post( __( 'No jobs are currently posted. Would you like to <a href="%s">post a job</a>?', 'jobswp' ) ),
__( 'There are no jobs in this category. If you are hiring, you can <a href="%s">post a new job</a>.', 'jobswp' ),
esc_url( home_url( '/post-a-job/' ) )
);
?>
</p>
</div>
<?php endif; ?>
),
array( 'a' => array( 'href' => array() ) )
);
?>
</p>
</div>
</div>
</section>
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,19 @@
$button_label = __( 'Submit Job', 'jobswp' );
} ?>
<input class="btn btn-primary submit-job" id="submit-job" type="submit" name="submitjob" value="<?php echo esc_attr( $button_label ); ?>" />

<p class="post-job-remove-note">
<?php
echo wp_kses(
sprintf(
/* translators: %s: URL to the remove a job page */
__( 'Looking to remove a job? Visit the <a href="%s">job removal page</a>.', 'jobswp' ),
esc_url( home_url( '/remove-a-job/' ) )
),
array( 'a' => array( 'href' => array() ) )
);
?>
</p>
</div>

</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,19 @@
?>
<div class="job-sidebar__detail">
<span class="job-sidebar__detail-label"><?php echo esc_html( $flabel ); ?></span>
<span class="job-sidebar__detail-value"><?php echo wp_kses_post( $val ); ?></span>
<span class="job-sidebar__detail-value">
<?php
echo wp_kses(
$val,
array(
'a' => array(
'href' => array(),
'rel' => array(),
),
)
);
?>
</span>
</div>
<?php
endif;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
<li><a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php esc_html_e( 'Current Openings', 'jobswp' ); ?></a></li>
<li><a href="<?php echo esc_url( home_url( '/post-a-job/' ) ); ?>"><?php esc_html_e( 'Post a Job', 'jobswp' ); ?></a></li>
<li><a href="<?php echo esc_url( home_url( '/faq/' ) ); ?>"><?php esc_html_e( 'FAQ', 'jobswp' ); ?></a></li>
<li><a href="<?php echo esc_url( home_url( '/remove-a-job/' ) ); ?>"><?php esc_html_e( 'Remove a Job', 'jobswp' ); ?></a></li>
<li><a href="<?php echo esc_url( home_url( '/feedback/' ) ); ?>"><?php esc_html_e( 'Feedback', 'jobswp' ); ?></a></li>
<li><a href="https://wordpress.org/"><?php esc_html_e( 'WordPress.org', 'jobswp' ); ?></a></li>
</ul>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ function jobswp_setup() {
load_theme_textdomain( 'jobswp', get_template_directory() . '/languages' );

/**
* Add default posts and comments RSS feed links to head
* Add default posts RSS feed links to head.
* Comments feed is removed below as jobs don't have comments.
*/
add_theme_support( 'automatic-feed-links' );

Expand Down Expand Up @@ -83,13 +84,39 @@ function jobswp_widgets_init() {
* Enqueue scripts and styles
*/
function jobswp_scripts() {
wp_enqueue_style( 'jobswp-style', get_stylesheet_uri(), array(), '20260326' );
wp_enqueue_style( 'jobswp-style', get_stylesheet_uri(), array(), filemtime( get_stylesheet_directory() . '/style.css' ) );

wp_enqueue_script( 'jobswp-main', get_template_directory_uri() . '/js/main.js', array(), '20260326', true );
wp_enqueue_script( 'jobswp-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true );
wp_enqueue_script( 'jobswp-main', get_template_directory_uri() . '/js/main.js', array(), filemtime( get_template_directory() . '/js/main.js' ), true );
wp_enqueue_script( 'jobswp-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), filemtime( get_template_directory() . '/js/skip-link-focus-fix.js' ), true );
}
add_action( 'wp_enqueue_scripts', 'jobswp_scripts' );

// Remove comments feed link — jobs don't have comments.
add_filter( 'feed_links_show_comments_feed', '__return_false' );

/**
* Add RSS auto-discovery links for each job category on the homepage.
*/
function jobswp_category_feed_links() {
if ( ! is_front_page() ) {
return;
}

$categories = Jobs_Dot_WP::get_job_categories();
if ( ! $categories ) {
return;
}

foreach ( $categories as $cat ) {
printf(
'<link rel="alternate" type="application/rss+xml" title="%s" href="%s" />' . "\n",
esc_attr( sprintf( '%s &raquo; %s Feed', get_bloginfo( 'name' ), $cat->name ) ),
esc_url( get_term_feed_link( $cat->term_id, 'job_category' ) )
);
}
}
add_action( 'wp_head', 'jobswp_category_feed_links' );

/**
* Sets 404 response for author archive requests.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,18 @@
<header class="site-header">
<div class="site-header__inner">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" class="site-header__logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 122.5 122.5" width="36" height="36">
<g fill="#1e1e1e">
<path d="M8.7 61.3c0 20.4 11.9 38 29.1 46.3L12.6 39.1C10.1 46 8.7 53.5 8.7 61.3z"/>
<path d="M96.7 58.7c0-6.4-2.3-10.8-4.2-14.2-2.6-4.2-5-7.8-5-12 0-4.7 3.6-9.1 8.6-9.1h.6C86.7 14.3 74.5 8.7 61.3 8.7c-17.7 0-33.2 9.1-42.3 22.8 1.2 0 2.3.1 3.3.1 5.3 0 13.6-.6 13.6-.6 2.7-.2 3.1 3.9.3 4.2 0 0-2.8.3-5.8.5l18.4 54.6 11-33.1-7.9-21.5c-2.7-.2-5.3-.5-5.3-.5-2.7-.2-2.4-4.3.3-4.2 0 0 8.5.6 13.5.6 5.3 0 13.6-.6 13.6-.6 2.7-.2 3.1 3.9.3 4.2 0 0-2.8.3-5.8.5L85.3 90l5.1-17C93 66.5 96.7 62.1 96.7 58.7z"/>
<path d="M62.2 65.9l-15.2 44.3c4.5 1.3 9.3 2.1 14.3 2.1 5.9 0 11.5-1 16.8-2.8-.1-.2-.3-.5-.4-.7L62.2 65.9z"/>
<path d="M107.4 36c.4 3.2.7 6.6.7 10.3 0 10.1-1.9 21.5-7.6 35.7l-14.6 42.3c22.3-13 37.3-37.2 37.3-64.9 0-8.4-1.4-16.4-3.8-23.9l-12 .5z"/>
<path d="M61.3 0C27.4 0 0 27.4 0 61.3c0 33.8 27.4 61.3 61.3 61.3 33.8 0 61.3-27.4 61.3-61.3C122.5 27.4 95.1 0 61.3 0zM61.3 119.7c-32.2 0-58.4-26.2-58.4-58.4S29.1 2.8 61.3 2.8s58.4 26.2 58.4 58.4-26.2 58.5-58.4 58.5z"/>
</g>
<svg xmlns="http://www.w3.org/2000/svg" role="img" width="36" height="36" viewBox="0 0 28 28">
<title><?php esc_html_e( 'WordPress.org', 'jobswp' ); ?></title>
<path fill="currentColor" d="M13.6052 0.923525C16.1432 0.923525 18.6137 1.67953 20.7062 3.09703C22.7447 4.47403 24.3512 6.41803 25.3097 8.68603C26.9837 12.6415 26.5382 17.164 24.1352 20.7145C22.7582 22.753 20.8142 24.3595 18.5462 25.318C14.5907 26.992 10.0682 26.5465 6.51772 24.1435C4.47922 22.7665 2.87272 20.8225 1.91422 18.5545C0.240225 14.599 0.685725 10.0765 3.08872 6.52603C4.46572 4.48753 6.40973 2.88103 8.67772 1.92253C10.2302 1.26103 11.9177 0.923525 13.6052 0.923525ZM13.6052 0.113525C6.15322 0.113525 0.105225 6.16153 0.105225 13.6135C0.105225 21.0655 6.15322 27.1135 13.6052 27.1135C21.0572 27.1135 27.1052 21.0655 27.1052 13.6135C27.1052 6.16153 21.0572 0.113525 13.6052 0.113525Z"/>
<path fill="currentColor" d="M2.36011 13.6133C2.36011 17.9198 4.81711 21.8618 8.70511 23.7383L3.33211 9.03684C2.68411 10.4813 2.36011 12.0338 2.36011 13.6133ZM21.2061 13.0463C21.2061 11.6558 20.7066 10.6973 20.2746 9.94134C19.8426 9.18534 19.1676 8.22684 19.1676 7.30884C19.1676 6.39084 19.9506 5.31084 21.0576 5.31084H21.2061C16.6296 1.11234 9.51511 1.42284 5.31661 6.01284C4.91161 6.45834 4.53361 6.93084 4.20961 7.43034H4.93861C6.11311 7.43034 7.93561 7.28184 7.93561 7.28184C8.54311 7.24134 8.61061 8.13234 8.00311 8.21334C8.00311 8.21334 7.39561 8.28084 6.72061 8.32134L10.8111 20.5118L13.2681 13.1273L11.5131 8.32134C10.9056 8.28084 10.3386 8.21334 10.3386 8.21334C9.73111 8.17284 9.79861 7.25484 10.4061 7.28184C10.4061 7.28184 12.2691 7.43034 13.3626 7.43034C14.4561 7.43034 16.3596 7.28184 16.3596 7.28184C16.9671 7.24134 17.0346 8.13234 16.4271 8.21334C16.4271 8.21334 15.8196 8.28084 15.1446 8.32134L19.2081 20.4173L20.3691 16.7453C20.8821 15.1388 21.1926 14.0048 21.1926 13.0328L21.2061 13.0463ZM13.7946 14.5853L10.4196 24.3998C12.6876 25.0613 15.1041 25.0073 17.3316 24.2243L17.2506 24.0758L13.7946 14.5853ZM23.4741 8.21334C23.5281 8.59134 23.5551 8.98284 23.5551 9.37434C23.5551 10.5218 23.3391 11.8043 22.7046 13.3973L19.2621 23.3333C24.5271 20.2688 26.4036 13.5593 23.4741 8.21334Z"/>
</svg>
<?php esc_html_e( 'WordPress Jobs', 'jobswp' ); ?>
</a>
<div class="site-header__right">
<nav class="site-header__nav">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" <?php echo is_front_page() ? 'class="active"' : ''; ?>><?php esc_html_e( 'Jobs', 'jobswp' ); ?></a>
<a href="<?php echo esc_url( home_url( '/faq/' ) ); ?>"><?php esc_html_e( 'FAQ', 'jobswp' ); ?></a>
<a href="<?php echo esc_url( home_url( '/faq/' ) ); ?>" <?php echo is_page( 'faq' ) ? 'class="active"' : ''; ?>><?php esc_html_e( 'FAQ', 'jobswp' ); ?></a>
<a href="<?php echo esc_url( home_url( '/feedback/' ) ); ?>" <?php echo is_page( 'feedback' ) ? 'class="active"' : ''; ?>><?php esc_html_e( 'Feedback', 'jobswp' ); ?></a>
<a href="<?php echo esc_url( home_url( '/post-a-job/' ) ); ?>" class="btn btn-primary btn-sm"><?php esc_html_e( 'Post a Job', 'jobswp' ); ?></a>
</nav>
<button class="mobile-menu-toggle" aria-label="<?php esc_attr_e( 'Toggle menu', 'jobswp' ); ?>">
Expand Down
61 changes: 59 additions & 2 deletions jobs.wordpress.net/public_html/wp-content/themes/jobswp/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ label {
border-bottom: 1px solid var(--color-light-grey-1);
background: var(--color-white);
position: sticky;
top: 0;
top: var(--wp-admin--admin-bar--height, 0px);
z-index: 100;
}

Expand Down Expand Up @@ -884,7 +884,7 @@ label {
/* Sidebar */
.job-sidebar {
position: sticky;
top: 90px;
top: calc(var(--wp-admin--admin-bar--height, 0px) + 90px);
}

.job-sidebar__card {
Expand Down Expand Up @@ -1130,6 +1130,63 @@ input[type="submit"].submit-job {
}


/* Generic page form buttons (e.g. feedback page contact form) */
.entry-content input[type="submit"] {
display: inline-flex;
align-items: center;
justify-content: center;
font-family: var(--font-body);
font-size: var(--font-size-base);
font-weight: 600;
line-height: 1.3;
padding: 14px 32px;
border-radius: var(--radius);
border: 1px solid var(--color-blueberry-1);
background: var(--color-blueberry-1);
color: var(--color-white);
cursor: pointer;
transition:
background var(--transition),
border-color var(--transition);
}

.entry-content input[type="submit"]:hover {
background: var(--color-deep-blueberry);
border-color: var(--color-deep-blueberry);
}

.entry-content label {
display: block;
font-weight: 600;
margin-bottom: 4px;
}

/* SI Contact Form overrides for feedback page */
#FSContact1 {
width: 100% !important;
max-width: 600px;
}

#FSContact1 input[type="text"],
#FSContact1 input[type="email"] {
width: 100% !important;
}

#FSContact1 textarea {
width: 100% !important;
max-width: 100% !important;
min-height: 150px;
}

#FSContact1 #fscf_captcha_code1 {
width: 170px !important;
}

#FSContact1 #fscf_submit_div1 {
padding-top: var(--space-20) !important;
}


/* ============================================
Notices
============================================ */
Expand Down
Loading