| @@ -8,8 +8,13 @@ | ||
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | 10 | namespace MainWP\Dashboard; |
| 11 | 11 | |
| 12 | +// Exit if accessed directly. | |
| 13 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 14 | + exit; | |
| 15 | +} | |
| 16 | + | |
| 12 | 17 | /** |
| 13 | 18 | * Class MainWP_Recent_Pages |
| 14 | 19 | * |
| 15 | 20 | * Displays the Child Sites most recent published draft, pending, trash & future Pages. |
| @@ -83,14 +88,23 @@ | ||
| 83 | 88 | } |
| 84 | 89 | } else { |
| 85 | 90 | if ( $current_wpid ) { |
| 86 | 91 | $sql = MainWP_DB::instance()->get_sql_website_by_id( $current_wpid ); |
| 92 | + $websites = MainWP_DB::instance()->query( $sql ); | |
| 87 | 93 | $individual = true; |
| 88 | 94 | } else { |
| 89 | - $sql = MainWP_DB::instance()->get_sql_websites_for_current_user(); | |
| 90 | - $individual = false; | |
| 95 | + $wpsite_fields = array( 'id', 'name', 'url' ); | |
| 96 | + $websites = MainWP_DB::instance()->query( | |
| 97 | + MainWP_DB::instance()->get_sql_websites_for_current_user_by_params( | |
| 98 | + array( | |
| 99 | + 'view' => 'custom_view', | |
| 100 | + 'others_fields' => array( 'recent_pages' ), | |
| 101 | + 'select_wp_fields' => $wpsite_fields, | |
| 102 | + ) | |
| 103 | + ) | |
| 104 | + ); | |
| 105 | + $individual = false; | |
| 91 | 106 | } |
| 92 | - $websites = MainWP_DB::instance()->query( $sql ); | |
| 93 | 107 | |
| 94 | 108 | if ( $websites ) { |
| 95 | 109 | while ( $websites && ( $website = MainWP_DB::fetch_object( $websites ) ) ) { |
| 96 | 110 | if ( empty( $website->recent_pages ) ) { |
| @@ -147,13 +161,13 @@ | ||
| 147 | 161 | |
| 148 | 162 | ?> |
| 149 | 163 | |
| 150 | 164 | <div class="ui stackable grid mainwp-widget-footer"> |
| 151 | - <div class="eight wide column"> | |
| 152 | - <a href="<?php echo esc_url( admin_url( 'admin.php?page=PageBulkManage' ) ); ?>" title="" class="ui button fluid mini green basic"><?php esc_html_e( 'Manage Pages', 'mainwp' ); ?></a> | |
| 165 | + <div class="eight wide left aligned middle aligned column"> | |
| 166 | + <a href="<?php echo esc_url( admin_url( 'admin.php?page=PageBulkAdd' ) ); ?>" class="ui mini basic button"><?php esc_html_e( 'Create a New Page', 'mainwp' ); ?></a> | |
| 153 | 167 | </div> |
| 154 | - <div class="eight wide column right aligned"> | |
| 155 | - <a href="<?php echo esc_url( admin_url( 'admin.php?page=PageBulkAdd' ) ); ?>" title="" class="ui button fluid mini green"><?php esc_html_e( 'New Page', 'mainwp' ); ?></a> | |
| 168 | + <div class="eight wide right aligned middle aligned column"> | |
| 169 | + <a href="<?php echo esc_url( admin_url( 'admin.php?page=PageBulkManage' ) ); ?>" class="ui mini basic button"><?php esc_html_e( 'Manage Pages', 'mainwp' ); ?></a> | |
| 156 | 170 | </div> |
| 157 | 171 | </div> |
| 158 | 172 | <?php |
| 159 | 173 | /** |
| @@ -172,9 +186,9 @@ | ||
| 172 | 186 | public static function render_top_grid() { |
| 173 | 187 | ?> |
| 174 | 188 | <div class="ui grid mainwp-widget-header"> |
| 175 | 189 | <div class="twelve wide column"> |
| 176 | - <h3 class="ui header handle-drag"> | |
| 190 | + <h2 class="ui header handle-drag"> | |
| 177 | 191 | <?php |
| 178 | 192 | /** |
| 179 | 193 | * Filter: mainwp_recent_pages_widget_title |
| 180 | 194 | * |
| @@ -188,21 +202,20 @@ | ||
| 188 | 202 | <div class="sub header"><?php esc_html_e( 'The most recent pages from the Client websites', 'mainwp' ); ?></div> |
| 189 | 203 | <?php else : ?> |
| 190 | 204 | <div class="sub header"><?php esc_html_e( 'The most recent pages from your websites', 'mainwp' ); ?></div> |
| 191 | 205 | <?php endif; ?> |
| 192 | - </h3> | |
| 206 | + </h2> | |
| 193 | 207 | </div> |
| 194 | 208 | <div class="four wide column right aligned"> |
| 195 | - <div class="ui dropdown right pointing mainwp-dropdown-tab"> | |
| 196 | - <div class="text"><?php esc_html_e( 'Published', 'mainwp' ); ?></div> | |
| 197 | - <i class="dropdown icon"></i> | |
| 198 | - <div class="menu"> | |
| 199 | - <a class="item recent_posts_published_lnk" data-tab="page-published" data-value="published" title="<?php esc_attr_e( 'Published', 'mainwp' ); ?>" href="#"><?php esc_html_e( 'Published', 'mainwp' ); ?></a> | |
| 200 | - <a class="item recent_posts_draft_lnk" data-tab="page-draft" data-value="draft" title="<?php esc_attr_e( 'Draft', 'mainwp' ); ?>" href="#"><?php esc_html_e( 'Draft', 'mainwp' ); ?></a> | |
| 201 | - <a class="item recent_posts_pending_lnk" data-tab="page-pending" data-value="pending" title="<?php esc_attr_e( 'Pending', 'mainwp' ); ?>" href="#"><?php esc_html_e( 'Pending', 'mainwp' ); ?></a> | |
| 202 | - <a class="item recent_posts_future_lnk" data-tab="page-future" data-value="future" title="<?php esc_attr_e( 'Scheduled', 'mainwp' ); ?>" href="#"><?php esc_html_e( 'Scheduled', 'mainwp' ); ?></a> | |
| 203 | - <a class="item recent_posts_trash_lnk" data-tab="page-trash" data-value="trash" title="<?php esc_attr_e( 'Trash', 'mainwp' ); ?>" href="#"><?php esc_html_e( 'Trash', 'mainwp' ); ?></a> | |
| 204 | - </div> | |
| 209 | + <div class="ui dropdown right tiny pointing mainwp-dropdown-tab"> | |
| 210 | + <i class="vertical ellipsis icon"></i> | |
| 211 | + <div class="menu"> | |
| 212 | + <a class="item recent_posts_published_lnk" data-tab="page-published" data-value="published" title="<?php esc_attr_e( 'Published', 'mainwp' ); ?>" href="#"><?php esc_html_e( 'Published', 'mainwp' ); ?></a> | |
| 213 | + <a class="item recent_posts_draft_lnk" data-tab="page-draft" data-value="draft" title="<?php esc_attr_e( 'Draft', 'mainwp' ); ?>" href="#"><?php esc_html_e( 'Draft', 'mainwp' ); ?></a> | |
| 214 | + <a class="item recent_posts_pending_lnk" data-tab="page-pending" data-value="pending" title="<?php esc_attr_e( 'Pending', 'mainwp' ); ?>" href="#"><?php esc_html_e( 'Pending', 'mainwp' ); ?></a> | |
| 215 | + <a class="item recent_posts_future_lnk" data-tab="page-future" data-value="future" title="<?php esc_attr_e( 'Scheduled', 'mainwp' ); ?>" href="#"><?php esc_html_e( 'Scheduled', 'mainwp' ); ?></a> | |
| 216 | + <a class="item recent_posts_trash_lnk" data-tab="page-trash" data-value="trash" title="<?php esc_attr_e( 'Trash', 'mainwp' ); ?>" href="#"><?php esc_html_e( 'Trash', 'mainwp' ); ?></a> | |
| 217 | + </div> | |
| 205 | 218 | </div> |
| 206 | 219 | </div> |
| 207 | 220 | </div> |
| 208 | 221 | <?php |
| @@ -238,12 +251,12 @@ | ||
| 238 | 251 | * @since 4.1 |
| 239 | 252 | */ |
| 240 | 253 | do_action( 'mainwp_recent_pages_before_publised_list', $allPages, $recent_number ); |
| 241 | 254 | if ( empty( $recent_pages_published ) ) : |
| 242 | - MainWP_UI::render_empty_element_placeholder(); | |
| 255 | + MainWP_UI::render_empty_element_placeholder( __( 'No Recent Pages Found', 'mainwp' ), __( 'Recent post changes will appear here once activity is detected.', 'mainwp' ), '<em data-emoji=":page_facing_up:" class="medium"></em>' ); | |
| 243 | 256 | endif; |
| 244 | 257 | ?> |
| 245 | - <div class="ui middle aligned divided selection list"> | |
| 258 | + <div class="ui middle aligned divided list"> | |
| 246 | 259 | <?php |
| 247 | 260 | $_count = count( $recent_pages_published ); |
| 248 | 261 | for ( $i = 0; $i < $_count && $i < $recent_number; $i++ ) { |
| 249 | 262 | if ( ! isset( $recent_pages_published[ $i ]['title'] ) || empty( $recent_pages_published[ $i ]['title'] ) ) { |
| @@ -256,9 +269,9 @@ | ||
| 256 | 269 | $name = wp_strip_all_tags( $recent_pages_published[ $i ]['website']->name ); |
| 257 | 270 | |
| 258 | 271 | ?> |
| 259 | 272 | <div class="item"> |
| 260 | - <div class="ui stackable grid"> | |
| 273 | + <div class="ui grid"> | |
| 261 | 274 | <input class="postId" type="hidden" name="id" value="<?php echo esc_attr( $recent_pages_published[ $i ]['id'] ); ?>"/> |
| 262 | 275 | <input class="websiteId" type="hidden" name="id" value="<?php echo esc_attr( $recent_pages_published[ $i ]['website']->id ); ?>"/> |
| 263 | 276 | <div class="fourteen wide column middle aligned"> |
| 264 | 277 | <div> |
| @@ -269,13 +282,13 @@ | ||
| 269 | 282 | </div> |
| 270 | 283 | <span class="ui small text"><?php echo esc_html( $recent_pages_published[ $i ]['dts'] ); ?></span> |
| 271 | 284 | </div> |
| 272 | 285 | <div class="two wide column right aligned"> |
| 273 | - <div class="ui right pointing dropdown icon mini basic green button" style="z-index:999"> | |
| 274 | - <i class="ellipsis horizontal icon"></i> | |
| 286 | + <div class="ui right pointing dropdown" style="z-index:999"> | |
| 287 | + <i class="ellipsis vertical icon"></i> | |
| 275 | 288 | <div class="menu"> |
| 276 | 289 | <a class="<?php echo $is_demo ? 'disabled' : ''; ?> item mainwp-post-unpublish" href="#"><?php esc_html_e( 'Unpublish', 'mainwp' ); ?></a> |
| 277 | - <a class="<?php echo $is_demo ? 'disabled' : ''; ?> item" href="admin.php?page=SiteOpen&newWindow=yes&websiteid=<?php echo esc_attr( $recent_pages_published[ $i ]['website']->id ); ?>&location=<?php echo esc_html( base64_encode( 'post.php?action=editpost&post=' . esc_attr( $recent_pages_published[ $i ]['id'] ) . '&action=edit' ) ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions -- base64_encode used for http encoding compatible. ?>&_opennonce=<?php echo esc_html( wp_create_nonce( 'mainwp-admin-nonce' ) ); ?>" title="Edit this post" target="_blank"><?php esc_html_e( 'Edit', 'mainwp' ); ?></a> | |
| 290 | + <a class="<?php echo $is_demo ? 'disabled' : ''; ?> item" href="<?php MainWP_Site_Open::get_open_site_admin_link( $recent_pages_published[ $i ]['website']->id, true ); ?>&location=<?php echo esc_html( base64_encode( 'post.php?action=editpost&post=' . esc_attr( $recent_pages_published[ $i ]['id'] ) . '&action=edit' ) ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions -- base64_encode used for http encoding compatible. ?>" title="Edit this post" target="_blank"><?php esc_html_e( 'Edit', 'mainwp' ); ?></a> | |
| 278 | 291 | <a class="<?php echo $is_demo ? 'disabled' : ''; ?> item mainwp-post-trash" href="#" ><?php esc_html_e( 'Trash', 'mainwp' ); ?></a> |
| 279 | 292 | <a class="<?php echo $is_demo ? 'disabled' : ''; ?> item" href="<?php echo esc_url( $recent_pages_published[ $i ]['website']->url ) . ( substr( $recent_pages_published[ $i ]['website']->url, - 1 ) !== '/' ? '/' : '' ) . '?p=' . esc_attr( $recent_pages_published[ $i ]['id'] ); ?>" target="_blank" class="mainwp-may-hide-referrer" title="View '<?php echo esc_attr( $recent_pages_published[ $i ]['title'] ); ?>'" rel="permalink"><?php esc_html_e( 'View', 'mainwp' ); ?></a> |
| 280 | 293 | <a class="<?php echo $is_demo ? 'disabled' : ''; ?> item mainwp-post-viewall" href="admin.php?page=PageBulkManage" ><?php esc_html_e( 'View all', 'mainwp' ); ?></a> |
| 281 | 294 | </div> |
| @@ -333,12 +346,12 @@ | ||
| 333 | 346 | * @since 4.1 |
| 334 | 347 | */ |
| 335 | 348 | do_action( 'mainwp_recent_pages_before_draft_list', $allPages, $recent_number ); |
| 336 | 349 | if ( empty( $recent_pages_draft ) ) { |
| 337 | - MainWP_UI::render_empty_element_placeholder(); | |
| 350 | + MainWP_UI::render_empty_element_placeholder( __( 'No Recent Pages', 'mainwp' ), __( 'Recent post changes will appear here once activity is detected.', 'mainwp' ), '<em data-emoji=":page_facing_up:" class="medium"></em>' ); | |
| 338 | 351 | } |
| 339 | 352 | ?> |
| 340 | - <div class="ui middle aligned divided selection list"> | |
| 353 | + <div class="ui middle aligned divided list"> | |
| 341 | 354 | <?php |
| 342 | 355 | $_count = count( $recent_pages_draft ); |
| 343 | 356 | for ( $i = 0; $i < $_count && $i < $recent_number; $i++ ) { |
| 344 | 357 | if ( ! isset( $recent_pages_draft[ $i ]['title'] ) || empty( $recent_pages_draft[ $i ]['title'] ) ) { |
| @@ -349,9 +362,9 @@ | ||
| 349 | 362 | } |
| 350 | 363 | $name = wp_strip_all_tags( $recent_pages_draft[ $i ]['website']->name ); |
| 351 | 364 | ?> |
| 352 | 365 | <div class="item"> |
| 353 | - <div class="ui stackable grid"> | |
| 366 | + <div class="ui grid"> | |
| 354 | 367 | <input class="postId" type="hidden" name="id" value="<?php echo esc_attr( $recent_pages_draft[ $i ]['id'] ); ?>"/> |
| 355 | 368 | <input class="websiteId" type="hidden" name="id" value="<?php echo esc_attr( $recent_pages_draft[ $i ]['website']->id ); ?>"/> |
| 356 | 369 | <div class="fourteen wide column middle aligned"> |
| 357 | 370 | <div> |
| @@ -362,13 +375,13 @@ | ||
| 362 | 375 | </div> |
| 363 | 376 | <span class="ui small text"><?php echo esc_html( $recent_pages_draft[ $i ]['dts'] ); ?></span> |
| 364 | 377 | </div> |
| 365 | 378 | <div class="two wide column right aligned"> |
| 366 | - <div class="ui right pointing dropdown icon mini basic green button" style="z-index:999"> | |
| 367 | - <i class="ellipsis horizontal icon"></i> | |
| 379 | + <div class="ui right pointing dropdown" style="z-index:999"> | |
| 380 | + <i class="ellipsis vertical icon"></i> | |
| 368 | 381 | <div class="menu"> |
| 369 | 382 | <a class="<?php echo $is_demo ? 'disabled' : ''; ?> item mainwp-post-publish" href="#"><?php esc_html_e( 'Publish', 'mainwp' ); ?></a> |
| 370 | - <a class="<?php echo $is_demo ? 'disabled' : ''; ?> item" href="admin.php?page=SiteOpen&newWindow=yes&websiteid=<?php echo intval( $recent_pages_draft[ $i ]['website']->id ); ?>&location=<?php echo esc_html( base64_encode( 'post.php?action=editpost&post=' . $recent_pages_draft[ $i ]['id'] . '&action=edit' ) ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions -- base64_encode used for http encoding compatible. ?>&_opennonce=<?php echo esc_html( wp_create_nonce( 'mainwp-admin-nonce' ) ); ?>" title="Edit this post" target="_blank"><?php esc_html_e( 'Edit', 'mainwp' ); ?></a> | |
| 383 | + <a class="<?php echo $is_demo ? 'disabled' : ''; ?> item" href="<?php MainWP_Site_Open::get_open_site_admin_link( $recent_pages_draft[ $i ]['website']->id, true ); ?>&location=<?php echo esc_html( base64_encode( 'post.php?action=editpost&post=' . $recent_pages_draft[ $i ]['id'] . '&action=edit' ) ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions -- base64_encode used for http encoding compatible. ?>" title="Edit this post" target="_blank"><?php esc_html_e( 'Edit', 'mainwp' ); ?></a> | |
| 371 | 384 | <a class="<?php echo $is_demo ? 'disabled' : ''; ?> item mainwp-post-trash" href="#"><?php esc_html_e( 'Trash', 'mainwp' ); ?></a> |
| 372 | 385 | <a class="<?php echo $is_demo ? 'disabled' : ''; ?> item mainwp-post-viewall" href="admin.php?page=PostBulkManage"><?php esc_html_e( 'View all', 'mainwp' ); ?></a> |
| 373 | 386 | </div> |
| 374 | 387 | </div> |
| @@ -424,12 +437,12 @@ | ||
| 424 | 437 | * @since 4.1 |
| 425 | 438 | */ |
| 426 | 439 | do_action( 'mainwp_recent_pages_before_pending_list', $allPages, $recent_number ); |
| 427 | 440 | if ( empty( $recent_pages_pending ) ) { |
| 428 | - MainWP_UI::render_empty_element_placeholder(); | |
| 441 | + MainWP_UI::render_empty_element_placeholder( __( 'No Recent Pages', 'mainwp' ), __( 'Recent post changes will appear here once activity is detected.', 'mainwp' ), '<em data-emoji=":page_facing_up:" class="medium"></em>' ); | |
| 429 | 442 | } |
| 430 | 443 | ?> |
| 431 | - <div class="ui middle aligned divided selection list"> | |
| 444 | + <div class="ui middle aligned divided list"> | |
| 432 | 445 | <?php |
| 433 | 446 | $_count = count( $recent_pages_pending ); |
| 434 | 447 | for ( $i = 0; $i < $_count && $i < $recent_number; $i++ ) { |
| 435 | 448 | if ( ! isset( $recent_pages_pending[ $i ]['title'] ) || empty( $recent_pages_pending[ $i ]['title'] ) ) { |
| @@ -440,9 +453,9 @@ | ||
| 440 | 453 | } |
| 441 | 454 | $name = wp_strip_all_tags( $recent_pages_pending[ $i ]['website']->name ); |
| 442 | 455 | ?> |
| 443 | 456 | <div class="item"> |
| 444 | - <div class="ui stackable grid"> | |
| 457 | + <div class="ui grid"> | |
| 445 | 458 | <input class="postId" type="hidden" name="id" value="<?php echo esc_attr( $recent_pages_pending[ $i ]['id'] ); ?>"/> |
| 446 | 459 | <input class="websiteId" type="hidden" name="id" value="<?php echo esc_attr( $recent_pages_pending[ $i ]['website']->id ); ?>"/> |
| 447 | 460 | <div class="fourteen wide column middle aligned"> |
| 448 | 461 | <div> |
| @@ -453,13 +466,13 @@ | ||
| 453 | 466 | </div> |
| 454 | 467 | <span class="ui small text"><?php echo esc_html( $recent_pages_pending[ $i ]['dts'] ); ?></span> |
| 455 | 468 | </div> |
| 456 | 469 | <div class="two wide column right aligned"> |
| 457 | - <div class="ui right pointing dropdown icon mini basic green button" style="z-index:999"> | |
| 458 | - <i class="ellipsis horizontal icon"></i> | |
| 470 | + <div class="ui right pointing dropdown" style="z-index:999"> | |
| 471 | + <i class="ellipsis vertical icon"></i> | |
| 459 | 472 | <div class="menu"> |
| 460 | 473 | <a class="<?php echo $is_demo ? 'disabled' : ''; ?> item mainwp-post-publish" href="#"><?php esc_html_e( 'Publish', 'mainwp' ); ?></a> |
| 461 | - <a class="<?php echo $is_demo ? 'disabled' : ''; ?> item" href="admin.php?page=SiteOpen&newWindow=yes&websiteid=<?php echo intval( $recent_pages_pending[ $i ]['website']->id ); ?>&location=<?php echo esc_html( base64_encode( 'post.php?action=editpost&post=' . $recent_pages_pending[ $i ]['id'] . '&action=edit' ) ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions -- base64_encode used for http encoding compatible. ?>&_opennonce=<?php echo esc_html( wp_create_nonce( 'mainwp-admin-nonce' ) ); ?>" title="Edit this post" target="_blank"><?php esc_html_e( 'Edit', 'mainwp' ); ?></a> | |
| 474 | + <a class="<?php echo $is_demo ? 'disabled' : ''; ?> item" href="<?php MainWP_Site_Open::get_open_site_admin_link( $recent_pages_pending[ $i ]['website']->id, true ); ?>&location=<?php echo esc_html( base64_encode( 'post.php?action=editpost&post=' . $recent_pages_pending[ $i ]['id'] . '&action=edit' ) ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions -- base64_encode used for http encoding compatible. ?>" title="Edit this post" target="_blank"><?php esc_html_e( 'Edit', 'mainwp' ); ?></a> | |
| 462 | 475 | <a class="<?php echo $is_demo ? 'disabled' : ''; ?> item mainwp-post-trash" href="#"><?php esc_html_e( 'Trash', 'mainwp' ); ?></a> |
| 463 | 476 | <a class="<?php echo $is_demo ? 'disabled' : ''; ?> item mainwp-post-viewall" href="admin.php?page=PostBulkManage"><?php esc_html_e( 'View all', 'mainwp' ); ?></a> |
| 464 | 477 | </div> |
| 465 | 478 | </div> |
| @@ -516,12 +529,12 @@ | ||
| 516 | 529 | * @since 4.1 |
| 517 | 530 | */ |
| 518 | 531 | do_action( 'mainwp_recent_pages_before_future_list', $allPages, $recent_number ); |
| 519 | 532 | if ( empty( $recent_pages_future ) ) { |
| 520 | - MainWP_UI::render_empty_element_placeholder(); | |
| 533 | + MainWP_UI::render_empty_element_placeholder( __( 'No Recent Pages', 'mainwp' ), __( 'Recent post changes will appear here once activity is detected.', 'mainwp' ), '<em data-emoji=":page_facing_up:" class="medium"></em>' ); | |
| 521 | 534 | } |
| 522 | 535 | ?> |
| 523 | - <div class="ui middle aligned divided selection list"> | |
| 536 | + <div class="ui middle aligned divided list"> | |
| 524 | 537 | <?php |
| 525 | 538 | $_count = count( $recent_pages_future ); |
| 526 | 539 | for ( $i = 0; $i < $_count && $i < $recent_number; $i++ ) { |
| 527 | 540 | if ( ! isset( $recent_pages_future[ $i ]['title'] ) || empty( $recent_pages_future[ $i ]['title'] ) ) { |
| @@ -532,9 +545,9 @@ | ||
| 532 | 545 | } |
| 533 | 546 | $name = wp_strip_all_tags( $recent_pages_future[ $i ]['website']->name ); |
| 534 | 547 | ?> |
| 535 | 548 | <div class="item"> |
| 536 | - <div class="ui stackable grid"> | |
| 549 | + <div class="ui grid"> | |
| 537 | 550 | <input class="postId" type="hidden" name="id" value="<?php echo esc_attr( $recent_pages_future[ $i ]['id'] ); ?>"/> |
| 538 | 551 | <input class="websiteId" type="hidden" name="id" value="<?php echo esc_attr( $recent_pages_future[ $i ]['website']->id ); ?>"/> |
| 539 | 552 | <div class="fourteen wide column middle aligned"> |
| 540 | 553 | <div> |
| @@ -545,15 +558,15 @@ | ||
| 545 | 558 | </div> |
| 546 | 559 | <span class="ui small text"><?php echo esc_html( $recent_pages_future[ $i ]['dts'] ); ?></span> |
| 547 | 560 | </div> |
| 548 | 561 | <div class="two wide column right aligned"> |
| 549 | - <div class="ui right pointing dropdown icon mini basic green button" style="z-index:999"> | |
| 550 | - <i class="ellipsis horizontal icon"></i> | |
| 562 | + <div class="ui right pointing dropdown" style="z-index:999"> | |
| 563 | + <i class="ellipsis vertical icon"></i> | |
| 551 | 564 | <div class="menu"> |
| 552 | 565 | <a class="<?php echo $is_demo ? 'disabled' : ''; ?> item mainwp-post-publish" href="#"><?php esc_html_e( 'Publish', 'mainwp' ); ?></a> |
| 553 | - <a class="<?php echo $is_demo ? 'disabled' : ''; ?> item" href="admin.php?page=SiteOpen&newWindow=yes&websiteid=<?php echo esc_attr( $recent_pages_future[ $i ]['website']->id ); ?>&location=<?php echo esc_html( base64_encode( 'post.php?action=editpost&post=' . $recent_pages_future[ $i ]['id'] . '&action=edit' ) ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions -- base64_encode used for http encoding compatible. ?>&_opennonce=<?php echo esc_html( wp_create_nonce( 'mainwp-admin-nonce' ) ); ?>" title="Edit this post" target="_blank"><?php esc_html_e( 'Edit', 'mainwp' ); ?></a> | |
| 566 | + <a class="<?php echo $is_demo ? 'disabled' : ''; ?> item" href="<?php MainWP_Site_Open::get_open_site_admin_link( $recent_pages_future[ $i ]['website']->id, true ); ?>&location=<?php echo esc_html( base64_encode( 'post.php?action=editpost&post=' . $recent_pages_future[ $i ]['id'] . '&action=edit' ) ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions -- base64_encode used for http encoding compatible. ?>" title="Edit this post" target="_blank"><?php esc_html_e( 'Edit', 'mainwp' ); ?></a> | |
| 554 | 567 | <a class="<?php echo $is_demo ? 'disabled' : ''; ?> item mainwp-post-trash" href="#"><?php esc_html_e( 'Trash', 'mainwp' ); ?></a> |
| 555 | - <a class="<?php echo $is_demo ? 'disabled' : ''; ?> item" href="admin.php?page=SiteOpen&newWindow=yes&websiteid=<?php echo esc_attr( $recent_pages_future[ $i ]['website']->id ); ?>&newWindow=yes&openUrl=yes&location=<?php echo esc_html( base64_encode( '?p=' . $recent_pages_future[ $i ]['id'] . '&preview=true' ) ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions -- base64_encode used for http encoding compatible. ?>&_opennonce=<?php echo esc_html( wp_create_nonce( 'mainwp-admin-nonce' ) ); ?>" target="_blank" title="Preview '< ? php echo esc_attr( $recent_pages_future[ $i ]['title'] ); ?>'" rel="permalink"><?php esc_html_e( 'Preview', 'mainwp' ); ?></a> | |
| 568 | + <a class="<?php echo $is_demo ? 'disabled' : ''; ?> item" href="<?php MainWP_Site_Open::get_open_site_admin_link( $recent_pages_future[ $i ]['website']->id, true ); ?>&openUrl=yes&location=<?php echo esc_html( base64_encode( '?p=' . $recent_pages_future[ $i ]['id'] . '&preview=true' ) ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions -- base64_encode used for http encoding compatible. ?>" target="_blank" title="Preview '<?php echo esc_attr( $recent_pages_future[ $i ]['title'] ); ?>'" rel="permalink"><?php esc_html_e( 'Preview', 'mainwp' ); ?></a> | |
| 556 | 569 | <a class="<?php echo $is_demo ? 'disabled' : ''; ?> item mainwp-post-viewall" href="admin.php?page=PostBulkManage"><?php esc_html_e( 'View all', 'mainwp' ); ?></a> |
| 557 | 570 | </div> |
| 558 | 571 | </div> |
| 559 | 572 | </div> |
| @@ -609,12 +622,12 @@ | ||
| 609 | 622 | * @since 4.1 |
| 610 | 623 | */ |
| 611 | 624 | do_action( 'mainwp_recent_pages_before_trash_list', $allPages, $recent_number ); |
| 612 | 625 | if ( empty( $recent_pages_trash ) ) { |
| 613 | - MainWP_UI::render_empty_element_placeholder(); | |
| 626 | + MainWP_UI::render_empty_element_placeholder( __( 'No Recent Pages', 'mainwp' ), __( 'Recent post changes will appear here once activity is detected.', 'mainwp' ), '<em data-emoji=":page_facing_up:" class="medium"></em>' ); | |
| 614 | 627 | } |
| 615 | 628 | ?> |
| 616 | - <div class="ui middle aligned divided selection list"> | |
| 629 | + <div class="ui middle aligned divided list"> | |
| 617 | 630 | <?php |
| 618 | 631 | $_count = count( $recent_pages_trash ); |
| 619 | 632 | for ( $i = 0; $i < $_count && $i < $recent_number; $i++ ) { |
| 620 | 633 | if ( ! isset( $recent_pages_trash[ $i ]['title'] ) || empty( $recent_pages_trash[ $i ]['title'] ) ) { |
| @@ -625,9 +638,9 @@ | ||
| 625 | 638 | } |
| 626 | 639 | $name = wp_strip_all_tags( $recent_pages_trash[ $i ]['website']->name ); |
| 627 | 640 | ?> |
| 628 | 641 | <div class="item"> |
| 629 | - <div class="ui stackable grid"> | |
| 642 | + <div class="ui grid"> | |
| 630 | 643 | <input class="postId" type="hidden" name="id" value="<?php echo esc_attr( $recent_pages_trash[ $i ]['id'] ); ?>"/> |
| 631 | 644 | <input class="websiteId" type="hidden" name="id" value="<?php echo esc_attr( $recent_pages_trash[ $i ]['website']->id ); ?>"/> |
| 632 | 645 | <div class="fourteen wide column middle aligned"> |
| 633 | 646 | <div> |
| @@ -638,10 +651,10 @@ | ||
| 638 | 651 | </div> |
| 639 | 652 | <span class="ui small text"><?php echo esc_html( $recent_pages_trash[ $i ]['dts'] ); ?></span> |
| 640 | 653 | </div> |
| 641 | 654 | <div class="two wide column right aligned"> |
| 642 | - <div class="ui right pointing dropdown icon mini basic green button" style="z-index:999"> | |
| 643 | - <i class="ellipsis horizontal icon"></i> | |
| 655 | + <div class="ui right pointing dropdown" style="z-index:999"> | |
| 656 | + <i class="ellipsis vertical icon"></i> | |
| 644 | 657 | <div class="menu"> |
| 645 | 658 | <a href="#" class="<?php echo $is_demo ? 'disabled' : ''; ?> item mainwp-post-restore"><?php esc_html_e( 'Restore', 'mainwp' ); ?></a> |
| 646 | 659 | <a href="#" class="<?php echo $is_demo ? 'disabled' : ''; ?> item mainwp-post-delete"><?php esc_html_e( 'Delete permanently', 'mainwp' ); ?></a> |
| 647 | 660 | </div> |