diff --git a/inc/admin-menus/settings-page.php b/inc/admin-menus/settings-page.php index 5745fd7..35374f8 100644 --- a/inc/admin-menus/settings-page.php +++ b/inc/admin-menus/settings-page.php @@ -133,9 +133,6 @@ function wpbb_settings_page_output() { @@ -144,6 +141,13 @@ function wpbb_settings_page_output() {
+ + false, 'cols' => 12, 'order' => 5, + 'jobfeed_notes' => array( + 'data_type' => 'string', + 'input_type' => 'textarea', + 'default_value' => '', + 'example_value' => __( 'This is the short description', 'wpbroadbean' ), + 'notes' => __( 'A short description of the job. This should not contain any HTML, just text.', 'wpbroadbean' ), + ), ); /* add the job reference field */ @@ -71,6 +78,13 @@ function wpbb_add_default_job_fields( $fields ) { 'show_on_frontend' => true, 'cols' => 4, 'order' => 10, + 'jobfeed_notes' => array( + 'data_type' => 'string', + 'input_type' => 'text', + 'default_value' => '', + 'example_value' => 'REF-1234', + 'notes' => __( 'This is a reference for each job and MUST BE UNIQUE to each job. It should not contain any special characters, just lower and upper case letters, dashes and numbers please.', 'wpbroadbean' ), + ), ); /* add the application tracking email field */ @@ -83,6 +97,13 @@ function wpbb_add_default_job_fields( $fields ) { 'show_on_frontend' => false, 'cols' => 4, 'order' => 20, + 'jobfeed_notes' => array( + 'data_type' => 'text', + 'input_type' => 'email', + 'default_value' => '', + 'example_value' => 'bob.12345.123@smith.aplitrak.com', + 'notes' => __( 'This is the unique applicant tracking address for this job and applications made to this job are delivered to this address.', 'wpbroadbean' ), + ), ); /* add the application tracking url field */ @@ -95,6 +116,13 @@ function wpbb_add_default_job_fields( $fields ) { 'show_on_frontend' => false, 'cols' => 4, 'order' => 30, + 'jobfeed_notes' => array( + 'data_type' => 'text', + 'input_type' => 'text', + 'default_value' => '', + 'example_value' => 'https://apply.url', + 'notes' => __( 'If the client is supporting application URLs rather than using the tracking email address, this is the URL where candidates can apply on a Broadbean hosted application form', 'wpbroadbean' ), + ), ); /* add the salary display field */ @@ -107,6 +135,13 @@ function wpbb_add_default_job_fields( $fields ) { 'show_on_frontend' => true, 'cols' => 3, 'order' => 40, + 'jobfeed_notes' => array( + 'data_type' => 'string', + 'input_type' => 'text', + 'default_value' => '', + 'example_value' => __( '£30,000 per year with benefits including travel and conference budget', 'wpbroadbean' ), + 'notes' => __( 'A string explaining any salary and benefits the candidate may receive.', 'wpbroadbean' ), + ), ); /* add the salary field */ @@ -119,6 +154,13 @@ function wpbb_add_default_job_fields( $fields ) { 'show_on_frontend' => false, 'cols' => 2, 'order' => 50, + 'jobfeed_notes' => array( + 'data_type' => 'integer', + 'input_type' => 'number', + 'default_value' => '', + 'example_value' => '30000', + 'notes' => __( 'An integer value to represent the salary on offer for this job. If a site uses salary search, this value is used to determin the salary for the job.', 'wpbroadbean' ), + ), ); /* add the salary from field */ @@ -131,6 +173,13 @@ function wpbb_add_default_job_fields( $fields ) { 'show_on_frontend' => true, 'cols' => 2, 'order' => 60, + 'jobfeed_notes' => array( + 'data_type' => 'integer', + 'input_type' => 'number', + 'default_value' => '', + 'example_value' => '26000', + 'notes' => __( 'An integer value to represent the low salary range value for this job.', 'wpbroadbean' ), + ), ); /* add the salary from field */ @@ -143,6 +192,13 @@ function wpbb_add_default_job_fields( $fields ) { 'show_on_frontend' => true, 'cols' => 2, 'order' => 70, + 'jobfeed_notes' => array( + 'data_type' => 'integer', + 'input_type' => 'number', + 'default_value' => '', + 'example_value' => '30000', + 'notes' => __( 'An integer value to represent the high salary range value for this job.', 'wpbroadbean' ), + ), ); /* add the job reference field */ @@ -155,6 +211,13 @@ function wpbb_add_default_job_fields( $fields ) { 'show_on_frontend' => false, 'cols' => 3, 'order' => 80, + 'jobfeed_notes' => array( + 'data_type' => 'string', + 'input_type' => 'select', + 'default_value' => 'GBP', + 'example_value' => 'USD', + 'notes' => __( 'Support for USD, GBP and EUR are provided. A select input for these options would be good.', 'wpbroadbean' ), + ), ); /* add the job reference field */ @@ -167,6 +230,13 @@ function wpbb_add_default_job_fields( $fields ) { 'show_on_frontend' => false, 'cols' => 6, 'order' => 90, + 'jobfeed_notes' => array( + 'data_type' => 'integer', + 'input_type' => 'number', + 'default_value' => '28', + 'example_value' => '16', + 'notes' => __( 'The number of days the job should be advertised on ths site for.', 'wpbroadbean' ), + ), ); // add the application tracking url field. @@ -179,6 +249,13 @@ function wpbb_add_default_job_fields( $fields ) { 'show_on_frontend' => false, 'cols' => 6, 'order' => 100, + 'jobfeed_notes' => array( + 'data_type' => 'text', + 'input_type' => 'email', + 'default_value' => '', + 'example_value' => 'john@company.com', + 'notes' => __( 'The email address of the consultant posting the job. Likely this can be pulled from their Broadbean/Adcourier account and set automatically without having to manually enter it.', 'wpbroadbean' ), + ), ); /* return the modified fields array */ diff --git a/inc/post-types.php b/inc/post-types.php index 87b47af..e99d506 100644 --- a/inc/post-types.php +++ b/inc/post-types.php @@ -34,6 +34,7 @@ function wpbb_register_job_post_type() { 'title', 'editor', 'excerpt', + 'author', ), 'query_var' => true, 'rewrite' => array( diff --git a/inc/taxonomies.php b/inc/taxonomies.php index a579a00..e75815d 100644 --- a/inc/taxonomies.php +++ b/inc/taxonomies.php @@ -33,6 +33,13 @@ function wpbb_register_default_taxonomies( $taxonomies ) { 'hierarchical' => true, 'show_admin_column' => true, 'show_on_frontend' => true, + 'jobfeed_notes' => array( + 'data_type' => 'string', + 'input_type' => 'text', + 'default_value' => '', + 'example_value' => 'Accounting|Computing', + 'notes' => __( 'A pipe seperated string of job industries.', 'wpbroadbean' ), + ), ); // add the job location taxonomy. @@ -46,6 +53,13 @@ function wpbb_register_default_taxonomies( $taxonomies ) { 'hierarchical' => true, 'show_admin_column' => true, 'show_on_frontend' => true, + 'jobfeed_notes' => array( + 'data_type' => 'string', + 'input_type' => 'text', + 'default_value' => '', + 'example_value' => 'London|Manchester', + 'notes' => __( 'A pipe seperated string of job locations. It is better if this plugin has a defined list of locations to support, rather than using the standard Broadbean locations.', 'wpbroadbean' ), + ), ); // add the job type taxonomy. @@ -59,6 +73,13 @@ function wpbb_register_default_taxonomies( $taxonomies ) { 'hierarchical' => true, 'show_admin_column' => true, 'show_on_frontend' => true, + 'jobfeed_notes' => array( + 'data_type' => 'string', + 'input_type' => 'text', + 'default_value' => '', + 'example_value' => 'Permanent|Temporary|Contract', + 'notes' => __( 'A pipe seperated string of job types.', 'wpbroadbean' ), + ), ); // add the job skills taxonomy. @@ -72,6 +93,13 @@ function wpbb_register_default_taxonomies( $taxonomies ) { 'hierarchical' => false, 'show_admin_column' => true, 'show_on_frontend' => true, + 'jobfeed_notes' => array( + 'data_type' => 'string', + 'input_type' => 'text', + 'default_value' => '', + 'example_value' => 'PHP|Javascript', + 'notes' => __( 'A pipe seperated string of job skills.', 'wpbroadbean' ), + ), ); // return the modified taxonomies. diff --git a/readme.txt b/readme.txt index 708134c..42ebc18 100755 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,8 @@ Tags: jobs, recruitment Requires at least: 5.1 Requires PHP: 5.6 Tested up to: 5.2 -Stable tag: 3.0.3 +Stable tag: 3.0.4 +Donate link: https://store.highrise.digital/downloads/wpbroadbean-support-docs/ License: GPLv3 or later License URI: https://www.gnu.org/licenses/gpl-3.0.html @@ -12,15 +13,19 @@ WP Broadbean is a plugin which allows jobs added to Broadbean to show in your Wo == Description == -[WP Broadbean](https://highrise.digital/products/wpbroadbean-wordpress-plugin/) is a plugin designed to work alongside the [Broadbean job posting and distribution](https://www.broadbean.com/uk/products/features/job-posting-distribution/) system allowing jobs written in Broadbean to show in your WordPress site. The plugin adds custom post types and taxonomies to allow you to add jobs. More importantly it allows your site to accept feed data sent by Broadbean to create jobs on your site. +[WP Broadbean](https://highrise.digital/products/wpbroadbean-wordpress-plugin/) is a WordPress plugin designed to work alongside the [Broadbean job posting and distribution](https://www.broadbean.com/uk/products/features/job-posting-distribution/) system allowing jobs written in Broadbean to show in your WordPress site. -The plugin requires some collaboration with the Broadbean integrations team. This is because they need to add your WordPress site as a posting destination, and to build a "feed" to your WordPress sites endpoint, provided by this plugin, in the form of XML data. +The plugin adds custom post types and taxonomies to allow you to add jobs. More importantly it allows your site to accept feed data sent by Broadbean to create jobs on your site. -If you are struggling with any aspects of a site integration, we offer a complete integration service which you can take advantage of. Find out more about our this on our [WP Broadbean information page](https://highrise.digital/products/wpbroadbean-wordpress-plugin/). +The plugin requires some collaboration with the Broadbean integrations team. This is because they need to add your WordPress site as a posting destination, and to build a "feed" to your WordPress sites endpoint, provided by this plugin, in the form of XML data. They are likely to charge you for this service. -We also have some add-ons for this plugin which you can find out more about on the [WP Broadbean plugin page](https://highrise.digital/products/wpbroadbean-wordpress-plugin/). +## Support and documentation + +This plugin is provided as is, and community support is available via the support forums here. If you are looking for expert help in getting your site setup to post jobs from Broadbean, Highrise Digital offer a couple of solutions. We can provide [bespoke consultancy](https://highrise.digital/contact/), support and development however we also have a [support add-on package](https://store.highrise.digital/downloads/wpbroadbean-support-docs/). This add-on package provides all the information Broadbean need to build your job feed, access to our extensive plugin documentation resource and limited email support from the team at Highrise Digital. -Highrise Digital also offer a number of [WordPress Broadbean integration services](https://highrise.digital/broadbean-wordpress-integrations/) as well as services to [integrate LogicMelon with WordPress](https://highrise.digital/services/integrate-logicmelon-wordpress/). +## WP Broadbean add-ons + +We also have some add-ons for this plugin which you can find out more about on the [WP Broadbean plugin page](https://highrise.digital/products/wpbroadbean-wordpress-plugin/). For the sake of clarity, the WP Broadbean plugin is not affiliated in any way with Broadbean Technology Limited. @@ -38,7 +43,7 @@ To install the plugin: == Frequently Asked Questions == -It is a new version, therefore we don't have any FAQs just yet. Feel free to [submit an issue](https://github.com/highrisedigital/wpbroadbean/issues) over on the Github repository. We can then turn the popular questions into FAQs on the Wiki. +Frequently asked questions are available [here](https://store.highrise.digital/docs/wp-broadbean/). == Screenshots == @@ -46,6 +51,12 @@ It is a new version, therefore we don't have any FAQs just yet. Feel free to [su == Changelog == += 3.0.4 = +* Added job feed notes to the default job fields and taxonomies. +* Added information to the settings page and the new support add-on. +* Move the after settings hooks so it is actually after all the settings on the settings page. +* Allows the job author to be set in WordPress based on the `consultant_email` field. + = 3.0.3 = * Correct check for an empty value for the posted XML before proceeding with the inbox template. Prevents warnings when the posted data is incorrect and gives the appropriate error message. * Fix a call to and undefined function in the post title filter functions. Thanks to @bencorke for contributing this fix and finding the bug. diff --git a/templates/inbox.php b/templates/inbox.php index a271969..a19230f 100644 --- a/templates/inbox.php +++ b/templates/inbox.php @@ -74,6 +74,31 @@ } + // set a default author ID to zero. + $author = 0; + + // do we have a consultant email in the feed. + if ( ! empty( $xml->consultant_email ) ) { + + // check if consultant email is a valid email. + if ( is_email( $xml->consultant_email ) ) { + + // check for a WordPress user with this email address. + $user = get_user_by( 'email', $xml->consultant_email ); + + // if we have a user returned. + if ( false !== $user ) { + + // set the author as the users user id. + $author = $user->ID; + + } + } + } + + // add the author to the insert post args. + $insert_job_args['post_author'] = absint( $author ); + /** * Lets now insert the post for this job. * Uses the standard wp_insert_post function. diff --git a/views/settings-ctas.php b/views/settings-ctas.php index 442b425..25524e5 100644 --- a/views/settings-ctas.php +++ b/views/settings-ctas.php @@ -38,7 +38,7 @@ - + diff --git a/wpbroadbean.php b/wpbroadbean.php index ec5edac..474656a 100755 --- a/wpbroadbean.php +++ b/wpbroadbean.php @@ -3,7 +3,7 @@ Plugin Name: WP Broadbean Plugin URI: https://highrise.digital/products/wpbroadbean-wordpress-plugin/ Description: A plugin which integrates Broadbean job posting and distribution with WordPress. It allows jobs written in Broadbean to be distributed to a WordPress site and have applications made to those jobs in WordPress delivered back to Broadbean. -Version: 3.0.2 +Version: 3.0.4 Author: Highrise Digital Author URI: https://highrise.digital License: GPLv3 or later @@ -31,7 +31,7 @@ define( 'WPBB_LOCATION_URL', plugins_url( '', __FILE__ ) ); // Define plugin version constant and db version constant. -define( 'WPBB_PLUGIN_VERSION', '3.0.3' ); +define( 'WPBB_PLUGIN_VERSION', '3.0.4' ); define( 'WPBB_PLUGIN_DB_VERSION', 2 ); /**