Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/wp-admin/admin-ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,12 @@
'image-editor',
'delete-comment',
'delete-tag',
'delete-link',
'delete-meta',
'delete-post',
'trash-post',
'untrash-post',
'delete-page',
'dim-comment',
'add-link-category',
'add-tag',
'get-tagcloud',
'get-comments',
Expand Down
180 changes: 0 additions & 180 deletions src/wp-admin/edit-link-form.php

This file was deleted.

3 changes: 0 additions & 3 deletions src/wp-admin/includes/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
/** WordPress Administration Hooks */
require_once ABSPATH . 'wp-admin/includes/admin-filters.php';

/** WordPress Bookmark Administration API */
require_once ABSPATH . 'wp-admin/includes/bookmark.php';

/** WordPress Comment Administration API */
require_once ABSPATH . 'wp-admin/includes/comment.php';

Expand Down
75 changes: 0 additions & 75 deletions src/wp-admin/includes/ajax-actions.php
Original file line number Diff line number Diff line change
Expand Up @@ -834,27 +834,6 @@ function wp_ajax_delete_tag() {
*
* @since 3.1.0
*/
function wp_ajax_delete_link() {
$id = isset( $_POST['id'] ) ? (int) $_POST['id'] : 0;

check_ajax_referer( "delete-bookmark_$id" );

if ( ! current_user_can( 'manage_links' ) ) {
wp_die( -1 );
}

$link = get_bookmark( $id );
if ( ! $link || is_wp_error( $link ) ) {
wp_die( 1 );
}

if ( wp_delete_link( $id ) ) {
wp_die( 1 );
} else {
wp_die( 0 );
}
}

/**
* Handles deleting meta via AJAX.
*
Expand Down Expand Up @@ -1048,60 +1027,6 @@ function wp_ajax_dim_comment() {
wp_die( 0 );
}

/**
* Handles adding a link category via AJAX.
*
* @since 3.1.0
*
* @param string $action Action to perform.
*/
function wp_ajax_add_link_category( $action ) {
if ( empty( $action ) ) {
$action = 'add-link-category';
}

check_ajax_referer( $action );

$taxonomy_object = get_taxonomy( 'link_category' );

if ( ! current_user_can( $taxonomy_object->cap->manage_terms ) ) {
wp_die( -1 );
}

$names = explode( ',', wp_unslash( $_POST['newcat'] ) );
$response = new WP_Ajax_Response();

foreach ( $names as $category_name ) {
$category_name = trim( $category_name );
$slug = sanitize_title( $category_name );

if ( '' === $slug ) {
continue;
}

$category_id = wp_insert_term( $category_name, 'link_category' );

if ( ! $category_id || is_wp_error( $category_id ) ) {
continue;
} else {
$category_id = $category_id['term_id'];
}

$category_name = esc_html( $category_name );

$response->add(
array(
'what' => 'link-category',
'id' => $category_id,
'data' => "<li id='link-category-$category_id'><label for='in-link-category-$category_id' class='selectit'><input value='" . esc_attr( $category_id ) . "' type='checkbox' checked='checked' name='link_category[]' id='in-link-category-$category_id'/> $category_name</label></li>",
'position' => -1,
)
);
}

$response->send();
}

/**
* Handles adding a tag via AJAX.
*
Expand Down
Loading
Loading