Skip to content

Instantly share code, notes, and snippets.

@viruthagiri
Last active September 20, 2016 17:20
Show Gist options
  • Save viruthagiri/2091f6c328641f7b2df6482814cc1099 to your computer and use it in GitHub Desktop.
Save viruthagiri/2091f6c328641f7b2df6482814cc1099 to your computer and use it in GitHub Desktop.
<?php
function custom_gd_add_listing_top_code()
{
$excluded = array('gd_place');
if (isset($_REQUEST['listing_type']) && in_array($_REQUEST['listing_type'], $excluded)) {
return;
}
if (isset($_REQUEST['pid']) && $_REQUEST['pid']) {
return;
}// if editing a listing then don't show
?>
<h5><?php _e('Import Details from Social', 'geodir_socialimporter'); ?></h5>
<input type="text" placeholder="<?php _e('Enter facebook page/event url or Yelp url', 'geodir_socialimporter'); ?>"
id="gdfi_import_url"/>
<button id="gd_facebook_import" style="margin-top:0px;"
class="geodir_button"><?php _e('Import Details', 'geodir_socialimporter'); ?></button>
<div id="modal-loading" style="margin:0px;display:inline-block;visibility:hidden;"><i
class="fa fa-refresh fa-spin"></i></div>
<?php
}
remove_action('geodir_before_detail_fields', 'gd_add_listing_top_code', 3);
add_action('geodir_before_detail_fields', 'custom_gd_add_listing_top_code', 3);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment