PATH:
home
/
lab2454c
/
caimegroup.com
/
wp-content
/
plugins
/
user-registration
/
includes
/
admin
<?php /** * User Registration Table List * * @version 1.2.0 * @package UserRegistration\Admin\Registration */ defined( 'ABSPATH' ) || exit; if ( ! class_exists( 'UR_List_Table' ) ) { include_once dirname( UR_PLUGIN_FILE ) . '/includes/abstracts/abstract-ur-list-table.php'; } /** * Registrations table list class. */ class UR_Admin_Registrations_Table_List extends UR_List_Table { /** * Initialize the registration table list. */ public function __construct() { $this->post_type = 'user_registration'; $this->page = 'user-registration'; $this->per_page_option = 'user_registration_per_page'; parent::__construct( array( 'singular' => 'registration', 'plural' => 'registrations', 'ajax' => false, ) ); } /** * No items found text. */ public function no_items() { esc_html_e( 'No user registration found.', 'user-registration' ); } /** * Get list columns. * * @return array */ public function get_columns() { return array( 'cb' => '<input type="checkbox" />', 'title' => esc_html__( 'Title', 'user-registration' ), 'shortcode' => esc_html__( 'Shortcode', 'user-registration' ), 'author' => esc_html__( 'Author', 'user-registration' ), 'date' => esc_html__( 'Date', 'user-registration' ), ); } /** * Post Edit Link. * * @param object $row Post. * * @return string */ public function get_edit_links( $row ) { return admin_url( 'admin.php?page=add-new-registration&edit-registration=' . $row->ID ); } /** * Post Duplicate Link. * * @param mixed $post_id Post ID. * * @return string */ public function get_duplicate_link( $post_id ) { return admin_url( 'admin.php?page=add-new-registration&edit-registration=' . $post_id ); } /** * Column: Actions. * * @param object $row Post. * * @return string */ public function get_row_actions( $row ) { $edit_link = $this->get_edit_links( $row ); $post_status = $row->post_status; $post_type_object = get_post_type_object( $row->post_type ); $current_status_trash = ( 'trash' === $post_status ); // Get actions. $actions = array( // Translators: %d is a placeholder for the Post ID. 'id' => sprintf( esc_html__( 'ID: %d', 'user-registration' ), $row->ID ), ); if ( current_user_can( $post_type_object->cap->edit_post, $row->ID ) && ! $current_status_trash ) { $actions['edit'] = '<a href="' . esc_url( $edit_link ) . '">' . __( 'Edit', 'user-registration' ) . '</a>'; } if ( current_user_can( $post_type_object->cap->delete_post, $row->ID ) ) { if ( $current_status_trash ) { $actions['untrash'] = '<a aria-label="' . esc_attr__( 'Restore this item from the Trash', 'user-registration' ) . '" href="' . wp_nonce_url( admin_url( sprintf( $post_type_object->_edit_link . '&action=untrash', $row->ID ) ), 'untrash-post_' . $row->ID ) . '">' . esc_html__( 'Restore', 'user-registration' ) . '</a>'; } elseif ( EMPTY_TRASH_DAYS ) { $actions['trash'] = '<a class="submitdelete" aria-label="' . esc_attr__( 'Move this item to the Trash', 'user-registration' ) . '" href="' . get_delete_post_link( $row->ID ) . '">' . esc_html__( 'Trash', 'user-registration' ) . '</a>'; } if ( $current_status_trash || ! EMPTY_TRASH_DAYS ) { $actions['delete'] = '<a class="submitdelete" aria-label="' . esc_attr__( 'Delete this item permanently', 'user-registration' ) . '" href="' . get_delete_post_link( $row->ID, '', true ) . '">' . esc_html__( 'Delete permanently', 'user-registration' ) . '</a>'; } } $duplicate_nonce = wp_create_nonce( 'ur_duplicate_post_' . $row->ID ); if ( current_user_can( $post_type_object->cap->edit_post, $row->ID ) ) { $preview_link = add_query_arg( array( 'ur_preview' => 'true', 'form_id' => absint( $row->ID ), ), home_url() ); $duplicate_link = admin_url( 'admin.php?page=user-registration&action=duplicate&nonce=' . $duplicate_nonce . '&post-id=' . $row->ID ); if ( 'trash' !== $post_status ) { $actions['view'] = '<a href="' . esc_url( $preview_link ) . '" rel="bookmark" target="_blank">' . esc_html__( 'Preview', 'user-registration' ) . '</a>'; } if ( 'publish' === $post_status ) { $actions['duplicate'] = '<a href="' . esc_url( $duplicate_link ) . '">' . esc_html__( 'Duplicate', 'user-registration' ) . '</a>'; } if ( 'publish' === $post_status ) { $actions['locate'] = '<a href="#" class="ur-form-locate" data-id= "' . esc_attr( $row->ID ) . '">' . esc_html__( 'Locate', 'user-registration' ) . '</a>'; } } return $actions; } /** * Return shortcode column. * * @param object $registration Registration forms datas. * * @return void */ public function column_shortcode( $registration ) { $shortcode = '[user_registration_form id="' . $registration->ID . '"]'; echo sprintf( '<input type="text" onfocus="this.select();" readonly="readonly" value=\'%s\' class="widefat code"></span>', esc_attr( $shortcode ) ); ?> <button id="copy-shortcode-<?php echo esc_attr( $registration->ID ); ?>" class="button ur-copy-shortcode " href="#" data-tip="<?php esc_attr_e( 'Copy Shortcode ! ', 'user-registration' ); ?>" data-copied="<?php esc_attr_e( 'Copied ! ', 'user-registration' ); ?>"> <span class="dashicons dashicons-admin-page"></span> </button> <?php } /** * Render the list table page, including header, notices, status filters and table. */ public function display_page() { $this->prepare_items(); ?> <div class="wrap"> <h1 class="wp-heading-inline"><?php esc_html_e( 'User Registration', 'user-registration' ); ?></h1> <a href="<?php echo esc_url( admin_url( 'admin.php?page=add-new-registration' ) ); ?>" class="page-title-action"><?php esc_html_e( 'Add New', 'user-registration' ); ?></a> <div class="user-registration-settings-container"> <div class="user-registration-options-header"> <div class="user-registration-options-header--bottom" > <div class="ur-scroll-ui"> <div class="ur-scroll-ui__scroll-nav"> <ul class="subsubsub ur-scroll-ui__items"> <li><a href="<?php echo esc_url( admin_url( 'admin.php?page=user-registration' ) ); ?>" class="current ur-scroll-ui__item">Registration Forms</a></li> <li><a href="<?php echo esc_url( admin_url( 'admin.php?page=user-registration&tab=login-forms' ) ); ?>" class=" ur-scroll-ui__item">Login Forms</a></li> </ul> </div> <div class="ur-scroll-ui__scroll-nav ur-scroll-ui__scroll-nav--forward is-disabled"> <i class="ur-scroll-ui__scroll-nav__icon dashicons dashicons-arrow-right-alt2"></i> </div> </div> </div> </div> </div> <hr class="wp-header-end"> <form id="registration-list" method="get"> <input type="hidden" name="page" value="user-registration" /> <?php $this->views(); $this->search_box( esc_html__( 'Search Registration', 'user-registration' ), 'registration' ); $this->display(); wp_nonce_field( 'save', 'user_registration_nonce' ); ?> </form> </div> <?php } }
[-] functions-ur-admin.php
[edit]
[-] class-ur-admin-form-templates.php
[edit]
[-] class-ur-admin-user-list-manager.php
[edit]
[-] class-ur-admin-form-modal.php
[edit]
[-] class-ur-admin-notices.php
[edit]
[+]
..
[-] class-ur-admin-addons.php
[edit]
[-] class-ur-admin-deactivation-feedback.php
[edit]
[-] class-ur-admin-status.php
[edit]
[-] class-ur-admin-assets.php
[edit]
[-] class-ur-admin-welcome.php
[edit]
[-] class-ur-config.php
[edit]
[-] class-ur-admin.php
[edit]
[-] class-ur-admin-user-manager.php
[edit]
[-] class-ur-admin-settings.php
[edit]
[-] class-ur-admin-import-export-forms.php
[edit]
[-] class-ur-admin-export-users.php
[edit]
[+]
settings
[+]
updater
[+]
views
[-] class-ur-admin-dashboard.php
[edit]
[-] class-ur-admin-profile.php
[edit]
[-] class-ur-admin-menus.php
[edit]
[-] class-ur-admin-registrations-table-list.php
[edit]