Skip to content

Instantly share code, notes, and snippets.

@DrSean
DrSean / files.php
Created March 18, 2013 08:55
Other file that seems to be connected to form-listing.php for processing the form and or the custom fields.
<?php
add_filter( 'va_render_form_field' , 'va_display_allowed_extensions', 10, 4 );
add_filter( 'va_render_form_field', 'va_hide_file_upload', 10, 3 );
/**
* Displays the allowed extensions for a specific custom form field
*
* @param string $html The HTML code to be displayed
* @param array $field The field being displayed
* @param int $listing_id The listing ID
@DrSean
DrSean / custom-forms.php
Created March 18, 2013 08:51
This is one of the files that seems like it is referenced by form-listing to handle the form / custom fields.
<?php
add_action( 'init', 'va_forms_register_post_type', 11 );
add_action( 'wp_ajax_app-render-form', 'va_forms_ajax_render_form' );
add_action( 'edited_term_taxonomy', 'va_exclude_forms_from_counter', 10, 2 );
function va_forms_register_post_type() {
register_taxonomy_for_object_type( VA_LISTING_CATEGORY, APP_FORMS_PTYPE );
}
@DrSean
DrSean / form-listing.php
Created March 18, 2013 08:47
This is the original file I am trying to modify so I can place custom fields where I need to. As apposed to in the pop up list related to the category chosen.
<?php global $va_options; ?>
<div id="main">
<?php do_action( 'appthemes_notices' ); ?>
<div class="section-head">
<h1><?php echo $title; ?></h1>
</div>
<form id="create-listing" enctype="multipart/form-data" method="post" action="<?php echo $form_action; ?>">
<?php global $va_options; ?>
<div id="main">
<?php do_action( 'appthemes_notices' ); ?>
<div class="section-head">
<h1><?php echo $title; ?></h1>
</div>