AOL Reference

Custom theme template

To get complete control over the output, you can create archive template file archive-aol_ad.php and single template file single-aol_ad.php in your theme with your own html structure. Three functions are available to get content of an application on single-aol_ad.php template file:

  1. function aol_features($post_id)
    $post_id (integer)(optional)
    This functions returns features of an application in string format.
  2. function aol_form($post_id)
    $post_id (integer)(optional)
    This functions returns application form in string format.
  3. function aol_form_fields($post_id)
    $post_id (integer)(optional)
    This function returns associative array of application form fields. Application form field’s KEY, TYPE and OPTIONS are returned.

IMPORTANT: when using one or more of above function, you *must* check for its existence before using it, otherwise your site will badly break with a fatal error at next Plugin update (as WordPress deletes the plugin when updating it).


apply_filters( ‘aol_content’, $content, $features, $form )

This filter hook can be used to modify the output of [aol] shortcode. This hook returns $content. You can use this filter hook in your theme’s functions.php file in this way:

add_filter('aol_content', 'my_custom_function', 10, 3);
function my_custom_function( $content, $features, $form ){
     //Modiy $content here
     return $content;
}


do_action(‘aol_after_form_fields’);

This hook is used to append content i. e. custom input fields, at the end of application form . For compatibility with existing user interface, add class form-control to the input and textarea HTML elements and wrap newly created elements in a div with class form-group


apply_filters(‘aol_upload_folder’, $upload_folder);

This filter hook is used to change the folder of file attachments. The parent folder is wp-content.

Parameters:

$upload_folder (string) A folder location within wp-content folder. Default is uploads/aol

Comments are closed !