field editor – sMyles Plugins https://plugins.smyl.es WordPress and WHMCS Plugins Tue, 17 Dec 2024 22:26:17 +0000 en-US hourly 1 https://wordpress.org/?v=4.6.29 Field Editor 1.12.0 Released! New features and updates! https://plugins.smyl.es/release-announcements/field-editor-1-12-0-released-new-features-and-updates/ https://plugins.smyl.es/release-announcements/field-editor-1-12-0-released-new-features-and-updates/#respond Tue, 18 Jan 2022 00:33:09 +0000 https://plugins.smyl.es/?p=196656 Version 1.12.0 of Field Editor is now available and it includes a good bit of fixes and new features that have been in the work for a little while, which i’ll give a little more details about below.

Prevent saving empty meta in database

Basically what this does is it prevents any value for a meta field, that is an empty string, or an empty array, from being saved to the database, ultimately meaning your database should only store actual values.  The reason this was not something already done is because of the way the core WP Job Manager plugin works.  It does not check if the value should be saved based on “what” the value is, it just checks if it was submitted with the form and saves it.  For example, if you have a field that is not required, when it is submitted through the form, it is still saved to the database as an empty value (by the core WP Job Manager plugin).  This update adds handling in my plugin that will check every custom or customized field for this.  Please note you must have saved the field using my plugin for this functionality to work on the field.  Even if you don’t want to make any changes to the field, just click on Edit in my plugin, and then save, and it will save the field configuration and the field will now be a “customized” one (even if you didn’t change anything).

This should help alleviate unnecessary database rows and ultimately make your site run faster!  This handling works both in the admin and frontend.  If you want to see it in action, enable the Post Meta Inspector from Debug tab (Field Editor Configuration Page) and try it out in the admin area!

If you want to disable this in the Frontend or Admin area, just add this your child theme’s functions.php file (omit the <?php, there only needs to be one at the top of the functions.php file),  or using the Code Snippets plugin:

https://gist.github.com/tripflex/b2ef3cc6fc1363d0f9cc39af0ee47eac

Include Field Meta in REST API

As there are many mobile apps starting to come out soon (Cariera), some of them will use REST API (or maybe even you do for external services).  A new setting is available under the “Advanced” tab when editing a field, where you can enable this setting.  Please note you will not see this setting for any taxonomy fields as those should already be handled natively depending on how you setup/created custom taxonomies.

Multiple Meta Keys in Auto Populate

You can now use multiple meta key in the auto populate feature!  All you have to do is separate them by a space and the plugin will handle the rest.  As an example, if you wanted to populate a field with a user’s full name, you would just enter first_name last_name in the auto populate field (take note of the space).

 

Astoundify Companies Plugin

This release adds support for the Astoundify Companies Plugin (yes there’s another one out there), albeit in beta though so please make sure to report any issues you have!  Unfortunately for me with all of the different company plugins out there, and integrations in different themes, it makes it much more difficult to maintain compatibility (or even add it), as they are using different post types, or many other changes/differences that I have to make sure to account for.  This release adds the initial support for the Astoundify version, but there unfortunately is only about 3 or 4 auto output locations available (due to the plugin itself not having hooks in many locations).

If you’re still looking for a Companies plugin I would recommend the free MAS Companies one or the Cariera theme which has it built in, as Astoundify for some reason removed me from their Slack Channel.  Support for this plugin is provided for clients who are already using this plugin, if you are not already, i do not recommend it.

If anything I suggest the Cariera theme as this developer is very active and we stay in constant contact to maintain compatibility.

 

Other Updates

