bulk-edit.php
8 years ago
list-header.php
8 years ago
row-link.php
7 years ago
row.php
7 years ago
tool-list.php
8 years ago
wpml-translations.php
8 years ago
row.php
296 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Row represents a single page |
| 4 | */ |
| 5 | $wpml = $this->integrations->plugins->wpml->installed; |
| 6 | $wpml_pages = ( $wpml && $this->integrations->plugins->wpml->isDefaultLanguage()) ? true : false; |
| 7 | if ( !$wpml ) $wpml_pages = true; |
| 8 | ?> |
| 9 | <div class="row<?php echo $row_classes; ?>"> |
| 10 | |
| 11 | <?php if ( $this->post_type->hierarchical ) : ?> |
| 12 | <div class="child-toggle"> |
| 13 | <div class="child-toggle-spacer"></div> |
| 14 | </div> |
| 15 | <?php endif; ?> |
| 16 | |
| 17 | <?php if ( !$this->post_type->hierarchical ) echo '<div class="non-hierarchical-spacer"></div>'; ?> |
| 18 | |
| 19 | <div class="row-inner"> |
| 20 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="np-icon-sub-menu"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M19 15l-6 6-1.42-1.42L15.17 16H4V4h2v10h9.17l-3.59-3.58L13 9l6 6z" class="arrow" /></svg> |
| 21 | |
| 22 | <?php |
| 23 | $sortable = apply_filters('nestedpages_post_sortable', true, $this->post, $this->post_type); |
| 24 | if ( $this->user->canSortPages() && !$this->listing_repo->isSearch() && !$this->post_type_settings->disable_sorting && $wpml_current_language !== 'all' && !$this->listing_repo->isOrdered($this->post_type->name) && $sortable ) : ?> |
| 25 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="handle np-icon-menu"><path d="M0 0h24v24H0z" fill="none" /><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z" class="bars" /></svg> |
| 26 | <?php endif; ?> |
| 27 | |
| 28 | <a href="<?php echo apply_filters('nestedpages_edit_link', get_edit_post_link(), $this->post); ?>" class="page-link page-title"> |
| 29 | <span class="title"> |
| 30 | <?php |
| 31 | echo apply_filters( 'the_title', $this->post->title, $this->post->id, $view = 'nestedpages_title' ); |
| 32 | if ( !$assigned_pt ) : |
| 33 | if ( $this->post->id == get_option('page_on_front') ) echo ' <em class="np-page-type"><strong>– ' . __('Front Page', 'wp-nested-pages') . '</strong></em>'; |
| 34 | if ( $this->post->id == get_option('page_for_posts') ) echo ' <em class="np-page-type"><strong>– ' . __('Posts Page', 'wp-nested-pages') . '</strong></em>'; |
| 35 | endif; |
| 36 | echo $this->postStates(); |
| 37 | ?> |
| 38 | </span> |
| 39 | <?php |
| 40 | // Post Status |
| 41 | echo '<span class="status">'; |
| 42 | if ( $this->post->status !== 'publish' ) echo '(' . __(ucfirst($this->post->status)) . ')'; |
| 43 | if ( post_password_required($this->post->id) ) { |
| 44 | echo '<span class="locked password-required">'; |
| 45 | echo ' <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"/></svg>'; |
| 46 | echo '</span>'; |
| 47 | } |
| 48 | echo '</span>'; |
| 49 | |
| 50 | // Nested Pages Status |
| 51 | if ( $this->post->np_status == 'hide' && !$wpml ) |
| 52 | echo '<svg class="row-status-icon status-np-hidden" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0z" fill="none"/><path class="icon" d="M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"/></svg>'; |
| 53 | |
| 54 | // Nav Status |
| 55 | if ( $this->post->nav_status == 'hide' && !$wpml ){ |
| 56 | echo '<span class="nav-status">' . __('Hidden', 'wp-nested-pages') . '</span>'; |
| 57 | } else { |
| 58 | echo '<span class="nav-status"></span>'; |
| 59 | } |
| 60 | |
| 61 | // Post Lock |
| 62 | if ( $user = wp_check_post_lock($this->post->id) ){ |
| 63 | $u = get_userdata($user); |
| 64 | echo '<span class="locked">'; |
| 65 | echo ' <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"/></svg>'; |
| 66 | echo '<em> ' . esc_html($u->display_name) . ' ' . __('currently editing', 'wp-nested-pages') . '</em></span>'; |
| 67 | } elseif ( !$this->integrations->plugins->editorial_access_manager->hasAccess($this->post->id) ){ |
| 68 | echo '<span class="locked">'; |
| 69 | echo ' <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"/></svg>'; |
| 70 | echo '</span>'; |
| 71 | } else { |
| 72 | $display_edit = ( !current_user_can('edit_others_posts') && $this->post->author !== get_current_user_id() ) ? false : true; |
| 73 | if ( $display_edit ) echo '<span class="edit-indicator">' . apply_filters('nestedpages_edit_link_text', __('Edit', 'wp-nested-pages'), $this->post) . '</span>'; |
| 74 | } |
| 75 | |
| 76 | // Sticky |
| 77 | echo '<span class="sticky"'; |
| 78 | if ( !in_array($this->post->id, $this->sticky_posts) ) echo ' style="display:none;"'; |
| 79 | echo '>(' . __('Sticky', 'wp-nested-pages') . ')<span>'; |
| 80 | |
| 81 | if ( $this->post->status !== 'publish' ) echo '(' . __(ucfirst($this->post->status)) . ')'; |
| 82 | if ( post_password_required($this->post->id) ) { |
| 83 | echo ' <span class="status-icon-locked"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"/></svg></span>'; |
| 84 | } |
| 85 | ?> |
| 86 | </a> |
| 87 | |
| 88 | <?php echo $this->rowActions($assigned_pt); ?> |
| 89 | |
| 90 | <?php if ( !$this->post->hierarchical ) : echo $this->post->hierarchical; ?> |
| 91 | <div class="np-post-columns"> |
| 92 | <ul class="np-post-info"> |
| 93 | <li><span class="np-author-display"><?php echo apply_filters('nestedpages_post_author', $this->post->author, $this->post); ?></span></li> |
| 94 | <li><?php echo get_the_date(); ?></li> |
| 95 | </ul> |
| 96 | </div> |
| 97 | <?php endif; ?> |
| 98 | |
| 99 | <?php |
| 100 | if ( $this->integrations->plugins->yoast->installed ){ |
| 101 | echo '<span class="np-seo-indicator ' . esc_html($this->post->score) . '"></span>'; |
| 102 | } |
| 103 | ?> |
| 104 | |
| 105 | <div class="action-buttons"> |
| 106 | |
| 107 | <div class="nestedpages-dropdown" data-dropdown> |
| 108 | <a href="#" class="np-btn has-icon toggle" data-dropdown-toggle> |
| 109 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 110 | <path d="M0 0h24v24H0z" fill="none"/> |
| 111 | <path class="circles" d="M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/> |
| 112 | </svg> |
| 113 | </a> |
| 114 | <ul class="nestedpages-dropdown-content" data-dropdown-content> |
| 115 | |
| 116 | <?php |
| 117 | // WPML Translations |
| 118 | if ( $wpml && in_array('wpml', $this->post_type_settings->row_actions) ) : ?> |
| 119 | <li> |
| 120 | <a href="#" data-nestedpages-translations> |
| 121 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z"/></svg> |
| 122 | <?php _e('Translations', 'wp-nested-pages'); ?> (<?php echo $this->integrations->plugins->wpml->getAllTranslations($this->post->id, 'count'); ?>) |
| 123 | </a> |
| 124 | </li> |
| 125 | <?php endif; ?> |
| 126 | |
| 127 | <?php |
| 128 | // Comments |
| 129 | if ( $this->post->comment_status == 'open' && in_array('comments', $this->post_type_settings->row_actions) ) : $comments = wp_count_comments($this->post->id); $cs = 'open' ?> |
| 130 | <li> |
| 131 | <a href="<?php echo admin_url( 'edit-comments.php?p=' . get_the_id() ); ?>"> |
| 132 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path class="primary" d="M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2z"/><path d="M0 0h24v24H0z" fill="none"/></svg> |
| 133 | <?php echo $comments->total_comments . ' ' . __('Comments', 'wp-nested-pages'); ?> |
| 134 | </a> |
| 135 | </li> |
| 136 | <?php else : $cs = 'closed'; endif; ?> |
| 137 | |
| 138 | <?php |
| 139 | if ( current_user_can('publish_pages') && $this->post_type->hierarchical && !$this->listing_repo->isSearch() && $wpml_pages ) : |
| 140 | |
| 141 | // Link |
| 142 | if (!$this->settings->menusDisabled() && !$this->integrations->plugins->wpml->installed && in_array('add_child_link', $this->post_type_settings->row_actions)) : ?> |
| 143 | <li> |
| 144 | <a href="#" class="open-redirect-modal" data-parentid="<?php echo esc_attr($this->post->id); ?>"> |
| 145 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path class="primary" d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg> |
| 146 | <?php _e('Add Child Link', 'wp-nested-pages'); ?></a> |
| 147 | </li> |
| 148 | <?php endif; ?> |
| 149 | |
| 150 | <?php if ( in_array('add_child_page', $this->post_type_settings->row_actions) ) : ?> |
| 151 | <li> |
| 152 | <a href="#" class="add-new-child" data-id="<?php echo esc_attr(get_the_id()); ?>" data-parentname="<?php echo esc_html($this->post->title); ?>"> |
| 153 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path class="primary" d="M3 21h18v-2H3v2zM3 8v8l4-4-4-4zm8 9h10v-2H11v2zM3 3v2h18V3H3zm8 6h10V7H11v2zm0 4h10v-2H11v2z"/><path d="M0 0h24v24H0z" fill="none"/></svg> |
| 154 | <?php echo __('Add Child', 'wp-nested-pages') . ' ' . $this->post_type->labels->singular_name; ?></a> |
| 155 | </li> |
| 156 | <?php endif; ?> |
| 157 | |
| 158 | <?php endif; ?> |
| 159 | |
| 160 | <?php if ( current_user_can('publish_pages') && !$this->listing_repo->isSearch() && !$this->listing_repo->isOrdered($this->post_type->name) ) : ?> |
| 161 | |
| 162 | <?php if ( in_array('insert_before', $this->post_type_settings->row_actions) ) : ?> |
| 163 | <li> |
| 164 | <a href="#" data-insert-before="<?php echo esc_attr(get_the_id()); ?>" data-parentname="<?php echo esc_html($this->post->title); ?>"> |
| 165 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path class="primary" d="M8 11h3v10h2V11h3l-4-4-4 4zM4 3v2h16V3H4z"/><path d="M0 0h24v24H0z" fill="none"/></svg> |
| 166 | <?php printf(esc_html__('Insert %s Before', 'wp-nested-pages'), $this->post_type->labels->singular_name); ?></a> |
| 167 | </li> |
| 168 | <?php endif; ?> |
| 169 | |
| 170 | <?php if ( in_array('insert_after', $this->post_type_settings->row_actions) ) : ?> |
| 171 | <li> |
| 172 | <a href="#" data-insert-after="<?php echo esc_attr(get_the_id()); ?>" data-parentname="<?php echo esc_html($this->post->title); ?>"> |
| 173 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path class="primary" d="M16 13h-3V3h-2v10H8l4 4 4-4zM4 19v2h16v-2H4z"/><path d="M0 0h24v24H0z" fill="none"/></svg> |
| 174 | <?php printf(esc_html__('Insert %s After', 'wp-nested-pages'), $this->post_type->labels->singular_name); ?></a> |
| 175 | </li> |
| 176 | <?php endif; ?> |
| 177 | |
| 178 | <?php endif; ?> |
| 179 | |
| 180 | <?php if ( $this->user->canSortPages() && !$this->listing_repo->isSearch() && !$this->post_type_settings->disable_sorting && $wpml_current_language !== 'all' && !$this->listing_repo->isOrdered($this->post_type->name) ) : ?> |
| 181 | |
| 182 | <?php if ( in_array('push_to_top', $this->post_type_settings->row_actions) ) : ?> |
| 183 | <li> |
| 184 | <a href="#" data-push-to-top> |
| 185 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 186 | <path fill="none" d="M0 0h24v24H0V0z"/> |
| 187 | <path class="primary" d="M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"/> |
| 188 | </svg> |
| 189 | <?php _e('Push to Top', 'wp-nested-pages'); ?></a> |
| 190 | </li> |
| 191 | <?php endif; ?> |
| 192 | |
| 193 | <?php if ( in_array('push_to_bottom', $this->post_type_settings->row_actions) ) : ?> |
| 194 | <li> |
| 195 | <a href="#" data-push-to-bottom> |
| 196 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 197 | <path fill="none" d="M0 0h24v24H0V0z"/> |
| 198 | <path fill="#010101" class="primary" d="M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"/> |
| 199 | </svg> |
| 200 | <?php _e('Push to Bottom', 'wp-nested-pages'); ?></a> |
| 201 | </li> |
| 202 | <?php endif; ?> |
| 203 | |
| 204 | <?php endif; ?> |
| 205 | |
| 206 | <?php if ( current_user_can('edit_pages') && current_user_can('edit_posts') && $wpml_pages && in_array('clone', $this->post_type_settings->row_actions) ) : ?> |
| 207 | <li> |
| 208 | <a href="#" class="clone-post" data-id="<?php echo esc_attr(get_the_id()); ?>" data-parentname="<?php echo esc_html($this->post->title); ?>"> |
| 209 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path class="primary" d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4l6 6v10c0 1.1-.9 2-2 2H7.99C6.89 23 6 22.1 6 21l.01-14c0-1.1.89-2 1.99-2h7zm-1 7h5.5L14 6.5V12z"/></svg> |
| 210 | <?php _e('Clone', 'wp-nested-pages'); ?></a> |
| 211 | </li> |
| 212 | <?php endif; ?> |
| 213 | </ul> |
| 214 | </div><!-- .dropdown --> |
| 215 | |
| 216 | <?php |
| 217 | $can_quickedit_post = apply_filters('nestedpages_quickedit', true, $this->post); |
| 218 | if ( !current_user_can('edit_others_posts') ){ |
| 219 | $author = get_post_field('post_author', $this->post->ID); |
| 220 | if ( intval($author) !== get_current_user_id() ) $can_quickedit_post = false; |
| 221 | } |
| 222 | if ( !$user = wp_check_post_lock($this->post->id) || !$this->integrations->plugins->editorial_access_manager->hasAccess($this->post->id) && current_user_can('edit_posts', $this->post) && $can_quickedit_post && in_array('quickedit', $this->post_type_settings->row_actions) ) : |
| 223 | if ( $can_quickedit_post ) : |
| 224 | ?> |
| 225 | <a href="#" |
| 226 | class="np-btn np-quick-edit" |
| 227 | data-id="<?php echo esc_attr($this->post->id); ?>" |
| 228 | data-template="<?php echo esc_attr($this->post->template); ?>" |
| 229 | data-title="<?php echo esc_attr($this->post->title); ?>" |
| 230 | data-slug="<?php echo esc_attr(urldecode($post->post_name)); ?>" |
| 231 | data-commentstatus="<?php echo esc_attr($cs); ?>" |
| 232 | data-status="<?php echo esc_attr($this->post->status); ?>" |
| 233 | data-np-status="<?php echo esc_attr($this->post->np_status); ?>" |
| 234 | data-navstatus="<?php echo esc_attr($this->post->nav_status); ?>" |
| 235 | data-navtitleattr="<?php echo esc_attr($this->post->nav_title_attr); ?>" |
| 236 | data-navcss="<?php echo esc_attr($this->post->nav_css); ?>" |
| 237 | data-linktarget="<?php echo esc_attr($this->post->link_target); ?>" |
| 238 | data-navtitle="<?php echo esc_attr($this->post->nav_title); ?>" |
| 239 | data-author="<?php echo esc_attr($post->post_author); ?>" |
| 240 | <?php if ( current_user_can('publish_pages') ) : ?> |
| 241 | data-password="<?php echo esc_attr($post->post_password); ?>" |
| 242 | <?php endif; ?> |
| 243 | data-month="<?php echo esc_attr($this->post->date->month); ?>" |
| 244 | data-day="<?php echo esc_attr($this->post->date->d); ?>" |
| 245 | data-year="<?php echo esc_attr($this->post->date->y); ?>" |
| 246 | data-hour="<?php echo esc_attr($this->post->date->h); ?>" |
| 247 | data-minute="<?php echo esc_attr($this->post->date->m);?>" |
| 248 | data-datepicker="<?php echo date_i18n('n/j/Y', $this->post->date->datepicker); ?>" |
| 249 | data-time="<?php echo date_i18n('H:i', $this->post->date->datepicker); ?>" |
| 250 | data-formattedtime="<?php echo date_i18n('g:i', $this->post->date->datepicker); ?>" |
| 251 | data-timeformat="<?php echo get_option('time_format'); ?>" |
| 252 | data-ampm="<?php echo date('a', $this->post->date->datepicker); ?>" |
| 253 | data-sticky="<?php if ( in_array($this->post->id, $this->sticky_posts) ) echo 'sticky'; ?>"> |
| 254 | <?php _e('Quick Edit', 'wp-nested-pages'); ?> |
| 255 | </a> |
| 256 | <?php endif; endif; ?> |
| 257 | |
| 258 | <?php if ( in_array('view', $this->post_type_settings->row_actions) ) : ?> |
| 259 | <a href="<?php echo apply_filters('nestedpages_view_link', get_the_permalink(), $this->post); ?>" class="np-btn np-view-button" target="_blank"> |
| 260 | <?php echo apply_filters('nestedpages_view_link_text', __('View', 'wp-nested-pages'), $this->post); ?> |
| 261 | </a> |
| 262 | <?php endif; ?> |
| 263 | |
| 264 | <?php if ( current_user_can('delete_pages') && $this->integrations->plugins->editorial_access_manager->hasAccess($this->post->id) && in_array('trash', $this->post_type_settings->row_actions) ) : ?> |
| 265 | <a href="<?php echo get_delete_post_link(get_the_id()); ?>" class="np-btn np-btn-trash"> |
| 266 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="np-icon-remove"><path d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z" class="icon"/><path d="M0 0h24v24H0z" fill="none"/></svg> |
| 267 | </a> |
| 268 | <?php endif; ?> |
| 269 | |
| 270 | </div><!-- .action-buttons --> |
| 271 | </div><!-- .row-inner --> |
| 272 | |
| 273 | <?php |
| 274 | // Thumbnail |
| 275 | $thumbnail_source = $this->post_type_repo->thumbnails($this->post_type->name, 'source'); |
| 276 | $thumbnail_size = $this->post_type_repo->thumbnails($this->post_type->name, 'display_size'); |
| 277 | if ( $thumbnail_source ) : |
| 278 | $out = '<div class="np-thumbnail ' . $thumbnail_size . '">'; |
| 279 | if ( has_post_thumbnail($this->post->id) ) : |
| 280 | $image = get_the_post_thumbnail($this->post->id, $thumbnail_source); |
| 281 | $out .= apply_filters('nestedpages_thumbnail', $image, $this->post); |
| 282 | else : |
| 283 | $image_fallback = apply_filters('nestedpages_thumbnail_fallback', false, $this->post); |
| 284 | if ( $image_fallback ) : |
| 285 | $out .= apply_filters('nestedpages_thumbnail_fallback', $image_fallback, $this->post); |
| 286 | endif; |
| 287 | endif; |
| 288 | $out .= '</div>'; |
| 289 | echo $out; |
| 290 | endif; |
| 291 | ?> |
| 292 | |
| 293 | <div class="np-bulk-checkbox"> |
| 294 | <input type="checkbox" name="nestedpages_bulk[]" value="<?php echo esc_attr($this->post->id); ?>" data-np-bulk-checkbox="<?php echo esc_attr($this->post->title); ?>" data-np-post-type="<?php echo esc_attr($this->post->post_type); ?>" /> |
| 295 | </div> |
| 296 | </div><!-- .row --> |