[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-admin/ -> link-add.php (source)

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


Generated : Wed May 8 08:20:02 2024 Cross-referenced by PHPXref