There’s numerous other updates and fixes included with this release, head on over to the changelog to check them out!

]]>
https://plugins.smyl.es/release-announcements/field-editor-1-12-0-released-new-features-and-updates/feed/ 0
WP Job Manager Field Editor 1.10.0 Update – Select2, Cariera, Companies, & More! https://plugins.smyl.es/release-announcements/wp-job-manager-field-editor-1-10-0-update-select2-cariera-companies-more/ https://plugins.smyl.es/release-announcements/wp-job-manager-field-editor-1-10-0-update-select2-cariera-companies-more/#respond Thu, 03 Sep 2020 23:04:37 +0000 https://plugins.smyl.es/?p=184782 I’m happy to announce that version 1.10.0 of the Field Editor plugin has been released!  This is a minor revision version (meaning still backwards compatible) but also has a lot of changes under the hood!  Here’s the details…

First and foremost, MAKE A BACKUP! After backing up your current copy of the Field Editor plugin, MAKE SURE that you thoroughly test the new version!

Reason being, this version switches from using Chosen.js to Select2, which the conditional logic, dynamic child taxonomies, and multiselect fields all rely on.  This update also changes a bit how fields are passed around in the plugin, as well as how auto output is handled.

There shouldn’t be any issues, but depending on your situation (theme, custom configuration, overrides, etc) there could be issues with the switch to Select2 (more details below).

This update also requires WP Job Manager to be a minimum version of 1.32.0 (released January 2019)

Chosen.JS to Select2

As mentioned above, this version switches from using Chosen.js to Select2 (which is standard for WP Job Manager now), the only reason that Chosen.js has been used up until now was I had to rewrite a lot of the conditional logic and dynamic child taxonomies code that was originally coded for Chosen.js.

With the switch to Select2, this opens up the ability for future features like the ability for users to add custom taxonomies from the submit form (coming soon), as well as mobile support for multiselect items, and ultimately better looking select boxes.

If at any time you want to switch back to using Chosen.js, you can do so via the Field Editor Settings page as shown in the screenshot below.  Enable the setting “Chosen”.  

Disable Select2 and use Chosen.JS

Disable Select2 and use Chosen.JS

This is only recommended as a last resort if you’re having issues.  If you do have problems, please open a support ticket and let me know.  This update also required updates to these field template files:

  • multiselect-field.php
  • select-field.php 
  • term-multiselect-field.php
  • term-select-field.php

Please make sure if you’re using template overrides, that you update yours to support Select2.  Open a support ticket if you need help with this.

reCAPTCHA v2 Invisible

reCAPTCHA v2 Invisible

reCAPTCHA v2 Invisible

This release also adds support for “Invisible” reCAPTCHA from Google.  This reCAPTCHA type will automatically handle detecting if Google thinks the user is a bot or not, and will decide whether or not to show the reCAPTCHA challenge, whereas the original supported version was a checkbox that required the user to select it before they could submit a listing.

PLEASE NOTE you MUST configure an invisible API key in the settings if you wish to use this feature.  You can not use the original or any existing reCAPTCHA api keys that you have configured already.  This is very easy to setup, and you can do so from Google’s website.

Invisible reCAPTCHA Configuration

Invisible reCAPTCHA Configuration

To configure using the invisible reCAPTCHA you can do so by selecting “Invisible” under the Size setting for reCAPTCHA.

You can see an example of this in the screenshot on the left.

 

Cariera Theme Support

After a lot of requests from clients for support with the Cariera theme and the developer of that theme being very responsive, we have spent a lot of time working together to bring you guys an amazing update with lots of features.

The most important update with the theme support, is the support for the Company Fields which is included natively with the Cariera theme.  The “Companies” included with Cariera is basically the same features that you get from WP Company Manager, which is why the integration and support of WP Company Manager, which was a major undertaking, went hand in hand with the Cariera theme.

wp_job_manager_field_editor_cariera_overviewSupport for Cariera theme also includes formatting and the ability to define custom icons to use when using auto output in the “Job Overview”, “Resume Overview” and “Company Overview” area that you can see in the screenshot on the right.  In the Auto Output configuration this area is the “Meta Start”, “Meta End” and “Meta After” areas (for Job, Companies, and Resumes).

Cariera uses Font Awesome 5 Free icons, you can find them here.  Once you find the icon you want to use, just use the value from class for the <i> element.  For example if the icon would be <i class="fas fa-address-card"></i> then you should enter fas fa-address-card into the classes field in auto output configuration.

 

