| 
									
										
										
										
											2019-03-12 09:27:46 +00:00
										 |  |  | <?php | 
					
						
							|  |  |  | /** | 
					
						
							|  |  |  |  * Add Link Administration Screen. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * @package WordPress | 
					
						
							|  |  |  |  * @subpackage Administration | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /** Load WordPress Administration Bootstrap */ | 
					
						
							|  |  |  | require_once( dirname( __FILE__ ) . '/admin.php' ); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-16 20:56:22 +01:00
										 |  |  | if ( ! current_user_can( 'manage_links' ) ) { | 
					
						
							|  |  |  | 	wp_die( __( 'Sorry, you are not allowed to add links to this site.' ) ); | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2019-03-12 09:27:46 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-16 20:56:22 +01:00
										 |  |  | $title       = __( 'Add New Link' ); | 
					
						
							| 
									
										
										
										
											2019-03-12 09:27:46 +00:00
										 |  |  | $parent_file = 'link-manager.php'; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-16 20:56:22 +01:00
										 |  |  | wp_reset_vars( array( 'action', 'cat_id', 'link_id' ) ); | 
					
						
							| 
									
										
										
										
											2019-03-12 09:27:46 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-16 20:56:22 +01:00
										 |  |  | wp_enqueue_script( 'link' ); | 
					
						
							|  |  |  | wp_enqueue_script( 'xfn' ); | 
					
						
							| 
									
										
										
										
											2019-03-12 09:27:46 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-16 20:56:22 +01:00
										 |  |  | if ( wp_is_mobile() ) { | 
					
						
							| 
									
										
										
										
											2019-03-12 09:27:46 +00:00
										 |  |  | 	wp_enqueue_script( 'jquery-touch-punch' ); | 
					
						
							| 
									
										
										
										
											2019-04-16 20:56:22 +01:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2019-03-12 09:27:46 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | $link = get_default_link_to_edit(); | 
					
						
							|  |  |  | include( ABSPATH . 'wp-admin/edit-link-form.php' ); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | require( ABSPATH . 'wp-admin/admin-footer.php' ); |