PageRenderTime 40ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/wp-admin/link-add.php

http://github.com/markjaquith/WordPress
PHP | 31 lines | 16 code | 8 blank | 7 comment | 2 complexity | 45f221276c6a50e5c95e046b497feae5 MD5 | raw file
Possible License(s): 0BSD
  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. $title = __( 'Add New Link' );
  14. $parent_file = 'link-manager.php';
  15. wp_reset_vars( array( 'action', 'cat_id', 'link_id' ) );
  16. wp_enqueue_script( 'link' );
  17. wp_enqueue_script( 'xfn' );
  18. if ( wp_is_mobile() ) {
  19. wp_enqueue_script( 'jquery-touch-punch' );
  20. }
  21. $link = get_default_link_to_edit();
  22. require ABSPATH . 'wp-admin/edit-link-form.php';
  23. require_once ABSPATH . 'wp-admin/admin-footer.php';