| 1 |
<?php |
| 2 |
global $wpdb; |
| 3 |
|
| 4 |
set_current_screen('edit-docs'); |
| 5 |
add_filter( 'screen_options_show_screen', '__return_true' ); |
| 6 |
global $post_type, $post_type_object, $typenow; |
| 7 |
$post_type = 'docs'; |
| 8 |
$wp_list_table = _get_list_table( 'WP_List_Table' ); |
| 9 |
$wp_list_table = _get_list_table( 'WP_Posts_List_Table' ); |
| 10 |
$wp_list_table = new BetterDocs_WP_Posts_List_Table(); |
| 11 |
$pagenum = $wp_list_table->get_pagenum(); |
| 12 |
$post_type_object = get_post_type_object( $post_type ); |
| 13 |
?> |
| 14 |
<div class="wrap"> |
| 15 |
<hr class="wp-header-end"> |
| 16 |
<div class="betterdocs-listing-wrapper"> |
| 17 |
<?php do_action('betterdocs_listing_header'); ?> |
| 18 |
</div> |
| 19 |
<div class="tabs-content"> |
| 20 |
<div class="betterdocs-tab-content tab-content-1"> |
| 21 |
<div class="betterdocs-settings-header betterdocs-settings-filter"> |
| 22 |
<div class="betterdocs-header-full"> |
| 23 |
<div class="betterdocs-header-filter"> |
| 24 |
<?php |
| 25 |
global $wp; |
| 26 |
$form_action = home_url( $wp->request ) . '/wp-admin/admin.php'; |
| 27 |
?> |
| 28 |
<form id="posts-filter" method="get" action="<?php echo $form_action; ?>"> |
| 29 |
<input type="hidden" name="page" class="post_type_page" value="betterdocs-admin" /> |
| 30 |
<input id="post-search-input" class="dashboard-search-field" type="text" placeholder="<?php esc_html_e('Search', 'betterdocs'); ?>" name="s" value="<?php echo (isset($_REQUEST['s'])) ? esc_attr($_REQUEST['s']) : '' ?>"> |
| 31 |
<?php $order = (isset($_GET['order'])) ? $_GET['order'] : ''; ?> |
| 32 |
<select id="dashboard-select-order" class="dashboard-search-field dashboard-select-order" name="order"> |
| 33 |
<option value=""><?php esc_html_e('Order', 'betterdocs') ?></option> |
| 34 |
<option value="ASC"<?php echo ('ASC' === $order) ? ' selected' : '' ?>><?php esc_html_e('Ascending', 'betterdocs') ?></option> |
| 35 |
<option value="DESC"<?php echo ('DESC' === $order) ? ' selected' : '' ?>><?php esc_html_e('Descending', 'betterdocs') ?></option> |
| 36 |
</select> |
| 37 |
<?php $date = (isset($_GET['date'])) ? $_GET['date'] : ''; ?> |
| 38 |
<select id="dashboard-select-date" class="dashboard-search-field dashboard-select-date" name="date"> |
| 39 |
<option value=""><?php esc_html_e('All Dates', 'betterdocs') ?></option> |
| 40 |
<option value="most_recent"<?php echo ('most_recent' === $date) ? ' selected' : '' ?>><?php esc_html_e('Most Recent', 'betterdocs') ?></option> |
| 41 |
<option value="least_recent"<?php echo ('least_recent' === $date) ? ' selected' : '' ?>><?php esc_html_e('Least Recent', 'betterdocs') ?></option> |
| 42 |
<option value="custom_date"<?php echo ('custom_date' === $date) ? ' selected' : '' ?>><?php esc_html_e('Custom', 'betterdocs') ?></option> |
| 43 |
</select> |
| 44 |
<input id="reportrange" class="dashboard-select-date-custom" type="text" name="date_range" title="<?php echo (isset($_GET['date_range'])) ? esc_attr($_GET['date_range']) : ''; ?>" value="<?php echo (isset($_GET['date_range'])) ? esc_attr($_GET['date_range']) : ''; ?>" /> |
| 45 |
<select id="dashboard-select-author" class="dashboard-search-field dashboard-select-author" name="author"> |
| 46 |
<option value="all"><?php esc_html_e('All Authors', 'betterdocs') ?></option> |
| 47 |
<?php |
| 48 |
$author = (isset($_GET['author'])) ? $_GET['author'] : ''; |
| 49 |
$users = get_users( array( 'role__in' => array( 'administrator', 'editor', 'author', 'contributor' ) ) ); |
| 50 |
foreach ($users as $user) { |
| 51 |
?> |
| 52 |
<option value="<?php echo esc_attr($user->data->ID) ?>"<?php echo ($author == $user->data->ID) ? " selected" : "" ?>><?php echo $user->data->display_name ?></option> |
| 53 |
<?php |
| 54 |
} |
| 55 |
?> |
| 56 |
</select> |
| 57 |
<select id="dashboard-select-doc_category" class="dashboard-search-field dashboard-select-category" name="doc_category"> |
| 58 |
<option value="all"><?php esc_html_e('All Categories', 'betterdocs') ?></option> |
| 59 |
<?php |
| 60 |
$selected = (isset($_GET['doc_category'])) ? $_GET['doc_category'] : ''; |
| 61 |
echo BetterDocs_Helper::term_options('doc_category', $selected); |
| 62 |
?> |
| 63 |
</select> |
| 64 |
<?php do_action('betterdocs_admin_filter_after_category'); ?> |
| 65 |
<?php $post_status = (isset($_GET['post_status'])) ? $_GET['post_status'] : ''; ?> |
| 66 |
<select id="dashboard-select-status" class="dashboard-search-field dashboard-select-status" name="post_status"> |
| 67 |
<option value="any"<?php echo ('any' === $post_status) ? ' selected' : '' ?>><?php esc_html_e('Doc Status', 'betterdocs') ?></option> |
| 68 |
<option value="publish"<?php echo ('publish' === $post_status) ? ' selected' : '' ?>><?php esc_html_e('Publish', 'betterdocs') ?></option> |
| 69 |
<option value="pending"<?php echo ('pending' === $post_status) ? ' selected' : '' ?>><?php esc_html_e('Pending', 'betterdocs') ?></option> |
| 70 |
<option value="draft"<?php echo ('draft' === $post_status) ? ' selected' : '' ?>><?php esc_html_e('Draft', 'betterdocs') ?></option> |
| 71 |
<option value="auto-draft"<?php echo ('auto-draft' === $post_status) ? ' selected' : '' ?>><?php esc_html_e('Auto Draft', 'betterdocs') ?></option> |
| 72 |
<option value="future"<?php echo ('future' === $post_status) ? ' selected' : '' ?>><?php esc_html_e('Future', 'betterdocs') ?></option> |
| 73 |
<option value="private"<?php echo ('private' === $post_status) ? ' selected' : '' ?>><?php esc_html_e('Private', 'betterdocs') ?></option> |
| 74 |
<option value="inherit"<?php echo ('inherit' === $post_status) ? ' selected' : '' ?>><?php esc_html_e('Inherit', 'betterdocs') ?></option> |
| 75 |
</select> |
| 76 |
<?php do_action('betterdocs_admin_filter_before_submit'); ?> |
| 77 |
<input class="betterdocs-button betterdocs-button-primary betterdocs-search-filter-btn" type="submit" id="search-submit" class="button" value="<?php esc_html_e('Search','betterdocs') ?>"> |
| 78 |
</form> |
| 79 |
</div> |
| 80 |
</div> |
| 81 |
</div> |
| 82 |
<div class="betterdocs-listing-table-content"> |
| 83 |
<?php |
| 84 |
if ( 'post' !== $post_type ) { |
| 85 |
$parent_file = "edit.php?post_type=$post_type"; |
| 86 |
$submenu_file = "edit.php?post_type=$post_type"; |
| 87 |
$post_new_file = "post-new.php?post_type=$post_type"; |
| 88 |
} else { |
| 89 |
$parent_file = 'edit.php'; |
| 90 |
$submenu_file = 'edit.php'; |
| 91 |
$post_new_file = 'post-new.php'; |
| 92 |
} |
| 93 |
|
| 94 |
$doaction = $wp_list_table->current_action(); |
| 95 |
|
| 96 |
if ( $doaction ) { |
| 97 |
check_admin_referer( 'bulk-posts' ); |
| 98 |
|
| 99 |
$sendback = remove_query_arg( array( 'trashed', 'untrashed', 'deleted', 'locked', 'ids' ), wp_get_referer() ); |
| 100 |
if ( ! $sendback ) { |
| 101 |
$sendback = admin_url( $parent_file ); |
| 102 |
} |
| 103 |
$sendback = add_query_arg( 'paged', $pagenum, $sendback ); |
| 104 |
if ( strpos( $sendback, 'post.php' ) !== false ) { |
| 105 |
$sendback = admin_url( $post_new_file ); |
| 106 |
} |
| 107 |
|
| 108 |
if ( 'delete_all' === $doaction ) { |
| 109 |
// Prepare for deletion of all posts with a specified post status (i.e. Empty Trash). |
| 110 |
$post_status = preg_replace( '/[^a-z0-9_-]+/i', '', $_REQUEST['post_status'] ); |
| 111 |
// Validate the post status exists. |
| 112 |
if ( get_post_status_object( $post_status ) ) { |
| 113 |
$post_ids = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_type=%s AND post_status = %s", $post_type, $post_status ) ); |
| 114 |
} |
| 115 |
$doaction = 'delete'; |
| 116 |
} elseif ( isset( $_REQUEST['media'] ) ) { |
| 117 |
$post_ids = $_REQUEST['media']; |
| 118 |
} elseif ( isset( $_REQUEST['ids'] ) ) { |
| 119 |
$post_ids = explode( ',', $_REQUEST['ids'] ); |
| 120 |
} elseif ( ! empty( $_REQUEST['post'] ) ) { |
| 121 |
$post_ids = array_map( 'intval', $_REQUEST['post'] ); |
| 122 |
} |
| 123 |
|
| 124 |
if ( ! isset( $post_ids ) ) { |
| 125 |
wp_redirect( $sendback ); |
| 126 |
exit; |
| 127 |
} |
| 128 |
|
| 129 |
switch ( $doaction ) { |
| 130 |
case 'trash': |
| 131 |
$trashed = 0; |
| 132 |
$locked = 0; |
| 133 |
|
| 134 |
foreach ( (array) $post_ids as $post_id ) { |
| 135 |
if ( ! current_user_can( 'delete_post', $post_id ) ) { |
| 136 |
wp_die( __( 'Sorry, you are not allowed to move this item to the Trash.' ) ); |
| 137 |
} |
| 138 |
|
| 139 |
if ( wp_check_post_lock( $post_id ) ) { |
| 140 |
$locked++; |
| 141 |
continue; |
| 142 |
} |
| 143 |
|
| 144 |
if ( ! wp_trash_post( $post_id ) ) { |
| 145 |
wp_die( __( 'Error in moving the item to Trash.' ) ); |
| 146 |
} |
| 147 |
|
| 148 |
$trashed++; |
| 149 |
} |
| 150 |
|
| 151 |
$sendback = add_query_arg( |
| 152 |
array( |
| 153 |
'trashed' => $trashed, |
| 154 |
'ids' => implode( ',', $post_ids ), |
| 155 |
'locked' => $locked, |
| 156 |
), |
| 157 |
$sendback |
| 158 |
); |
| 159 |
break; |
| 160 |
case 'untrash': |
| 161 |
$untrashed = 0; |
| 162 |
|
| 163 |
if ( isset( $_GET['doaction'] ) && ( 'undo' === $_GET['doaction'] ) ) { |
| 164 |
add_filter( 'wp_untrash_post_status', 'wp_untrash_post_set_previous_status', 10, 3 ); |
| 165 |
} |
| 166 |
|
| 167 |
foreach ( (array) $post_ids as $post_id ) { |
| 168 |
if ( ! current_user_can( 'delete_post', $post_id ) ) { |
| 169 |
wp_die( __( 'Sorry, you are not allowed to restore this item from the Trash.' ) ); |
| 170 |
} |
| 171 |
|
| 172 |
if ( ! wp_untrash_post( $post_id ) ) { |
| 173 |
wp_die( __( 'Error in restoring the item from Trash.' ) ); |
| 174 |
} |
| 175 |
|
| 176 |
$untrashed++; |
| 177 |
} |
| 178 |
$sendback = add_query_arg( 'untrashed', $untrashed, $sendback ); |
| 179 |
|
| 180 |
remove_filter( 'wp_untrash_post_status', 'wp_untrash_post_set_previous_status', 10, 3 ); |
| 181 |
|
| 182 |
break; |
| 183 |
case 'delete': |
| 184 |
$deleted = 0; |
| 185 |
foreach ( (array) $post_ids as $post_id ) { |
| 186 |
$post_del = get_post( $post_id ); |
| 187 |
|
| 188 |
if ( ! current_user_can( 'delete_post', $post_id ) ) { |
| 189 |
wp_die( __( 'Sorry, you are not allowed to delete this item.' ) ); |
| 190 |
} |
| 191 |
|
| 192 |
if ( 'attachment' === $post_del->post_type ) { |
| 193 |
if ( ! wp_delete_attachment( $post_id ) ) { |
| 194 |
wp_die( __( 'Error in deleting the attachment.' ) ); |
| 195 |
} |
| 196 |
} else { |
| 197 |
if ( ! wp_delete_post( $post_id ) ) { |
| 198 |
wp_die( __( 'Error in deleting the item.' ) ); |
| 199 |
} |
| 200 |
} |
| 201 |
$deleted++; |
| 202 |
} |
| 203 |
$sendback = add_query_arg( 'deleted', $deleted, $sendback ); |
| 204 |
break; |
| 205 |
case 'edit': |
| 206 |
if ( isset( $_REQUEST['bulk_edit'] ) ) { |
| 207 |
$done = bulk_edit_posts( $_REQUEST ); |
| 208 |
|
| 209 |
if ( is_array( $done ) ) { |
| 210 |
$done['updated'] = count( $done['updated'] ); |
| 211 |
$done['skipped'] = count( $done['skipped'] ); |
| 212 |
$done['locked'] = count( $done['locked'] ); |
| 213 |
$sendback = add_query_arg( $done, $sendback ); |
| 214 |
} |
| 215 |
} |
| 216 |
break; |
| 217 |
default: |
| 218 |
$screen = get_current_screen()->id; |
| 219 |
|
| 220 |
/** |
| 221 |
* Fires when a custom bulk action should be handled. |
| 222 |
* |
| 223 |
* The redirect link should be modified with success or failure feedback |
| 224 |
* from the action to be used to display feedback to the user. |
| 225 |
* |
| 226 |
* The dynamic portion of the hook name, `$screen`, refers to the current screen ID. |
| 227 |
* |
| 228 |
* @since 4.7.0 |
| 229 |
* |
| 230 |
* @param string $sendback The redirect URL. |
| 231 |
* @param string $doaction The action being taken. |
| 232 |
* @param array $items The items to take the action on. Accepts an array of IDs of posts, |
| 233 |
* comments, terms, links, plugins, attachments, or users. |
| 234 |
*/ |
| 235 |
$sendback = apply_filters( "handle_bulk_actions-{$screen}", $sendback, $doaction, $post_ids ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores |
| 236 |
break; |
| 237 |
} |
| 238 |
|
| 239 |
$sendback = remove_query_arg( array( 'action', 'action2', 'tags_input', 'post_author', 'comment_status', 'ping_status', '_status', 'post', 'bulk_edit', 'post_view' ), $sendback ); |
| 240 |
|
| 241 |
wp_redirect( $sendback ); |
| 242 |
exit; |
| 243 |
} elseif ( ! empty( $_REQUEST['_wp_http_referer'] ) ) { |
| 244 |
wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ); |
| 245 |
exit; |
| 246 |
} |
| 247 |
|
| 248 |
$wp_list_table->prepare_items(); |
| 249 |
|
| 250 |
wp_enqueue_script( 'inline-edit-post' ); |
| 251 |
wp_enqueue_script( 'heartbeat' ); |
| 252 |
|
| 253 |
if ( 'wp_block' === $post_type ) { |
| 254 |
wp_enqueue_script( 'wp-list-reusable-blocks' ); |
| 255 |
wp_enqueue_style( 'wp-list-reusable-blocks' ); |
| 256 |
} |
| 257 |
|
| 258 |
$title = $post_type_object->labels->name; |
| 259 |
|
| 260 |
get_current_screen()->set_screen_reader_content( |
| 261 |
array( |
| 262 |
'heading_views' => $post_type_object->labels->filter_items_list, |
| 263 |
'heading_pagination' => $post_type_object->labels->items_list_navigation, |
| 264 |
'heading_list' => $post_type_object->labels->items_list, |
| 265 |
) |
| 266 |
); |
| 267 |
|
| 268 |
add_screen_option( |
| 269 |
'per_page', |
| 270 |
array( |
| 271 |
'default' => 20, |
| 272 |
'option' => 'edit_' . $post_type . '_per_page', |
| 273 |
) |
| 274 |
); |
| 275 |
|
| 276 |
$bulk_counts = array( |
| 277 |
'updated' => isset( $_REQUEST['updated'] ) ? absint( $_REQUEST['updated'] ) : 0, |
| 278 |
'locked' => isset( $_REQUEST['locked'] ) ? absint( $_REQUEST['locked'] ) : 0, |
| 279 |
'deleted' => isset( $_REQUEST['deleted'] ) ? absint( $_REQUEST['deleted'] ) : 0, |
| 280 |
'trashed' => isset( $_REQUEST['trashed'] ) ? absint( $_REQUEST['trashed'] ) : 0, |
| 281 |
'untrashed' => isset( $_REQUEST['untrashed'] ) ? absint( $_REQUEST['untrashed'] ) : 0, |
| 282 |
); |
| 283 |
|
| 284 |
$bulk_messages = array(); |
| 285 |
$bulk_messages['post'] = array( |
| 286 |
/* translators: %s: Number of posts. */ |
| 287 |
'updated' => _n( '%s post updated.', '%s posts updated.', $bulk_counts['updated'] ), |
| 288 |
'locked' => ( 1 === $bulk_counts['locked'] ) ? __( '1 post not updated, somebody is editing it.' ) : |
| 289 |
/* translators: %s: Number of posts. */ |
| 290 |
_n( '%s post not updated, somebody is editing it.', '%s posts not updated, somebody is editing them.', $bulk_counts['locked'] ), |
| 291 |
/* translators: %s: Number of posts. */ |
| 292 |
'deleted' => _n( '%s post permanently deleted.', '%s posts permanently deleted.', $bulk_counts['deleted'] ), |
| 293 |
/* translators: %s: Number of posts. */ |
| 294 |
'trashed' => _n( '%s post moved to the Trash.', '%s posts moved to the Trash.', $bulk_counts['trashed'] ), |
| 295 |
/* translators: %s: Number of posts. */ |
| 296 |
'untrashed' => _n( '%s post restored from the Trash.', '%s posts restored from the Trash.', $bulk_counts['untrashed'] ), |
| 297 |
); |
| 298 |
$bulk_messages['page'] = array( |
| 299 |
/* translators: %s: Number of pages. */ |
| 300 |
'updated' => _n( '%s page updated.', '%s pages updated.', $bulk_counts['updated'] ), |
| 301 |
'locked' => ( 1 === $bulk_counts['locked'] ) ? __( '1 page not updated, somebody is editing it.' ) : |
| 302 |
/* translators: %s: Number of pages. */ |
| 303 |
_n( '%s page not updated, somebody is editing it.', '%s pages not updated, somebody is editing them.', $bulk_counts['locked'] ), |
| 304 |
/* translators: %s: Number of pages. */ |
| 305 |
'deleted' => _n( '%s page permanently deleted.', '%s pages permanently deleted.', $bulk_counts['deleted'] ), |
| 306 |
/* translators: %s: Number of pages. */ |
| 307 |
'trashed' => _n( '%s page moved to the Trash.', '%s pages moved to the Trash.', $bulk_counts['trashed'] ), |
| 308 |
/* translators: %s: Number of pages. */ |
| 309 |
'untrashed' => _n( '%s page restored from the Trash.', '%s pages restored from the Trash.', $bulk_counts['untrashed'] ), |
| 310 |
); |
| 311 |
$bulk_messages['wp_block'] = array( |
| 312 |
/* translators: %s: Number of blocks. */ |
| 313 |
'updated' => _n( '%s block updated.', '%s blocks updated.', $bulk_counts['updated'] ), |
| 314 |
'locked' => ( 1 === $bulk_counts['locked'] ) ? __( '1 block not updated, somebody is editing it.' ) : |
| 315 |
/* translators: %s: Number of blocks. */ |
| 316 |
_n( '%s block not updated, somebody is editing it.', '%s blocks not updated, somebody is editing them.', $bulk_counts['locked'] ), |
| 317 |
/* translators: %s: Number of blocks. */ |
| 318 |
'deleted' => _n( '%s block permanently deleted.', '%s blocks permanently deleted.', $bulk_counts['deleted'] ), |
| 319 |
/* translators: %s: Number of blocks. */ |
| 320 |
'trashed' => _n( '%s block moved to the Trash.', '%s blocks moved to the Trash.', $bulk_counts['trashed'] ), |
| 321 |
/* translators: %s: Number of blocks. */ |
| 322 |
'untrashed' => _n( '%s block restored from the Trash.', '%s blocks restored from the Trash.', $bulk_counts['untrashed'] ), |
| 323 |
); |
| 324 |
|
| 325 |
/** |
| 326 |
* Filters the bulk action updated messages. |
| 327 |
* |
| 328 |
* By default, custom post types use the messages for the 'post' post type. |
| 329 |
* |
| 330 |
* @since 3.7.0 |
| 331 |
* |
| 332 |
* @param array[] $bulk_messages Arrays of messages, each keyed by the corresponding post type. Messages are |
| 333 |
* keyed with 'updated', 'locked', 'deleted', 'trashed', and 'untrashed'. |
| 334 |
* @param int[] $bulk_counts Array of item counts for each message, used to build internationalized strings. |
| 335 |
*/ |
| 336 |
$bulk_messages = apply_filters( 'bulk_post_updated_messages', $bulk_messages, $bulk_counts ); |
| 337 |
$bulk_counts = array_filter( $bulk_counts ); |
| 338 |
|
| 339 |
?> |
| 340 |
<div class="wrap"> |
| 341 |
<?php |
| 342 |
// If we have a bulk message to issue: |
| 343 |
$messages = array(); |
| 344 |
foreach ( $bulk_counts as $message => $count ) { |
| 345 |
if ( isset( $bulk_messages[ $post_type ][ $message ] ) ) { |
| 346 |
$messages[] = sprintf( $bulk_messages[ $post_type ][ $message ], number_format_i18n( $count ) ); |
| 347 |
} elseif ( isset( $bulk_messages['post'][ $message ] ) ) { |
| 348 |
$messages[] = sprintf( $bulk_messages['post'][ $message ], number_format_i18n( $count ) ); |
| 349 |
} |
| 350 |
|
| 351 |
if ( 'trashed' === $message && isset( $_REQUEST['ids'] ) ) { |
| 352 |
$ids = preg_replace( '/[^0-9,]/', '', $_REQUEST['ids'] ); |
| 353 |
$messages[] = '<a href="' . esc_url( wp_nonce_url( "admin.php?page=betterdocs-admin&doaction=undo&action=untrash&ids=$ids", 'bulk-posts' ) ) . '">' . __( 'Undo' ) . '</a>'; |
| 354 |
} |
| 355 |
|
| 356 |
if ( 'untrashed' === $message && isset( $_REQUEST['ids'] ) ) { |
| 357 |
$ids = explode( ',', $_REQUEST['ids'] ); |
| 358 |
|
| 359 |
if ( 1 === count( $ids ) && current_user_can( 'edit_post', $ids[0] ) ) { |
| 360 |
$messages[] = sprintf( |
| 361 |
'<a href="%1$s">%2$s</a>', |
| 362 |
esc_url( get_edit_post_link( $ids[0] ) ), |
| 363 |
esc_html( get_post_type_object( get_post_type( $ids[0] ) )->labels->edit_item ) |
| 364 |
); |
| 365 |
} |
| 366 |
} |
| 367 |
} |
| 368 |
|
| 369 |
if ( $messages ) { |
| 370 |
echo '<div id="message" class="updated notice is-dismissible"><p>' . implode( ' ', $messages ) . '</p></div>'; |
| 371 |
} |
| 372 |
unset( $messages ); |
| 373 |
|
| 374 |
$_SERVER['REQUEST_URI'] = remove_query_arg( array( 'locked', 'skipped', 'updated', 'deleted', 'trashed', 'untrashed' ), $_SERVER['REQUEST_URI'] ); |
| 375 |
|
| 376 |
$wp_list_table->display(); |
| 377 |
|
| 378 |
if ( $wp_list_table->has_items() ) { |
| 379 |
$wp_list_table->inline_edit(); |
| 380 |
} |
| 381 |
|
| 382 |
?> |
| 383 |
<div id="ajax-response"></div> |
| 384 |
<div class="clear" /></div> |
| 385 |
</div> |
| 386 |
</div> |
| 387 |
</div> |
| 388 |
<?php |
| 389 |
global $wpdb; |
| 390 |
|
| 391 |
$terms_object = array( |
| 392 |
'taxonomy' => 'doc_category', |
| 393 |
'orderby' => 'meta_value_num', |
| 394 |
'meta_key' => 'doc_category_order', |
| 395 |
'order' => 'ASC', |
| 396 |
'hide_empty' => false, |
| 397 |
); |
| 398 |
|
| 399 |
if ( class_exists('BetterDocs_Multiple_Kb') && BetterDocs_Multiple_Kb::$enable == 1 && isset($_GET['knowledgebase']) && $_GET['knowledgebase'] !== 'all' ) { |
| 400 |
$terms_object['meta_query'] = array( |
| 401 |
array( |
| 402 |
'key' => 'doc_category_knowledge_base', |
| 403 |
'value' => $_GET['knowledgebase'], |
| 404 |
'compare' => 'LIKE' |
| 405 |
) |
| 406 |
); |
| 407 |
} |
| 408 |
|
| 409 |
$terms = get_terms($terms_object); |
| 410 |
$kb = ''; |
| 411 |
if (isset($_GET['knowledgebase']) && !empty($_GET['knowledgebase']) && $_GET['knowledgebase'] !== 'all') { |
| 412 |
$kb = $_GET['knowledgebase']; |
| 413 |
} |
| 414 |
?> |
| 415 |
<div class="betterdocs-tab-content tab-content-2"> |
| 416 |
<div class="betterdocs-listing-content"> |
| 417 |
<?php |
| 418 |
$output = ''; |
| 419 |
if (is_array($terms) && !empty($terms)) { |
| 420 |
foreach ($terms as $term) { |
| 421 |
$output .= '<div class="betterdocs-single-listing">'; |
| 422 |
$output .= '<div class="betterdocs-single-listing-inner">'; |
| 423 |
$output .= '<h4 class="betterdocs-single-listing-title">' . $term->name . '</h4>'; |
| 424 |
$list_args = BetterDocs_Helper::list_query_arg('docs_any', !empty($kb), $term->slug, '-1', 'betterdocs_order', '', $kb); |
| 425 |
$args = apply_filters('betterdocs_articles_args', $list_args, $term->term_id); |
| 426 |
$post_query = new WP_Query($args); |
| 427 |
|
| 428 |
if ($post_query->have_posts()) { |
| 429 |
$output .= '<ul class="docs-droppable" data-category_id="' . $term->term_id . '">'; |
| 430 |
while ($post_query->have_posts()) : $post_query->the_post(); |
| 431 |
$edit_post_link = get_edit_post_link(get_the_ID(), ''); |
| 432 |
$delete_post_link = get_delete_post_link(get_the_ID(), ''); |
| 433 |
$output .= '<li data-id="' . get_the_ID() . '">'; |
| 434 |
$output .= '<div class="betterdocs-single-list-content"><span><svg width="8px" viewBox="0 0 23 42" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="drag-dots" fill="#C5C5C5" fill-rule="nonzero"><path d="M4,0 C1.79947933,0 0,1.79947933 0,4 C0,6.20052067 1.79947933,8 4,8 C6.20052067,8 8,6.20052067 8,4 C8,1.79947933 6.20052067,0 4,0 Z M4,17 C1.79947933,17 0,18.7994793 0,21 C0,23.2005207 1.79947933,25 4,25 C6.20052067,25 8,23.2005207 8,21 C8,18.7994793 6.20052067,17 4,17 Z M4,34 C1.79947933,34 0,35.7994793 0,38 C0,40.2005207 1.79947933,42 4,42 C6.20052067,42 8,40.2005207 8,38 C8,35.7994793 6.20052067,34 4,34 Z M19,0 C16.7994793,0 15,1.79947933 15,4 C15,6.20052067 16.7994793,8 19,8 C21.2005207,8 23,6.20052067 23,4 C23,1.79947933 21.2005207,0 19,0 Z M19,17 C16.7994793,17 15,18.7994793 15,21 C15,23.2005207 16.7994793,25 19,25 C21.2005207,25 23,23.2005207 23,21 C23,18.7994793 21.2005207,17 19,17 Z M19,34 C16.7994793,34 15,35.7994793 15,38 C15,40.2005207 16.7994793,42 19,42 C21.2005207,42 23,40.2005207 23,38 C23,35.7994793 21.2005207,34 19,34 Z" id="Shape"></path></g></g></svg></span>'; |
| 435 |
$output .= $edit_post_link ? '<a href="post.php?action=edit&post=' . get_the_ID() . '">' : '<span class="betterdocs-article-title">'; |
| 436 |
$output .= wp_kses(get_the_title(), BETTERDOCS_KSES_ALLOWED_HTML); |
| 437 |
if (get_post_status(get_the_ID()) !== 'publish') { |
| 438 |
$output .= ' <span class="betterdocs-draft">'.get_post_status(get_the_ID()).'</span>'; |
| 439 |
} |
| 440 |
$output .= $edit_post_link ? '</a>' : '</span>'; |
| 441 |
$output .= '<span>'; |
| 442 |
$output .= '<a href="' . get_permalink(get_the_ID(), '') . '" target="_blank" title="View Docs"><span class="dashicons dashicons-external"></span></a>'; |
| 443 |
if ($edit_post_link) { |
| 444 |
$output .= '<a href="post.php?action=edit&post=' . get_the_ID() . '" title="Edit Docs"><span class="dashicons dashicons-edit"></span></a>'; |
| 445 |
} |
| 446 |
if ($delete_post_link) { |
| 447 |
$output .= '<a href="' . get_delete_post_link(get_the_ID(), '') . '" title="Delete Docs"><span class="dashicons dashicons-trash"></span></a>'; |
| 448 |
} |
| 449 |
$output .= '</span></div>'; |
| 450 |
$output .= '</li>'; |
| 451 |
endwhile; |
| 452 |
$output .= '</ul>'; |
| 453 |
} else { |
| 454 |
$output .= '<ul class="docs-droppable" data-category_id="' . $term->term_id . '">'; |
| 455 |
$output .= '<li class="betterdocs-no-docs"><svg id="f20e0c25-d928-42cc-98d1-13cc230663ea" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100%" height="100%" viewBox="0 0 820.16 780.81"><defs><linearGradient id="07332201-7176-49c2-9908-6dc4a39c4716" x1="539.63" y1="734.6" x2="539.63" y2="151.19" gradientTransform="translate(-3.62 1.57)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="gray" stop-opacity="0.25"/><stop offset="0.54" stop-color="gray" stop-opacity="0.12"/><stop offset="1" stop-color="gray" stop-opacity="0.1"/></linearGradient><linearGradient id="0ee1ab3f-7ba2-4205-9d4a-9606ad702253" x1="540.17" y1="180.2" x2="540.17" y2="130.75" gradientTransform="translate(-63.92 7.85)" xlink:href="#07332201-7176-49c2-9908-6dc4a39c4716"/><linearGradient id="abca9755-bed1-4a97-b027-7f02ee3ffa09" x1="540.17" y1="140.86" x2="540.17" y2="82.43" gradientTransform="translate(-84.51 124.6) rotate(-12.11)" xlink:href="#07332201-7176-49c2-9908-6dc4a39c4716"/><linearGradient id="2632d424-e666-4ee4-9508-a494957e14ab" x1="476.4" y1="710.53" x2="476.4" y2="127.12" gradientTransform="matrix(1, 0, 0, 1, 0, 0)" xlink:href="#07332201-7176-49c2-9908-6dc4a39c4716"/><linearGradient id="97571ef7-1c83-4e06-b701-c2e47e77dca3" x1="476.94" y1="156.13" x2="476.94" y2="106.68" gradientTransform="matrix(1, 0, 0, 1, 0, 0)" xlink:href="#07332201-7176-49c2-9908-6dc4a39c4716"/><linearGradient id="7d32e13e-a0c7-49c4-af0e-066a2f8cb76e" x1="666.86" y1="176.39" x2="666.86" y2="117.95" gradientTransform="matrix(1, 0, 0, 1, 0, 0)" xlink:href="#07332201-7176-49c2-9908-6dc4a39c4716"/></defs><title>No Docs</title><rect x="317.5" y="142.55" width="437.02" height="603.82" transform="translate(-271.22 62.72) rotate(-12.11)" fill="#e0e0e0"/><g opacity="0.5"><rect x="324.89" y="152.76" width="422.25" height="583.41" transform="translate(-271.22 62.72) rotate(-12.11)" fill="url(#07332201-7176-49c2-9908-6dc4a39c4716)"/></g><rect x="329.81" y="157.1" width="411.5" height="570.52" transform="translate(-270.79 62.58) rotate(-12.11)" fill="#fafafa"/><rect x="374.18" y="138.6" width="204.14" height="49.45" transform="translate(-213.58 43.93) rotate(-12.11)" fill="url(#0ee1ab3f-7ba2-4205-9d4a-9606ad702253)"/><path d="M460.93,91.9c-15.41,3.31-25.16,18.78-21.77,34.55s18.62,25.89,34,22.58,25.16-18.78,21.77-34.55S476.34,88.59,460.93,91.9ZM470.6,137A16.86,16.86,0,1,1,483.16,117,16.66,16.66,0,0,1,470.6,137Z" transform="translate(-189.92 -59.59)" fill="url(#abca9755-bed1-4a97-b027-7f02ee3ffa09)"/><rect x="375.66" y="136.55" width="199.84" height="47.27" transform="translate(-212.94 43.72) rotate(-12.11)" fill="#1fce9c"/><path d="M460.93,91.9a27.93,27.93,0,1,0,33.17,21.45A27.93,27.93,0,0,0,460.93,91.9ZM470.17,135a16.12,16.12,0,1,1,12.38-19.14A16.12,16.12,0,0,1,470.17,135Z" transform="translate(-189.92 -59.59)" fill="#1fce9c"/><rect x="257.89" y="116.91" width="437.02" height="603.82" fill="#e0e0e0"/><g opacity="0.5"><rect x="265.28" y="127.12" width="422.25" height="583.41" fill="url(#2632d424-e666-4ee4-9508-a494957e14ab)"/></g><rect x="270.65" y="131.42" width="411.5" height="570.52" fill="#fff"/><rect x="374.87" y="106.68" width="204.14" height="49.45" fill="url(#97571ef7-1c83-4e06-b701-c2e47e77dca3)"/><path d="M666.86,118c-15.76,0-28.54,13.08-28.54,29.22s12.78,29.22,28.54,29.22,28.54-13.08,28.54-29.22S682.62,118,666.86,118Zm0,46.08a16.86,16.86,0,1,1,16.46-16.86A16.66,16.66,0,0,1,666.86,164Z" transform="translate(-189.92 -59.59)" fill="url(#7d32e13e-a0c7-49c4-af0e-066a2f8cb76e)"/><rect x="377.02" y="104.56" width="199.84" height="47.27" fill="#1fce9c"/><path d="M666.86,118a27.93,27.93,0,1,0,27.93,27.93A27.93,27.93,0,0,0,666.86,118Zm0,44.05A16.12,16.12,0,1,1,683,145.89,16.12,16.12,0,0,1,666.86,162Z" transform="translate(-189.92 -59.59)" fill="#1fce9c"/><g opacity="0.5"><rect x="15.27" y="737.05" width="3.76" height="21.33" fill="#47e6b1"/><rect x="205.19" y="796.65" width="3.76" height="21.33" transform="translate(824.47 540.65) rotate(90)" fill="#47e6b1"/></g><g opacity="0.5"><rect x="451.49" width="3.76" height="21.33" fill="#47e6b1"/><rect x="641.4" y="59.59" width="3.76" height="21.33" transform="translate(523.63 -632.62) rotate(90)" fill="#47e6b1"/></g><path d="M961,832.15a4.61,4.61,0,0,1-2.57-5.57,2.22,2.22,0,0,0,.1-.51h0a2.31,2.31,0,0,0-4.15-1.53h0a2.22,2.22,0,0,0-.26.45,4.61,4.61,0,0,1-5.57,2.57,2.22,2.22,0,0,0-.51-.1h0a2.31,2.31,0,0,0-1.53,4.15h0a2.22,2.22,0,0,0,.45.26,4.61,4.61,0,0,1,2.57,5.57,2.22,2.22,0,0,0-.1.51h0a2.31,2.31,0,0,0,4.15,1.53h0a2.22,2.22,0,0,0,.26-.45,4.61,4.61,0,0,1,5.57-2.57,2.22,2.22,0,0,0,.51.1h0a2.31,2.31,0,0,0,1.53-4.15h0A2.22,2.22,0,0,0,961,832.15Z" transform="translate(-189.92 -59.59)" fill="#4d8af0" opacity="0.5"/><path d="M326.59,627.09a4.61,4.61,0,0,1-2.57-5.57,2.22,2.22,0,0,0,.1-.51h0a2.31,2.31,0,0,0-4.15-1.53h0a2.22,2.22,0,0,0-.26.45,4.61,4.61,0,0,1-5.57,2.57,2.22,2.22,0,0,0-.51-.1h0a2.31,2.31,0,0,0-1.53,4.15h0a2.22,2.22,0,0,0,.45.26,4.61,4.61,0,0,1,2.57,5.57,2.22,2.22,0,0,0-.1.51h0a2.31,2.31,0,0,0,4.15,1.53h0a2.22,2.22,0,0,0,.26-.45A4.61,4.61,0,0,1,325,631.4a2.22,2.22,0,0,0,.51.1h0a2.31,2.31,0,0,0,1.53-4.15h0A2.22,2.22,0,0,0,326.59,627.09Z" transform="translate(-189.92 -59.59)" fill="#fdd835" opacity="0.5"/><path d="M855,127.77a4.61,4.61,0,0,1-2.57-5.57,2.22,2.22,0,0,0,.1-.51h0a2.31,2.31,0,0,0-4.15-1.53h0a2.22,2.22,0,0,0-.26.45,4.61,4.61,0,0,1-5.57,2.57,2.22,2.22,0,0,0-.51-.1h0a2.31,2.31,0,0,0-1.53,4.15h0a2.22,2.22,0,0,0,.45.26,4.61,4.61,0,0,1,2.57,5.57,2.22,2.22,0,0,0-.1.51h0a2.31,2.31,0,0,0,4.15,1.53h0a2.22,2.22,0,0,0,.26-.45,4.61,4.61,0,0,1,5.57-2.57,2.22,2.22,0,0,0,.51.1h0a2.31,2.31,0,0,0,1.53-4.15h0A2.22,2.22,0,0,0,855,127.77Z" transform="translate(-189.92 -59.59)" fill="#fdd835" opacity="0.5"/><circle cx="812.64" cy="314.47" r="7.53" fill="#f55f44" opacity="0.5"/><circle cx="230.73" cy="746.65" r="7.53" fill="#f55f44" opacity="0.5"/><circle cx="735.31" cy="477.23" r="7.53" fill="#f55f44" opacity="0.5"/><circle cx="87.14" cy="96.35" r="7.53" fill="#4d8af0" opacity="0.5"/><circle cx="7.53" cy="301.76" r="7.53" fill="#47e6b1" opacity="0.5"/></svg></li>'; |
| 456 |
$output .= '</ul>'; |
| 457 |
} |
| 458 |
$output .= '</div>'; |
| 459 |
$output .= '<a href="post-new.php?post_type=docs&cat=' . $term->term_id . '" class="betterdocs-add-new-link"><span class="add-new-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30" width="20px" fill="#b0b2ba"><path d="M 14.970703 2.9726562 A 2.0002 2.0002 0 0 0 13 5 L 13 13 L 5 13 A 2.0002 2.0002 0 1 0 5 17 L 13 17 L 13 25 A 2.0002 2.0002 0 1 0 17 25 L 17 17 L 25 17 A 2.0002 2.0002 0 1 0 25 13 L 17 13 L 17 5 A 2.0002 2.0002 0 0 0 14.970703 2.9726562 z"></path></svg></span><span class="add-new-text">Add New Docs</span></a>'; |
| 460 |
$output .= '</div>'; |
| 461 |
} |
| 462 |
} |
| 463 |
$query = $wpdb->prepare( |
| 464 |
"SELECT post_title AS title, ID, post_status FROM $wpdb->posts |
| 465 |
WHERE post_type = %s |
| 466 |
AND ( ( post_status = %s ) OR ( post_status = %s ) OR ( post_status = %s ) OR ( post_status = %s ) ) |
| 467 |
AND ID NOT IN ( SELECT object_id as post_id FROM $wpdb->term_relationships |
| 468 |
WHERE term_taxonomy_id IN ( SELECT term_taxonomy_id FROM $wpdb->term_taxonomy WHERE taxonomy = %s ) )", |
| 469 |
array( |
| 470 |
'docs', |
| 471 |
'publish', |
| 472 |
'draft', |
| 473 |
'pending', |
| 474 |
'private', |
| 475 |
'doc_category' |
| 476 |
) |
| 477 |
); |
| 478 |
$uncategorized_docs = $wpdb->get_results($query); |
| 479 |
if (!empty($uncategorized_docs) && is_array($uncategorized_docs)) { |
| 480 |
$output .= '<div class="betterdocs-single-listing">'; |
| 481 |
$output .= '<div class="betterdocs-single-listing-inner">'; |
| 482 |
$output .= '<h4 class="betterdocs-single-listing-title">' . __('Uncategorized', 'betterdocs') . '</h4>'; |
| 483 |
$output .= '<ul>'; |
| 484 |
foreach ($uncategorized_docs as $doc) { |
| 485 |
$edit_post_link = get_edit_post_link($doc->ID, ''); |
| 486 |
$delete_post_link = get_delete_post_link($doc->ID, ''); |
| 487 |
$output .= '<li data-id="' . $doc->ID . '">'; |
| 488 |
$output .= '<div class="betterdocs-single-list-content"><span><svg width="8px" viewBox="0 0 23 42" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="drag-dots" fill="#C5C5C5" fill-rule="nonzero"><path d="M4,0 C1.79947933,0 0,1.79947933 0,4 C0,6.20052067 1.79947933,8 4,8 C6.20052067,8 8,6.20052067 8,4 C8,1.79947933 6.20052067,0 4,0 Z M4,17 C1.79947933,17 0,18.7994793 0,21 C0,23.2005207 1.79947933,25 4,25 C6.20052067,25 8,23.2005207 8,21 C8,18.7994793 6.20052067,17 4,17 Z M4,34 C1.79947933,34 0,35.7994793 0,38 C0,40.2005207 1.79947933,42 4,42 C6.20052067,42 8,40.2005207 8,38 C8,35.7994793 6.20052067,34 4,34 Z M19,0 C16.7994793,0 15,1.79947933 15,4 C15,6.20052067 16.7994793,8 19,8 C21.2005207,8 23,6.20052067 23,4 C23,1.79947933 21.2005207,0 19,0 Z M19,17 C16.7994793,17 15,18.7994793 15,21 C15,23.2005207 16.7994793,25 19,25 C21.2005207,25 23,23.2005207 23,21 C23,18.7994793 21.2005207,17 19,17 Z M19,34 C16.7994793,34 15,35.7994793 15,38 C15,40.2005207 16.7994793,42 19,42 C21.2005207,42 23,40.2005207 23,38 C23,35.7994793 21.2005207,34 19,34 Z" id="Shape"></path></g></g></svg></span>'; |
| 489 |
$output .= '<a href="post.php?action=edit&post=' . $doc->ID . '">'; |
| 490 |
$output .= wp_kses($doc->title, BETTERDOCS_KSES_ALLOWED_HTML); |
| 491 |
if ($doc->post_status !== 'publish') { |
| 492 |
$output .= ' <span class="betterdocs-draft">'.$doc->post_status.'</span>'; |
| 493 |
} |
| 494 |
$output .= '</a>'; |
| 495 |
$output .= '<span>'; |
| 496 |
if ($edit_post_link) { |
| 497 |
$output .= '<a href="' . $edit_post_link . '"><span class="dashicons dashicons-edit"></span></a>'; |
| 498 |
} |
| 499 |
$output .= '<a href="post-new.php?post_type=docs"><span class="dashicons dashicons-plus"></span></a>'; |
| 500 |
if ($delete_post_link) { |
| 501 |
$output .= '<a href="' . $delete_post_link . '"><span class="dashicons dashicons-trash"></span></a>'; |
| 502 |
} |
| 503 |
$output .= '</span></div>'; |
| 504 |
$output .= '</li>'; |
| 505 |
} |
| 506 |
$output .= '</ul>'; |
| 507 |
$output .= '</div>'; |
| 508 |
$output .= '<a href="post-new.php?post_type=docs" class="betterdocs-add-new-link"><span class="add-new-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30" width="20px" fill="#b0b2ba"><path d="M 14.970703 2.9726562 A 2.0002 2.0002 0 0 0 13 5 L 13 13 L 5 13 A 2.0002 2.0002 0 1 0 5 17 L 13 17 L 13 25 A 2.0002 2.0002 0 1 0 17 25 L 17 17 L 25 17 A 2.0002 2.0002 0 1 0 25 13 L 17 13 L 17 5 A 2.0002 2.0002 0 0 0 14.970703 2.9726562 z"></path></svg></span><span class="add-new-text">Add New Docs</span></a>'; |
| 509 |
$output .= '</div>'; |
| 510 |
} |
| 511 |
if (empty($terms) && empty($uncategorized_docs)) { |
| 512 |
$output .= '<div class="betterdocs-single-listing">'; |
| 513 |
$output .= '<div class="betterdocs-single-listing-inner">'; |
| 514 |
$output .= '<h4 class="betterdocs-single-listing-title">No Categories Found</h4>'; |
| 515 |
$output .= '<p class="betterdocs-single-listing-sub-title"> Please create a new Category to get started</p>'; |
| 516 |
$output .= '<ul>'; |
| 517 |
$output .= '<li><svg id="f20e0c25-d928-42cc-98d1-13cc230663ea" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100%" height="100%" viewBox="0 0 820.16 780.81"><defs><linearGradient id="07332201-7176-49c2-9908-6dc4a39c4716" x1="539.63" y1="734.6" x2="539.63" y2="151.19" gradientTransform="translate(-3.62 1.57)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="gray" stop-opacity="0.25"></stop><stop offset="0.54" stop-color="gray" stop-opacity="0.12"></stop><stop offset="1" stop-color="gray" stop-opacity="0.1"></stop></linearGradient><linearGradient id="0ee1ab3f-7ba2-4205-9d4a-9606ad702253" x1="540.17" y1="180.2" x2="540.17" y2="130.75" gradientTransform="translate(-63.92 7.85)" xlink:href="#07332201-7176-49c2-9908-6dc4a39c4716"></linearGradient><linearGradient id="abca9755-bed1-4a97-b027-7f02ee3ffa09" x1="540.17" y1="140.86" x2="540.17" y2="82.43" gradientTransform="translate(-84.51 124.6) rotate(-12.11)" xlink:href="#07332201-7176-49c2-9908-6dc4a39c4716"></linearGradient><linearGradient id="2632d424-e666-4ee4-9508-a494957e14ab" x1="476.4" y1="710.53" x2="476.4" y2="127.12" gradientTransform="matrix(1, 0, 0, 1, 0, 0)" xlink:href="#07332201-7176-49c2-9908-6dc4a39c4716"></linearGradient><linearGradient id="97571ef7-1c83-4e06-b701-c2e47e77dca3" x1="476.94" y1="156.13" x2="476.94" y2="106.68" gradientTransform="matrix(1, 0, 0, 1, 0, 0)" xlink:href="#07332201-7176-49c2-9908-6dc4a39c4716"></linearGradient><linearGradient id="7d32e13e-a0c7-49c4-af0e-066a2f8cb76e" x1="666.86" y1="176.39" x2="666.86" y2="117.95" gradientTransform="matrix(1, 0, 0, 1, 0, 0)" xlink:href="#07332201-7176-49c2-9908-6dc4a39c4716"></linearGradient></defs><title>No Docs</title><rect x="317.5" y="142.55" width="437.02" height="603.82" transform="translate(-271.22 62.72) rotate(-12.11)" fill="#e0e0e0"></rect><g opacity="0.5"><rect x="324.89" y="152.76" width="422.25" height="583.41" transform="translate(-271.22 62.72) rotate(-12.11)" fill="url(#07332201-7176-49c2-9908-6dc4a39c4716)"></rect></g><rect x="329.81" y="157.1" width="411.5" height="570.52" transform="translate(-270.79 62.58) rotate(-12.11)" fill="#fafafa"></rect><rect x="374.18" y="138.6" width="204.14" height="49.45" transform="translate(-213.58 43.93) rotate(-12.11)" fill="url(#0ee1ab3f-7ba2-4205-9d4a-9606ad702253)"></rect><path d="M460.93,91.9c-15.41,3.31-25.16,18.78-21.77,34.55s18.62,25.89,34,22.58,25.16-18.78,21.77-34.55S476.34,88.59,460.93,91.9ZM470.6,137A16.86,16.86,0,1,1,483.16,117,16.66,16.66,0,0,1,470.6,137Z" transform="translate(-189.92 -59.59)" fill="url(#abca9755-bed1-4a97-b027-7f02ee3ffa09)"></path><rect x="375.66" y="136.55" width="199.84" height="47.27" transform="translate(-212.94 43.72) rotate(-12.11)" fill="#1fce9c"></rect><path d="M460.93,91.9a27.93,27.93,0,1,0,33.17,21.45A27.93,27.93,0,0,0,460.93,91.9ZM470.17,135a16.12,16.12,0,1,1,12.38-19.14A16.12,16.12,0,0,1,470.17,135Z" transform="translate(-189.92 -59.59)" fill="#1fce9c"></path><rect x="257.89" y="116.91" width="437.02" height="603.82" fill="#e0e0e0"></rect><g opacity="0.5"><rect x="265.28" y="127.12" width="422.25" height="583.41" fill="url(#2632d424-e666-4ee4-9508-a494957e14ab)"></rect></g><rect x="270.65" y="131.42" width="411.5" height="570.52" fill="#fff"></rect><rect x="374.87" y="106.68" width="204.14" height="49.45" fill="url(#97571ef7-1c83-4e06-b701-c2e47e77dca3)"></rect><path d="M666.86,118c-15.76,0-28.54,13.08-28.54,29.22s12.78,29.22,28.54,29.22,28.54-13.08,28.54-29.22S682.62,118,666.86,118Zm0,46.08a16.86,16.86,0,1,1,16.46-16.86A16.66,16.66,0,0,1,666.86,164Z" transform="translate(-189.92 -59.59)" fill="url(#7d32e13e-a0c7-49c4-af0e-066a2f8cb76e)"></path><rect x="377.02" y="104.56" width="199.84" height="47.27" fill="#1fce9c"></rect><path d="M666.86,118a27.93,27.93,0,1,0,27.93,27.93A27.93,27.93,0,0,0,666.86,118Zm0,44.05A16.12,16.12,0,1,1,683,145.89,16.12,16.12,0,0,1,666.86,162Z" transform="translate(-189.92 -59.59)" fill="#1fce9c"></path><g opacity="0.5"><rect x="15.27" y="737.05" width="3.76" height="21.33" fill="#47e6b1"></rect><rect x="205.19" y="796.65" width="3.76" height="21.33" transform="translate(824.47 540.65) rotate(90)" fill="#47e6b1"></rect></g><g opacity="0.5"><rect x="451.49" width="3.76" height="21.33" fill="#47e6b1"></rect><rect x="641.4" y="59.59" width="3.76" height="21.33" transform="translate(523.63 -632.62) rotate(90)" fill="#47e6b1"></rect></g><path d="M961,832.15a4.61,4.61,0,0,1-2.57-5.57,2.22,2.22,0,0,0,.1-.51h0a2.31,2.31,0,0,0-4.15-1.53h0a2.22,2.22,0,0,0-.26.45,4.61,4.61,0,0,1-5.57,2.57,2.22,2.22,0,0,0-.51-.1h0a2.31,2.31,0,0,0-1.53,4.15h0a2.22,2.22,0,0,0,.45.26,4.61,4.61,0,0,1,2.57,5.57,2.22,2.22,0,0,0-.1.51h0a2.31,2.31,0,0,0,4.15,1.53h0a2.22,2.22,0,0,0,.26-.45,4.61,4.61,0,0,1,5.57-2.57,2.22,2.22,0,0,0,.51.1h0a2.31,2.31,0,0,0,1.53-4.15h0A2.22,2.22,0,0,0,961,832.15Z" transform="translate(-189.92 -59.59)" fill="#4d8af0" opacity="0.5"></path><path d="M326.59,627.09a4.61,4.61,0,0,1-2.57-5.57,2.22,2.22,0,0,0,.1-.51h0a2.31,2.31,0,0,0-4.15-1.53h0a2.22,2.22,0,0,0-.26.45,4.61,4.61,0,0,1-5.57,2.57,2.22,2.22,0,0,0-.51-.1h0a2.31,2.31,0,0,0-1.53,4.15h0a2.22,2.22,0,0,0,.45.26,4.61,4.61,0,0,1,2.57,5.57,2.22,2.22,0,0,0-.1.51h0a2.31,2.31,0,0,0,4.15,1.53h0a2.22,2.22,0,0,0,.26-.45A4.61,4.61,0,0,1,325,631.4a2.22,2.22,0,0,0,.51.1h0a2.31,2.31,0,0,0,1.53-4.15h0A2.22,2.22,0,0,0,326.59,627.09Z" transform="translate(-189.92 -59.59)" fill="#fdd835" opacity="0.5"></path><path d="M855,127.77a4.61,4.61,0,0,1-2.57-5.57,2.22,2.22,0,0,0,.1-.51h0a2.31,2.31,0,0,0-4.15-1.53h0a2.22,2.22,0,0,0-.26.45,4.61,4.61,0,0,1-5.57,2.57,2.22,2.22,0,0,0-.51-.1h0a2.31,2.31,0,0,0-1.53,4.15h0a2.22,2.22,0,0,0,.45.26,4.61,4.61,0,0,1,2.57,5.57,2.22,2.22,0,0,0-.1.51h0a2.31,2.31,0,0,0,4.15,1.53h0a2.22,2.22,0,0,0,.26-.45,4.61,4.61,0,0,1,5.57-2.57,2.22,2.22,0,0,0,.51.1h0a2.31,2.31,0,0,0,1.53-4.15h0A2.22,2.22,0,0,0,855,127.77Z" transform="translate(-189.92 -59.59)" fill="#fdd835" opacity="0.5"></path><circle cx="812.64" cy="314.47" r="7.53" fill="#f55f44" opacity="0.5"></circle><circle cx="230.73" cy="746.65" r="7.53" fill="#f55f44" opacity="0.5"></circle><circle cx="735.31" cy="477.23" r="7.53" fill="#f55f44" opacity="0.5"></circle><circle cx="87.14" cy="96.35" r="7.53" fill="#4d8af0" opacity="0.5"></circle><circle cx="7.53" cy="301.76" r="7.53" fill="#47e6b1" opacity="0.5"></circle></svg></li>'; |
| 518 |
$output .= '</ui>'; |
| 519 |
|
| 520 |
$output .= '</div>'; |
| 521 |
$output .= '<a href="edit-tags.php?taxonomy=doc_category&post_type=docs" class="betterdocs-add-new-link"><span class="add-new-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30" width="20px" fill="#b0b2ba"><path d="M 14.970703 2.9726562 A 2.0002 2.0002 0 0 0 13 5 L 13 13 L 5 13 A 2.0002 2.0002 0 1 0 5 17 L 13 17 L 13 25 A 2.0002 2.0002 0 1 0 17 25 L 17 17 L 25 17 A 2.0002 2.0002 0 1 0 25 13 L 17 13 L 17 5 A 2.0002 2.0002 0 0 0 14.970703 2.9726562 z"></path></svg></span><span class="add-new-text">Add New Docs</span></a>'; |
| 522 |
$output .= '</div>'; |
| 523 |
} |
| 524 |
echo $output; |
| 525 |
?> |
| 526 |
|
| 527 |
</div> |
| 528 |
</div> |
| 529 |
</div> |
| 530 |
</div> |