WP Company Manager Support

One of the biggest updates from this release (besides Select2) is the support for the WP Company Manager plugin.  You will now see a “Company Fields” menu item under the main Companies menu item, where you can use the Field Editor plugin to configure those fields (conditional logic coming soon).  Pretty much everything below also applies to Cariera theme companies.

You will still see the “Company Fields” sub-menu item under the Job Listings main menu, but those should only be one or two at the most (to configure fields like the “Select Company” on job submit page).  When using WP Company Manager (or Cariera) you should probably never need to edit or add fields here (under Job Listings menu item), as they should all be configured under the main “Companies” menu item for editing fields.

Auto Output

Auto output configuration under these new “Company” fields can be configured to output on both Job Listing pages and Company Listing pages (most commonly on job listings).  You should see all the same auto output locations that you have available under job fields.

Shortcodes

When you want to output a specific “Company” field on a Job Listing, you must make sure that you use the field_group="company_fields" parameter/argument, so the plugin knows that you’re trying to output a field that is actually from the “company” and not from a field called “company_name” saved on a job listing.

[company_field key="company_name" field_group="company_fields"]

PHP

This is exactly the same as above, when using PHP to pull values for “Company Fields” you need to specify field_group in the arguments passed to the function.  For example:

<?php the_custom_field( 'company_specific_field', null, array( 'field_group' => 'company_fields' ) ); ?>

The second argument in that function call is null because we want to let the plugin auto detect the Listing ID to pull that value from.  If you want to pull from a specific listing, pass that value instead of null.

Other Updates

A major fix that came around with the companies handling, was fixing issues with the same meta key being used in different field sections.  This required a bit of work to maintain compatibility (for pulling/displaying values and storing configurations), but is now completely possible.

WordPress 5.5 also introduced removing jQuery Migrate, which some of my older code relied on, this has also been fixed in the latest release.

There are also numerous other tweaks and enhancements made to the plugin while these features above were integrated, which is even more reason to make sure and test your site when upgrading!

You can view the full changelog here

]]>
https://plugins.smyl.es/release-announcements/wp-job-manager-field-editor-1-10-0-update-select2-cariera-companies-more/feed/ 0
How to downgrade WP Job Manager to 1.31.3 (or other versions) https://plugins.smyl.es/blog/wp-job-manager-1-32-0-warning-how-to-downgrade https://plugins.smyl.es/blog/wp-job-manager-1-32-0-warning-how-to-downgrade#respond Wed, 23 Jan 2019 20:02:02 +0000 https://plugins.smyl.es/?p=165746 As some of you may have noticed, today WP Job Manager 1.32.0 was released, which includes a major change and switch from using the Chosen.JS library, to the Select2 library (for the multiselect dropdown fields).  This change has caused a major issue in relation to a lot of the field editor code base, which specifically targets the Chosen.JS library for handling things like Conditional Logic, Dynamic Taxonomies, and even custom Multiselect fields.  Below I will explain very easily how you can downgrade back to version 1.31.3, until I can release the update to the field editor plugin that supports the change to Select2, as well as details regarding why WP Job Manager is switching to Select2, and why it’s taking a while for a Field Editor update to support this…

WP Job Manager Field Editor 1.8.9 has been released which  is fully compatible with WP Job Manager 1.32.0+

While this blog post specifically related to WP Job Manager Field Editor, chances are the update for 1.32.0 will also break and cause issues with themes and other addon plugins that rely on Chosen.JS, so PLEASE be careful before upgrading to this version even after an update for Field Editor has been released,  and make sure to thoroughly TEST your site to make sure it does not break other parts of your site (separate from my plugins).

The tutorial below for downgrading to WP Job Manager 1.31.3 is not specific to any plugin or theme.  If your theme developer or plugin developer has sent you to this page, you can disregard the references to the Field Editor plugin.

