• プラグイン一覧
    - WCEX Item Combo Set
    - WCEX Amazon Pay
    - WCEX Wishlist お気に入りリスト
  • リリース情報
  • お役立ちコラム
  • お問い合わせ
  • サポート
    • よくある質問
      • WCEX Amazon Pay
      • WCEX Wishlist お気に入りリスト
      • wcex-item-combo-set
    • リファレンス
      • WCEX Amazon Pay
      • WCEX Wishlist お気に入りリスト
      • wcex-item-combo-set
新規会員登録
ログイン
新規会員登録
ログイン
カート
  • プラグイン一覧
    • - WCEX Item Combo Set
    • - WCEX Amazon Pay
    • - WCEX Wishlist お気に入りリスト
  • リリース情報
  • お役立ちコラム
  • サポート
    • - よくある質問
      • - WCEX Amazon Pay
      • - WCEX Wishlist お気に入りリスト
      • - wcex-item-combo-set
    • - リファレンス
      • - WCEX Amazon Pay
      • - WCEX Wishlist お気に入りリスト
      • - wcex-item-combo-set
  • お問い合わせ
Aivec APPs > wcex-item-combo-set > 関数 > Item::load
レファレンス
バージョン
1.0.6
絞り込み:

目次

  • パラメータ
  • 戻り値
  • ソース
  • 関連アイテム
    • 使用するアイテム
    • 使用されるアイテム

フック

  • アクション
  • フィルター

ファンクション

    関数

    Item::load( int $post_id )

    Loads settings page assets

    パラメータ #パラメータ

    $post_id

    (数値) (必須)


    戻り値 #戻り値

    Top ↑

    (void)

    ソース #ソース

    Top ↑

    ファイル: src/Admin/Pages/Item/Item.php

        public function load($post_id) {
            // scripts
            wp_enqueue_script('jquery-ui-sortable');
            $assetsmap = include(WCEXICS_DIST_JS_DIR . '/Admin/Pages/Item/App.asset.php');
            wp_enqueue_script(
                self::SCRIPT_SLUG,
                WCEXICS_DIST_JS_URL . '/Admin/Pages/Item/App.js',
                array_merge($assetsmap['dependencies'], ['jquery-ui-sortable']),
                $assetsmap['version'],
                true
            );
            Snackbar::load([self::SCRIPT_SLUG]);
    
            // styles
            Loader::loadCoreCss();
            /**
             * It's unclear how you are supposed to load the admin theme for components that are used
             * outside of the block editor... so we just load the `wp-block-editor` styles so that the
             * admin theme is correctly applied to our components.
             *
             * IS THERE NO WAY TO DO THIS GUTENBERG???
             */
            wp_enqueue_style('wp-block-editor');
            wp_enqueue_style('wp-components');
            wp_enqueue_style(
                self::SCRIPT_SLUG,
                WCEXICS_PLUGIN_URL . '/src/Admin/Pages/Item/combo-set-app.css',
                [],
                WCEXICS_VERSION
            );
    
            // injections
            wp_set_script_translations(self::SCRIPT_SLUG, 'wcexics', WCEXICS_LANG_DIR);
            wp_localize_script(
                self::SCRIPT_SLUG,
                'wcexics',
                array_merge(
                    [
                        'multiSelectText' => __('Multi-select', 'usces'),
                        'requiredText' => __('Required', 'usces'),
                        'skuCodeText' => __('SKU code', 'usces'),
                        'skuDisplayNameText' => __('SKU display name ', 'usces'),
                        'currencySymbol' => __('dollars', 'usces'),
                        'welitems' => Utils::getAllPublishedWelcartItems(),
                        'combos' => API\ComboSet::getAllComboSetsForPostId($post_id),
                        'postId' => $post_id,
                        'domElements' => DomElementIdentifiers::getConstantsMap(),
                    ],
                    $this->master->getScriptInjectionVariables()
                )
            );
        }
    

    ソースを伸ばす ソースを縮める


    関連アイテム #関連アイテム

    Top ↑

    使用するアイテム #使用するアイテム

    使用するアイテム
    説明
    src/Utils.php: Utils::getAllPublishedWelcartItems() Returns data for all Welcart items that have a post type of ‘published’
    src/Components/Snackbar/Snackbar.php: Snackbar::load() Loads Snackbar component
    src/DomElementIdentifiers.php: DomElementIdentifiers::getConstantsMap() Returns key-value map of all constants defined in this class.
    src/API/ComboSet.php: ComboSet::getAllComboSetsForPostId() Returns a key-value list of all combo-sets associated with a post ID where key is the SKU meta ID and value is an instance of \Aivec\Welcart\Extensions\ItemComboSet\Types\ComboSet

    使用されるアイテム #使用されるアイテム

    Top ↑

    使用されるアイテム説明
    src/Admin/Pages/Item/Item.php: Item::delegateAssetsLoad() Delegates to load method

    • 新規会員登録
    • ログイン
      • プラグイン一覧
      • 会社概要
      • リリース情報
      • よくある質問
      • お役立ちコラム
      • お問い合わせ
      • 個人情報保護方針
      • 特定商取引法に基づく表記
      • 情報セキュリティ基本方針
      • 利用規約

    アイベック合同会社は「Welcart」「Amazon Pay」の公式パートナーです。

    ※Amazon、Amazon.co.jp、Amazon Payおよびそれらのロゴは、Amazon.com,inc.またはその関連会社の商標です。

    © 2025 Aivec llc All Rights Reserved.