Guest User

Untitled

a guest
Mar 17th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.26 KB | None | 0 0
  1. <?php
  2. /**
  3. * Event Submission Form
  4. * The wrapper template for the event submission form.
  5. *
  6. * Copy this template in your own theme by creating a file at
  7. * wp-content/[your-theme]/tribe-events/community/edit-event.php
  8. *
  9. * @since 3.1
  10. * @version 4.5
  11. *
  12. * @var int|string $tribe_event_id
  13. */
  14.  
  15. if ( ! defined( 'ABSPATH' ) ) {
  16. die( '-1' );
  17. }
  18.  
  19. if ( ! isset( $tribe_event_id ) ) {
  20. $tribe_event_id = null;
  21. }
  22.  
  23. ?>
  24.  
  25. <?php
  26. // Limit front-end to editor and admin
  27. if( current_user_can('editor') || current_user_can('administrator') ) : ?>
  28.  
  29. <?php tribe_get_template_part( 'community/modules/header-links' ); ?>
  30.  
  31. <?php do_action( 'tribe_events_community_form_before_template', $tribe_event_id ); ?>
  32.  
  33. <form method="post" enctype="multipart/form-data" data-datepicker_format="<?php echo esc_attr( tribe_get_option( 'datepickerFormat', 0 ) ); ?>">
  34. <input type="hidden" name="post_ID" id="post_ID" value="<?php echo absint( $tribe_event_id ); ?>"/>
  35. <?php wp_nonce_field( 'ecp_event_submission' ); ?>
  36.  
  37. <?php tribe_get_template_part( 'community/modules/title' ); ?>
  38.  
  39. <?php tribe_get_template_part( 'community/modules/description' ); ?>
  40.  
  41. <?php tribe_get_template_part( 'community/modules/datepickers' ); ?>
  42.  
  43. <?php tribe_get_template_part( 'community/modules/image' ); ?>
  44.  
  45. <?php tribe_get_template_part( 'community/modules/taxonomy', null, array( 'taxonomy' => Tribe__Events__Main::TAXONOMY ) ); ?>
  46.  
  47. <?php tribe_get_template_part( 'community/modules/taxonomy', null, array( 'taxonomy' => 'post_tag' ) ); ?>
  48.  
  49. <?php tribe_get_template_part( 'community/modules/venue' ); ?>
  50.  
  51. <?php tribe_get_template_part( 'community/modules/organizer' ); ?>
  52.  
  53. <?php tribe_get_template_part( 'community/modules/website' ); ?>
  54.  
  55. <?php tribe_get_template_part( 'community/modules/custom' ); ?>
  56.  
  57. <?php tribe_get_template_part( 'community/modules/cost' ); ?>
  58.  
  59. <?php tribe_get_template_part( 'community/modules/spam-control' ); ?>
  60.  
  61. <?php tribe_get_template_part( 'community/modules/submit' ); ?>
  62. </form>
  63.  
  64. <?php do_action( 'tribe_events_community_form_after_template', $tribe_event_id ); ?>
  65.  
  66. <?php
  67. // If not editor or admin, then show this message
  68. else:
  69. echo "Sorry you're not allowed.";
  70.  
  71. // Close the if
  72. endif;
  73. ?>
Add Comment
Please, Sign In to add comment