Backup Backup Backup

First and foremost, before you upgrade or downgrade ANYTHING on your site, you should ALWAYS create a backup!   Which you did before you upgraded WP Job Manager to version 1.32.0, right?  right?  If you did not, it’s not too late!!   You should ALWAYS get in the habit of creating backups before upgrading core WordPress, Themes, or any plugins!  The day that you upgrade and have issues and realize the backup just saved you days of work, you will thank me!

There are numerous free and paid WordPress backup plugins, which you can find the free (or freemium) ones on the WordPress plugin repository (or through searching from your WordPress installation).

BackupBuddy

BackupBuddy

My favorite is Backup Buddy, but that is also a paid plugin, and it is WELL WORTH THE COST!

Existing clients can temporarily get a free promotional copy of BackupBuddy, here: https://plugins.smyl.es/backupbuddy-field-editor-promotion/ (you must be an existing client and logged into your account)

If you like the BackupBuddy plugin, I strongly recommend purchasing a license for it, as this supports the developers and further development of the plugin.   Some hosting companies may have issues with the plugin, if you have issues, I recommend trying different settings from the Advanced tab in settings, or contacting your hosting provider and asking them what to set to get BackupBuddy to work with them.  If they do not help, ask them what you should use for backups, as they should give you some kind of legitimate answer as to how to backup your WordPress site, and if not … you may need to think about choosing another provider.  95% of the time most BackupBuddy works out of the box without changing any settings.

Another free option that I like and works well, is the Duplicator plugin

Now that you have a full backup of your site, let’s proceed to downgrading WP  Job Manager to version 1.31.3

This is not absolutely necessary, as we’re just downgrading to an older version of WP Job Manager, and there should be no issues, but I want you guys to get in the habit of creating backups so it becomes a routine when upgrading your site, plugins, or themes!

WP Rollback (easy)

The easiest way to rollback to version 1.31.3 on your site is using the WP Rollback plugin by installing it directly from your WordPress installation.

WP Rollback Plugin

WP Rollback Plugin

Goto your WordPress admin area, and under Plugins click “Add New”, and then search for rollback as you can see in the screenshot on the left.

Once you see the WP Rollback plugin, install and activate it on your site.  This will allow you to rollback any plugins you have installed, to different versions available from the WordPress repository.

 

WP Job Manager Rollback

WP Job Manager Rollback

