active; } /** * Check if the current page is a form embed page. * * @since 1.6.2 * * @param string $type Type of the embed page to check. Can be '', 'add' or 'edit'. By default is empty string. * * @return boolean */ public function is_form_embed_page( $type = '' ) { global $pagenow; $type = $type === 'add' || $type === 'edit' ? $type : ''; if ( $pagenow !== 'post.php' && $pagenow !== 'post-new.php' ) { return false; } // phpcs:disable WordPress.Security.NonceVerification.Recommended $post_id = empty( $_GET['post'] ) ? 0 : (int) $_GET['post']; $post_type = empty( $_GET['post_type'] ) ? '' : sanitize_key( $_GET['post_type'] ); $action = empty( $_GET['action'] ) ? 'add' : sanitize_key( $_GET['action'] ); // phpcs:enable if ( $pagenow === 'post-new.php' && ( empty( $post_type ) || $post_type !== 'page' ) ) { return false; } if ( $pagenow === 'post.php' && ( empty( $post_id ) || get_post_type( $post_id ) !== 'page' ) ) { return false; } $meta = $this->get_meta(); $embed_page = ! empty( $meta['embed_page'] ) ? (int) $meta['embed_page'] : 0; if ( 'add' === $action && 0 === $embed_page && $type !== 'edit' ) { return true; } if ( ! empty( $post_id ) && $embed_page === $post_id && $type !== 'add' ) { return true; } return false; } /** * Set user's embed meta data. * * @since 1.6.2 * * @param array $data Data array to set. */ public function set_meta( $data ) { update_user_meta( get_current_user_id(), 'wpforms_admin_form_embed_wizard', $data ); } /** * Get user's embed meta data. * * @since 1.6.2 * * @return array User's embed meta data. */ public function get_meta() { return get_user_meta( get_current_user_id(), 'wpforms_admin_form_embed_wizard', true ); } /** * Delete user's embed meta data. * * @since 1.6.2 */ public function delete_meta() { delete_user_meta( get_current_user_id(), 'wpforms_admin_form_embed_wizard' ); } /** * Get embed page URL via AJAX. * * @since 1.6.2 */ public function get_embed_page_url_ajax() { // Run a security check. check_admin_referer( 'wpforms_admin_form_embed_wizard_nonce' ); // Check for permissions. if ( ! wpforms_current_user_can( 'edit_forms' ) ) { wp_send_json_error( esc_html__( 'You are not allowed to perform this action.', 'wpforms-lite' ) ); } $page_id = ! empty( $_POST['pageId'] ) ? absint( $_POST['pageId'] ) : 0; $meta = $this->prepare_meta_data( $page_id ); $this->set_meta( $meta ); // Update challenge option to properly continue challenge on the embed page. $this->update_challenge_option( $meta ); wp_send_json_success( $meta['url'] ); } /** * Prepare meta data for the embed page. * * @since 1.9.4 * * @param int $page_id Page ID. * * @return array */ private function prepare_meta_data( int $page_id ): array { if ( ! empty( $page_id ) ) { $url = get_edit_post_link( $page_id, '' ); $meta = [ 'embed_page' => $page_id, ]; } else { $url = add_query_arg( 'post_type', 'page', admin_url( 'post-new.php' ) ); $meta = [ 'embed_page' => 0, 'embed_page_title' => ! empty( $_POST['pageTitle'] ) ? sanitize_text_field( wp_unslash( $_POST['pageTitle'] ) ) : '', // phpcs:ignore WordPress.Security.NonceVerification.Missing ]; } $meta['form_id'] = ! empty( $_POST['formId'] ) ? absint( $_POST['formId'] ) : 0; // phpcs:ignore WordPress.Security.NonceVerification.Missing $meta['url'] = $url; return $meta; } /** * Update challenge option to properly continue challenge on the embed page. * * @since 1.9.4 * * @param array $meta Meta data. */ private function update_challenge_option( array $meta ): void { if ( $this->is_challenge_active() ) { $challenge = wpforms()->obj( 'challenge' ); if ( $challenge && method_exists( $challenge, 'set_challenge_option' ) ) { $challenge->set_challenge_option( [ 'embed_page' => $meta['embed_page'] ] ); } } } /** * Set default title for the new page. * * @since 1.6.2 * * @param string $post_title Default post title. * @param \WP_Post $post Post object. * * @return string New default post title. */ public function embed_page_title( $post_title, $post ) { $meta = $this->get_meta(); $this->delete_meta(); return empty( $meta['embed_page_title'] ) ? $post_title : $meta['embed_page_title']; } /** * Embed the form to the new page. * * @since 1.6.2 * * @param string $post_content Default post content. * @param \WP_Post $post Post object. * * @return string Embedding string (shortcode or GB component code). */ public function embed_page_content( $post_content, $post ) { $meta = $this->get_meta(); $form_id = ! empty( $meta['form_id'] ) ? $meta['form_id'] : 0; $page_id = ! empty( $meta['embed_page'] ) ? $meta['embed_page'] : 0; if ( ! empty( $page_id ) || empty( $form_id ) ) { return $post_content; } if ( wpforms_is_gutenberg_active() ) { $pattern = ''; } else { $pattern = '[wpforms id="%d" title="false" description="false"]'; } return sprintf( $pattern, absint( $form_id ) ); } /** * Generate select with pages which are available to edit for current user. * * @since 1.6.6 * @since 1.7.9 Refactor to use ChoicesJS instead of `wp_dropdown_pages()`. * * @return string */ private function get_select_dropdown_pages_html() { $dropdown_pages = wpforms_search_posts( '', [ 'count' => self::MAX_SEARCH_RESULTS_DROPDOWN_PAGES_COUNT, 'post_status' => self::POST_STATUSES_OF_DROPDOWN_PAGES, ] ); if ( empty( $dropdown_pages ) ) { return ''; } $total_pages = 0; $wp_count_pages = (array) wp_count_posts( 'page' ); foreach ( $wp_count_pages as $page_status => $pages_count ) { if ( in_array( $page_status, self::POST_STATUSES_OF_DROPDOWN_PAGES, true ) ) { $total_pages += $pages_count; } } // Include so we can use `\wpforms_settings_select_callback()`. require_once WPFORMS_PLUGIN_DIR . 'includes/admin/settings-api.php'; return wpforms_settings_select_callback( [ 'id' => 'form-embed-wizard-choicesjs-select-pages', 'type' => 'select', 'choicesjs' => true, 'options' => wp_list_pluck( $dropdown_pages, 'post_title', 'ID' ), 'data' => [ 'use_ajax' => $total_pages > self::MAX_SEARCH_RESULTS_DROPDOWN_PAGES_COUNT, ], ] ); } /** * Get search result pages for ChoicesJS via AJAX. * * @since 1.7.9 */ public function get_search_result_pages_ajax() { // Run a security check. if ( ! check_ajax_referer( 'wpforms_admin_form_embed_wizard_nonce', false, false ) ) { wp_send_json_error( [ 'msg' => esc_html__( 'Your session expired. Please reload the builder.', 'wpforms-lite' ), ] ); } // Check for permissions. if ( ! wpforms_current_user_can( 'edit_forms' ) ) { wp_send_json_error( esc_html__( 'You are not allowed to perform this action.', 'wpforms-lite' ) ); } if ( ! array_key_exists( 'search', $_GET ) ) { wp_send_json_error( [ 'msg' => esc_html__( 'Incorrect usage of this operation.', 'wpforms-lite' ), ] ); } $result_pages = wpforms_search_pages_for_dropdown( sanitize_text_field( wp_unslash( $_GET['search'] ) ), [ 'count' => self::MAX_SEARCH_RESULTS_DROPDOWN_PAGES_COUNT, 'post_status' => self::POST_STATUSES_OF_DROPDOWN_PAGES, ] ); if ( empty( $result_pages ) ) { wp_send_json_error( [] ); } wp_send_json_success( $result_pages ); } } Black Multipurpose Detachable Dion Sling Bag - RI2K LONDON

Black Multipurpose Detachable Dion Sling Bag

RI2K trending Black clutch sling bag with detachable multipurpose credit card holder. Its compact and elegant design is truly a show stopper. Indulge in the art of luxury for the moment that matters. Comes with advanced RFID protection.

9,999.00

Availability: 5 in stock

Weight 150 g
Dimensions 20 × 1 × 13 cm
Closure Type

Brand Colour

No of Compartments

Pattern

Solid

CREDIT CARD SLOTS

8

Warrenty

6 months manufacturers warranty

Material Type

Genuine Leather

SKU

Ri2k_6027_Black

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

Shopping Basket
Black Multipurpose Detachable Dion Sling BagBlack Multipurpose Detachable Dion Sling Bag
9,999.00

Availability: 5 in stock

Scroll to Top