*/
class Applyonline_Admin {
/**
* The ID of this plugin.
*
* @since 1.0.0
* @access private
* @var string $plugin_name The ID of this plugin.
*/
private $plugin_name;
/**
* The version of this plugin.
*
* @since 1.0.0
* @access private
* @var string $version The current version of this plugin.
*/
protected $version;
/**
* Initialize the class and set its properties.
*
* @since 1.0.0
* @param string $plugin_name The name of this plugin.
* @param string $version The version of this plugin.
*/
public function __construct( $plugin_name, $version ) {
$this->plugin_name = $plugin_name;
$this->version = $version;
// Hook - Applicant Listing - Column Name
add_filter( 'manage_edit-aol_application_columns', array ( $this, 'applicants_list_columns' ) );
// Hook - Applicant Listing - Column Value
add_action( 'manage_aol_application_posts_custom_column', array ( $this, 'applicants_list_columns_value' ), 10, 2 );
//Fix comments on application
add_filter('comment_row_actions', array($this, 'comments_fix'), 10, 2);
add_filter('post_row_actions',array($this, 'aol_post_row_actions'), 10, 2);
//Filter Aplications based on parent.
add_action( 'pre_get_posts', array($this, 'applications_filter') );
// Add Application data to the Application editor.
add_action ( 'edit_form_after_title', array ( $this, 'aol_application_post_editor' ) );
//Application Print
add_action('init', array($this, 'application_print'));
add_filter( 'post_date_column_status', array($this, 'application_date_column'), 10, 2);
$this->hooks_to_search_in_post_metas();
new Applyonline_MetaBoxes();
new Applyonline_Settings($version);
}
/**
* Register the stylesheets for the admin area.
*
* @since 1.0.0
*/
public function enqueue_styles() {
/**
* This function is provided for demonstration purposes only.
*
* An instance of this class should be passed to the run() function
* defined in Applyonline_Loader as all of the hooks are defined
* in that particular class.
*
* The Applyonline_Loader will then create the relationship
* between the defined hooks and the functions defined in this
* class.
*/
wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/applyonline-admin.css', array(), $this->version, 'all' );
wp_enqueue_style($this->plugin_name.'um-admin-builder', plugin_dir_url(__FILE__).'css/builder/um-admin-builder.css', array( ), $this->version, 'all');
wp_enqueue_style($this->plugin_name.'um-admin-columns', plugin_dir_url(__FILE__).'css/builder/um-admin-columns.css', array( ), $this->version, 'all');
wp_enqueue_style($this->plugin_name.'um-admin-dashboard', plugin_dir_url(__FILE__).'css/builder/um-admin-dashboard.css', array( ), $this->version, 'all');
wp_enqueue_style($this->plugin_name.'um-admin-form', plugin_dir_url(__FILE__).'css/builder/um-admin-form.css', array( ), $this->version, 'all');
wp_enqueue_style($this->plugin_name.'um-admin-forms', plugin_dir_url(__FILE__).'css/builder/um-admin-forms.css', array( ), $this->version, 'all');
wp_enqueue_style($this->plugin_name.'um-admin-global', plugin_dir_url(__FILE__).'css/builder/um-admin-global.css', array( ), $this->version, 'all');
wp_enqueue_style($this->plugin_name.'um-admin-menu', plugin_dir_url(__FILE__).'css/builder/um-admin-menu.css', array( ), $this->version, 'all');
wp_enqueue_style($this->plugin_name.'um-admin-misc', plugin_dir_url(__FILE__).'css/builder/um-admin-misc.css', array( ), $this->version, 'all');
wp_enqueue_style($this->plugin_name.'um-admin-modal', plugin_dir_url(__FILE__).'css/builder/um-admin-modal.css', array( ), $this->version, 'all');
}
/**
* Register the JavaScript for the admin area.
*
* @since 1.0.0
*/
public function enqueue_scripts() {
/**
* This function is provided for demonstration purposes only.
*
* An instance of this class should be passed to the run() function
* defined in Applyonline_Loader as all of the hooks are defined
* in that particular class.
*
* The Applyonline_Loader will then create the relationship
* between the defined hooks and the functions defined in this
* class.
*/
$localize['app_submission_message'] = 'Form has been submitted successfully. If required, we will get back to you shortly.';
$localize['app_closed_alert'] = 'We are no longer accepting applications for this ad.';
$localize['aol_required_fields_notice'] = 'Fields with (*) are compulsory.';
wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/applyonline-admin.js', array( 'jquery', 'jquery-ui-sortable' ), $this->version, false );
wp_enqueue_script($this->plugin_name.'_md5', plugin_dir_url(__FILE__).'js/md5.min.js', array( 'jquery' ), $this->version, false);
wp_localize_script( $this->plugin_name, 'aol_admin', $localize );
}
public function settings_notice(){
$notices = get_option('aol_dismissed_notices', array());
if(in_array('aol', $notices) OR !current_user_can('manage_options')) return;
?>
ID, $key, true );
//Support to previuos versions where only URL was saved in the post meta.
if (!filter_var($val, FILTER_VALIDATE_URL) === false) $val = 'View | Download';
elseif(is_array($val)){
//If the outputs is file attachment
if(isset($val['url']) AND isset($val['type']))
$val = 'View | Download';
//If output is a radio or checkbox.
else $val = implode(', ', $val);
}
echo '
';
}
function ad_features( $post ) {
// Add a nonce field so we can check for it later.
wp_nonce_field( 'myplugin_adpost_meta_awesome_box', 'adpost_meta_box_nonce' );
/*
* Use get_post_meta() to retrieve an existing value
* from the database and use the value for the form.
*/
?>
In your WordPress admin panel, go to "All Ads" menu with globe icon and add a new ad listing here.
How to show ad listings on the front-end?
You may choose either option.
Write [aol] shortcode in an existing page or add a new page and write shortcode anywhere in the page editor. Now click on VIEW to see all of your ads on front-end.
The url lists all the applications using your theme's default look and feel.
(If above not working, try saving permalinks without any change)
I have a very long application form to fill, how can i facilitate applicant to fill it conveniently?
With Application Tracking System extention, applicant can save/update incomplete form for multiple times before final submission.
Can I show selected ads on front-end?
Yes, you can show any number of ads on your website by using shortcode with "ads" attribute. Ad ids must be separated with commas i.e. [aol ads="1,2,3" type="ad"]. Default type is "ad".
Can I show ads without excerpt/summary?
Yes, use shortcode with "excerpt" attribute i.e. [aol excerpt="no"]
What attributes can i use in the shortcode?
Shortcode with default attributes is [aol ads="1,2,3" excerpt="yes" type="ad"]. Use only required attributes.
Can I display application form only using shortocode?
Yes, [aol_form id="0"] is the shortcode to display a particular application form in WordPress pages or posts. Use correct form id in the shortocode.
Filters under ApplyOnline section are not accessible.
Try deactivating & then reactivating this plugin.
I Have enabled the filters but they are not visible on the 'ads' page.
Possible reasons for not displaying ad filters are given as under:
Filters are visible when you show your ad on front-end using [aol] shortcode only.
Make sure Filters are enabled under Apply Online/Settings/Ad Types section in wordpress Admin Panel.
When you create an ad, there is an option to categorize that ad under each filter e.g. Types or Locations.
Ads archive page on front-end shows 404 error or Nothing Found.