wpcf7_admin_management_page

The Contact Form 7 wpcf7 admin management page function.

Description

wpcf7_admin_management_page(); 

Usage

  1. if ( !function_exists( 'wpcf7_admin_management_page' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'contact-form-7/admin/admin.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = wpcf7_admin_management_page(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/admin/admin.php  
  1. function wpcf7_admin_management_page() { 
  2. if ( $post = wpcf7_get_current_contact_form() ) { 
  3. $post_id = $post->initial() ? -1 : $post->id(); 
  4.  
  5. require_once WPCF7_PLUGIN_DIR . '/admin/includes/editor.php'; 
  6. require_once WPCF7_PLUGIN_DIR . '/admin/edit-contact-form.php'; 
  7. return; 
  8.  
  9. if ( 'validate' == wpcf7_current_action() 
  10. && current_user_can( 'wpcf7_edit_contact_forms' ) ) { 
  11. return; 
  12.  
  13. $list_table = new WPCF7_Contact_Form_List_Table(); 
  14. $list_table->prepare_items(); 
  15.  
  16. ?> 
  17. <div class="wrap"> 
  18.  
  19. <h1><?php 
  20. echo esc_html( __( 'Contact Forms', 'contact-form-7' ) ); 
  21.  
  22. if ( current_user_can( 'wpcf7_edit_contact_forms' ) ) { 
  23. echo ' <a href="' . esc_url( menu_page_url( 'wpcf7-new', false ) ) . '" class="add-new-h2">' . esc_html( __( 'Add New', 'contact-form-7' ) ) . '</a>'; 
  24.  
  25. if ( ! empty( $_REQUEST['s'] ) ) { 
  26. echo sprintf( '<span class="subtitle">' 
  27. . __( 'Search results for “%s”', 'contact-form-7' ) 
  28. . '</span>', esc_html( $_REQUEST['s'] ) ); 
  29. ?></h1> 
  30.  
  31. <?php do_action( 'wpcf7_admin_warnings' ); ?> 
  32. <?php wpcf7_welcome_panel(); ?> 
  33. <?php do_action( 'wpcf7_admin_notices' ); ?> 
  34.  
  35. <form method="get" action=""> 
  36. <input type="hidden" name="page" value="<?php echo esc_attr( $_REQUEST['page'] ); ?>" /> 
  37. <?php $list_table->search_box( __( 'Search Contact Forms', 'contact-form-7' ), 'wpcf7-contact' ); ?> 
  38. <?php $list_table->display(); ?> 
  39. </form> 
  40.  
  41. </div> 
  42. <?php