link-add.php 742 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * Add Link Administration Screen.
  4. *
  5. * @package WordPress
  6. * @subpackage Administration
  7. */
  8. /** Load WordPress Administration Bootstrap */
  9. require_once __DIR__ . '/admin.php';
  10. if ( ! current_user_can( 'manage_links' ) ) {
  11. wp_die( __( 'Sorry, you are not allowed to add links to this site.' ) );
  12. }
  13. // Used in the HTML title tag.
  14. $title = __( 'Add New Link' );
  15. $parent_file = 'link-manager.php';
  16. wp_reset_vars( array( 'action', 'cat_id', 'link_id' ) );
  17. wp_enqueue_script( 'link' );
  18. wp_enqueue_script( 'xfn' );
  19. if ( wp_is_mobile() ) {
  20. wp_enqueue_script( 'jquery-touch-punch' );
  21. }
  22. $link = get_default_link_to_edit();
  23. require ABSPATH . 'wp-admin/edit-link-form.php';
  24. require_once ABSPATH . 'wp-admin/admin-footer.php';