After you have installed and activated the plugin, goto the Plugins page (which lists all installed/activated plugins, and you will now see a new link menu item that says Rollback as you can see in the screenshot on the right.

Click on the Rollback link and it will bring you to another page to select the version to rollback to.

WP Job Manager Rollback 1.31.3

WP Job Manager Rollback 1.31.3

On this next screen you will want to select the latest version prior to 1.32.0 which would be 1.31.3

Select that version, and then click on the Rollback button.  It will prompt you to test on a staging site, and create a backup … which you should already have a backup of your  site, and if you DO NOT, you should make a backup NOW before doing anything else (read above)!

After you click Rollback this will install the 1.31.3 version of WP Job Manager, and will show you a page to Activate the plugin.

That’s it!  You’ve now downgraded to version 1.31.3 of WP Job Manager!  If you want more details about why it is taking so long to update the field editor to support this new version, please see the bottom of this page.

 

WordPress Plugin Repository (advanced)

Another way to downgrade to version 1.31.3 is to download the ZIP of that version of the plugin, directly from the WordPress plugin repository:
https://wordpress.org/plugins/wp-job-manager/advanced/

WP Job Manager WordPress Repository

WP Job Manager WordPress Repository

Browse to the link above, and towards the bottom of the page you should see something that looks like the screenshot to the left.

Select version 1.31.3 from the dropdown, and click Download

This will download the ZIP file for WP Job Manager version 1.31.3.

 

WP Job Manager Delete Data on Uninstall

WP Job Manager Delete Data on Uninstall

Next we will need to check the settings in WP Job Manager to make sure you DO NOT have the setting enabled to delete data on uninstall.

From your WordPress admin area, goto the Settings sub-menu item from the Job Listings main menu item.  Under the General tab, you should see a setting exactly like the one in the screenshot on the right.

Make sure this is NOT CHECKED, if it is, uncheck it and click Save.   Failure to uncheck this setting will result in data being removed in the next step!

 

Now that you’ve made sure data will not be removed on uninstall, goto your WordPress admin area, click on Plugins and scroll down to the WP Job Manager plugin.

WP Job Manager Deactivate

WP Job Manager Deactivate

Click on Deactivate to deactivate the plugin on your site.

The page should reload.

 

WP Job Manager Delete

WP Job Manager Delete

Scroll back down to the WP Job Manager plugin, and you should now see Delete.

Click Delete to remove the newer version of WP Job Manager from your site.

 

WordPress Plugins Add New

WordPress Plugins Add New

After you have deleted the WP Job Manager plugin from your site, go back to the Plugins page.

In the top left corner of the page you should see the Add New button.  Click on it.

 

WordPress Plugins Upload

WordPress Plugins Upload

This will bring you to another page, where in that same area the Add New button was.

You should now see one that says Upload Plugin, click on that button.

WordPress Plugins Select File

WordPress Plugins Select File

A new area should now appear similar to the screenshot on the left, you will want to click on Choose File and select that ZIP file you downloaded from above.

Click on Install Now and this will install that version of WP Job Manager that you downloaded.

These instructions above are standard for installing any kind of WordPress plugin

 

Why doesn’t Field Editor support 1.32.0+ yet?  1.8.9+ Does!

A few clients have asked my why Field Editor isn’t wasn’t ready for WP Job Manager 1.32.0+, and i’ll go into this a bit below to explain the issues, updates, and what is going on.

WP Job Manager Field Editor 1.8.9+ supports WP Job Manager 1.32.0+

Why Chosen.JS or Select2 Libraries?

WP Job Manager Job Category Chosen.JS

WP Job Manager Job Category Chosen.JS

So to explain a bit if you’re not aware, or do not know what Chosen.JS or Select2 is … they are both open source libraries for creating the dropdown boxes everyone is familiar with and are used for the Multiselect field types (both Taxonomy and non-taxonomy).

The screenshot to the left should probably be familiar to you. This is an example of the Job Category field using Chosen.JS on a single select taxonomy dropdown.

WP Job Manager Job Tags Multiselect Chosen.JS

WP Job Manager Job Tags Multiselect Chosen.JS

Another common use for the library is for multiselect fields, which you can see an example of this, on the right.

The example on the right is for the Job Tags field which was changed to a multiselect using my Field Editor plugin.  Looks nice, right?  Unfortunately this isn’t something that is just “native” to your web browser, and without Chosen.JS or Select2, it would actually look like this:

Job Tags Default Multiselect

Job Tags Default Multiselect

I’m sure we can all agree that the default multiselect, is just ugly, and not user intuitive (meaning it’s hard for basic users to know how to even use it).  That is why the core WP Job Manager plugin, up until today, has been using the Chosen.JS library … to make multiselect boxes look much nicer, and easier to use.

Why switch from Chosen.JS to Select2?

While the Chosen.JS library is very nice and easy to use, and has been around for a while … it also lacks in numerous areas where features are needed, isn’t updated as frequently as Select2, and Select2 is the framework used by popular plugins like WooCommerce and others.

Some issues include things like the required attribute ( https://github.com/harvesthq/chosen/issues/515 ) which you can see at the bottom I actually provided a solution, but since the issue was opened in 2012, nothing had been done about it.

There’s also the controversial issue surrounding mobile support ( https://github.com/harvesthq/chosen/pull/1388 ), as Chosen.JS does not support mobile devices, and relies on the user’s device for handling it.

There have been numerous issues opened on the WP Job Manager github repository regarding this:

https://github.com/Automattic/WP-Job-Manager/issues/1202

And essentially the WP Job Manager team decided to switch to using Select2 instead of Chosen.JS ( https://github.com/Automattic/WP-Job-Manager/pull/1645 ), which adds numerous new features that allow for added functionality in the WP Job Manager plugin (like searching for users when editing from admin area).

How does this affect WP Job Manager Field Editor?

This actually has a HUGE impact on the field editor plugin, as each library (Chosen.JS and Select2), has completely different ways of handling configurations, events, and triggers that happen when a value is changed, updated, selected, etc.

If you’re using my field editor plugin, chances are you have created a custom multiselect field, and maybe using a feature like setting the max number of selected options.  The field editor plugin has specific code in it to initialize those multiselect fields, setting the max selected configuration, but this is done completely different in Chosen.JS than it is in Select2.

The issue above is actually something very easy to fix, the major issue here is related to the Conditional Logic, and Dynamic Taxonomy features that were recently added.  Just the conditional logic javascript has over has almost 1,800 lines of code, with most of that specifically targeting the way that Chosen.JS initializes the fields, waiting for them to be initialized, as well as handling when a value is added, removed, or changed.  That doesn’t include the 1,300 lines of PHP code, half of which is specific to Chosen.JS as well.

A couple of the specific details are that Chosen.JS triggers an event on change, passing selected and deselected values, whereas Select2 does not.  PHP code was implemented to pass data of what fields are Chosen.JS and handles modification of the field and configurations, to make sure they are initialized correctly using that specific meta key’s configuration.

This means that the majority of this codebase for conditional logic has to be rewritten, and thoroughly tested to make sure it’s compatible with Select2 (basically meaning I have to start over again, and redesign the flow of how conditional logic is handled).

The other major issue as mentioned above, is the recently released dynamic taxonomy feature.  This was also entirely based on Chosen.JS, and is around 1,000 lines of JavaScript code that also has to be rewritten/refactored, and tested to make sure it’s compatible with Select2.

These are just some of the features directly effected in WP Job Manager Field Editor by the switch to Select2.  That doesn’t include the numerous lines of PHP and JavaScript code added over the years to make new fields compatible, have added features, and more.

I have been actively working on, and testing updated codebase for Select2 support over the past month+, and hope to have something to release very soon.

With that said, I also want to point out that this requires a very extensive amount of testing, and debugging, due to the infinite possibilities/configurations/implementations there are in the conditional logic, and dynamic taxonomy child dropdown features.

As most of you may already know, I take pride in all the code that I write, and would never release something that has known issues (::cough: microsoft ::cough::), as I do care about my clients and their sites, and want to make sure that once they upgrade, they don’t have to worry about it breaking something.  This is why I posted this tutorial of how to downgrade, so you can still have a full functioning site until I can be 99.999% sure that the update for field editor, will not break or cause issues for you.

I also have to spend the time writing compatibility code for those users who will be using an older version of WP Job Manager (older than 1.32.0), which essentially means my plugin will have to support BOTH Select2 and Chosen.JS, until the next major release version (2.x.x) where Chosen.JS support will be removed.

I will be releasing I have released an update for the Field Editor plugin here in the next couple days, version 1.8.9, which will be the last release of the Field Editor 1.8.x versions, as this release will fix a couple minor bugs and issues for those who want to remain on an older version of WP Job Manager, or do not want to use Select2.

Thank you for your understanding and patience while I am working on this, as this is not an easy task to add support for, and will require numerous long days and nights to finish up everything.

]]>
https://plugins.smyl.es/blog/wp-job-manager-1-32-0-warning-how-to-downgrade/feed/ 0
New Feature: Automatically output custom fields on Job/Resume Listing https://plugins.smyl.es/blog/new-feature-automatically-output-custom-fields-on-jobresume-listing/ https://plugins.smyl.es/blog/new-feature-automatically-output-custom-fields-on-jobresume-listing/#respond Fri, 12 Sep 2014 20:28:46 +0000 https://plugins.smyl.es/?p=6628 With the release of WP Job Manager Field Editor version 1.1.8 a new feature has been included which now allows you to specify custom fields you want to automatically output on Job/Resume listings.  You can still use the integrated WidgetPHP or Shortcodes to output the custom fields, but it is now a lot easier to do so and includes a few nice features that allow you to customize your site as you want.  The plugin will only output and show whenever this field value is not blank, so if you have a field that is optional you do not have to worry about it showing the label with no value or any other invalid HTML.

WP Job Manager Field Editor New Modal

WP Job Manager Field Editor New Modal

New Modal Layout

When you update your version of the plugin to 1.1.8 you will see the modal for editing fields has a new look to it, and that is because it now includes what I like to call “tabs”, which allows a lot more room for customization, and adding new features.  This is also the start of laying the groundwork for the new “tab” section for options that will provide much easier method of adding dropdown options (basically a couple fields with an add more button).

The new modal will look similar to the image on the left.

 


WP Job Manager Field Editor Field Output Tab

WP Job Manager Field Editor Field Output Tab

Field Output Tab

As you can see on the left of the new modal layout there is a Field Output tab you can click on (will only show for custom fields), this will show another configuration area where you can specify if you want this custom field to automatically output on the Job/Resume listing with a few options which I will go over below.

 

 

 


WP Job Manager Field Editor Choose Output

WP Job Manager Field Editor Choose Output

Field Output Location

In the first dropdown you will find all the available locations you can choose to automatically output the field value at.  This will be the same for Job and Resumes and includes 4 different locations:

  • Top of Job Listing (before meta)
  • Bottom of Job Listing
  • Meta Start (inside UL list before Job Type)
  • Meta End (inside UL list after Date Posted)

 

To give you an understanding of these locations below is an example Job Listing with custom fields added in each one of the available locations:

WP Job Manager Field Editor Auto Output Areas

WP Job Manager Field Editor Auto Output Areas

 


Styling Custom Fields on Job/Resume Listing

Because WP Job Manager Field Editor does not include any styles (which 99% of the time causes problems), the plugin relies on your theme or adding custom styles to get everything to appear exactly how you would want it to.  Luckily I took this into consideration when adding this new features and as such there are standard wrapper and field divs that you can use to create your own CSS styles ( will probably add this as a feature in future release ).

Top/Bottom of Job Listing

Each custom field you set to automatically output on the job/resume listing will be wrapped in a <div>  with 1 class and 1 ID.

The value from the custom field will be inside another <div>  with 1 class and 1 ID.  The syntax used for the <div>  you can see below, the actual output will vary based on the field’s meta key, so using the syntax below FIELD_META_KEY  will be whatever that field’s meta key is.

Wrapper DIV:

<div id="jmfe-wrap-FIELD_META_KEY" class="jmfe-custom-field-wrap">

Field Value DIV:

<div id="jmfe-custom-FIELD_META_KEY" class="jmfe-custom-field">

As an example, if you were to set a custom field with a meta key of job_salary  to output at the top of the job listing, this is the HTML the plugin will automatically generate:

<div id="jmfe-wrap-job_salary" class="jmfe-custom-field-wrap">
    <strong>Job Salary:</strong>
    <div id="jmfe-custom-job_salary" class="jmfe-custom-field">
        $99,000
    </div>
</div>

You can also specify your own custom classes to add to the field value’s <div>  which I will explain further below.

The <strong>Job Salary:</strong>  is added only when Show Label is checked in the field configuration.

Meta Start/End Output

If you decide to pick to automatically output at meta start or meta end the ID and classes are exactly the same above except that instead of a <div>  for the wrapper it will be an <li>  wrapper.  Below is an example of the automatically generated HTML for the same field from above, except this example would be either at meta start or meta end:

<li id="jmfe-wrap-job_salary" class="jmfe-custom-field-wrap">
    <strong>Job Salary:</strong>
    <div id="jmfe-custom-job_salary" class="jmfe-custom-field">
        $99,000
    </div>
</li>

This is because the meta locations are inside of the <ul class=”meta”>  wrapper and in order to show correctly they must be added as <li>  items.


 

Output As Options

WP Job Manager Field Editor Output As Options

WP Job Manager Field Editor Output As Options

As you can see in the image to the left there are currently 4 available output types (as of v1.1.8):

 

  • Standard Value Output (regular text)
  • Link
  • Image
  • oEmbed

 

 

Standard Value Output

This option is exactly as it sounds, it will output whatever the value is saved as.  This will probably be the most common output and if you are unsure I recommend using this option.

 

Link

The link option will output the value inside a link HTML tag.  So in the example from above instead of the value being inside a <div>  it will be inside a link tag with the href  value being set to whatever the value of the field is.  This would be useful for upload field types, profile links, etc.

Selecting this option will also show another field Output Caption where you can specify the caption for the link.  If a caption is not specified the URL will be used instead.

The link field is also useful for showing buttons, all you need to do is make sure your theme has CSS styles for buttons and simply add your own custom class in the Output Classes  text box.  Common CSS classes for buttons are button  btn  button-primary  btn-primary  and so on.

As an example, if I have a job_profile  custom field with Show Label checked, Output Caption set as “Employer Profile”, and “button” set in the Output Classes, this is the HTML that would be generated.  All links are set to open in a new window.  The http://domain.com/profile  comes from the value of the custom field for that job listing.

<div id="jmfe-wrap-job_profile" class="jmfe-custom-field-wrap">
    <strong>Job Profile:</strong>
    <a target="_blank" href="http://domain.com/profile" id="jmfe-custom-job_profile" class="jmfe-custom-field button">
        Employer Profile
    </a>
</div>

Image

Choosing the image option will use an <img>  tag instead of <div>  or <a>  from the examples above.  I would only recommend using this for file upload field types.  Reason being is if you set a custom field of of textbox and the user provides the URL to the image, chances are the job/resume listing will show the image box with an X if the image or URL doesn’t exist.  When the field type is an upload the file is on your server and will show correctly.

oEmbed

Using this option will attempt to generate the oembed HTML for things such as YouTube, SoundCloud, Vimeo, etc.  This would be useful for showing videos or other embeded items that you may have your custom field for.

Say you provide a field for users to enter the URL to a youtube video, and want that video to show on the job listing. This would be the option to choose to embed the YouTube video on that listing page.  There is a large number of sites that are supported, please see the WordPress Embeds page for more details.  The plugin will check if the URL provided in this field value is valid and will only output the embed HTML when the URL is valid.


 

Show Label

The show label checkbox gives you the option to have the Label from that field to show in the output.  If this field is checked the label will be shown with a colon after it.

]]>
https://plugins.smyl.es/blog/new-feature-automatically-output-custom-fields-on-jobresume-listing/feed/ 0
Widget now included with WP Job Manager Field Editor https://plugins.smyl.es/blog/widget-now-included-with-wp-job-manager-field-editor/ https://plugins.smyl.es/blog/widget-now-included-with-wp-job-manager-field-editor/#respond Fri, 29 Aug 2014 23:11:32 +0000 https://plugins.smyl.es/?p=3649 As of version 1.1.5 there is now a widget integrated with the WP Job Manager Field Editor plugin. You can use this widget to output any custom or default field anywhere that supports widgets.

You can still use Shortcodes or PHP Code to output custom field values, but now you also have the option to use a widget that is included with the WP Job Manager Field Editor plugin!

With the new widget you can select the field from a dropdown list of all available fields, and also select how you want the field to output the value.

Current field output options include:

  • Standard Text
  • Link
  • Image
  • oEmbed ( Vimeo, YouTube, SoundCloud, etc )

Use the oEmbed if you want to output a YouTube video or something else that is supported by the standard WordPress oEmbed.

]]>
https://plugins.smyl.es/blog/widget-now-included-with-wp-job-manager-field-editor/feed/ 0