تابع ووکامرسی wc_get_screen_ids دریافت آیدی نوع صفحه مثل edit-profile

تابع ووکامرسی wc_get_screen_ids – دریافت آیدی نوع صفحه مثل edit-profile , product , profile
Syntax – سینتکس
(array) wc_get_screen_ids();
Usage – نحوه استفاده
if ( !function_exists( 'wc_get_screen_ids' ) ) {
require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/admin/wc-admin-functions.php';
}
// NOTICE! Understand what this does before running.
$result = wc_get_screen_ids();
Defined – محل تعریف
/includes/admin/wc-admin-functions.php
function wc_get_screen_ids() {
$wc_screen_id = sanitize_title( __( 'WooCommerce', woocommerce ) );
$screen_ids = array(
'toplevel_page_' . $wc_screen_id,
$wc_screen_id . '_page_wc-reports',
$wc_screen_id . '_page_wc-shipping',
$wc_screen_id . '_page_wc-settings',
$wc_screen_id . '_page_wc-status',
$wc_screen_id . '_page_wc-addons',
'toplevel_page_wc-reports',
'product_page_product_attributes',
'edit-product',
'product',
'edit-shop_coupon',
'shop_coupon',
'edit-product_cat',
'edit-product_tag',
'profile',
'user-edit',
);
foreach ( wc_get_order_types() as $type ) {
$screen_ids[] = $type;
$screen_ids[] = 'edit-' . $type;
}
return apply_filters( 'woocommerce_screen_ids', $screen_ids );
}
versions – نسخه ها
از نسخه : 3.0.2
نسخه فعلی : 3.0.6
دیگر نسخه ها : 3.0.6 , 3.0.5 , 3.0.4 , 3.0.3 , 3.0.2
ارسال نظر