_appthemes_addons_mp_init()

Initializes the add-ons marketplace module.


Package


Description Description

Optional Parameters:

- 'url'     (string)        (optional) The URL location of the module.
- 'product' (string|array)  (legacy) The default theme to which display add-ons. Use page 'defaults' parameter instead.
- 'mp'      (array)         (optional) Expects an assoc. array of marketplaces slugs.
                            Each 'mp' should contain an associative array of 'scbAdminPage' class parameters.
                            Besides the menu page params, it also contain a 'filters' param allowing to control
                            which filters/values are displayed for this marketplace page content:
    - '[menu-slug]' (array) The slug name for a marketplace page and menu
        - 'menu'    (array) The menu params see 'scbAdminPage' (https://github.com/scribu/wp-scb-framework/blob/54b521e37ed54244e19a58d497ac690efe7b578b/AdminPage.php#L5)
        - 'filters' (array) The marketplace filters visible to the user (shows all if omitted). The filters list can be different and depends on the remote marketplace filters list.
            - 'product' (string|array|bool) List of product IDs to display (shows all if omitted)
            - 'cat'     (string|array|bool) List of categories IDs to display (shows all if omitted)
            - 'author'  (string|array|bool) List of authors IDs to display (shows all if omitted)
            - 'ratng'   (string|array|bool) List of ratings IDs to display (shows all if omitted)
        - 'defaults' (array) The marketplace filters defaults.
            - 'product' (string|int) The default value for a filter. Default empty.
            - 'cat'     (string|int) The default value for a filter. Default empty.
            - 'author'  (string|int) The default value for a filter. Default empty.
            - 'ratng'   (string|int) The default value for a filter. Default empty.

    e.g (for a customized seller menu):
    ...
        'mp' => array(
            'my-addons-mp' => array(
                'menu' => array( // see 'scbAdminPage' class for all params
                    'parent' => 'my-plugin-menu-slug',
                ),
                // each omitted filter is always displayed unless set to 'False' to disable it
                'filters' => array(
                    'cat'     => false,             // set to false to disable the categories filter
                    'product' => array( 520, 476 ), // choose which theme(s) to display
                    'author'  => 12071,             // choose which author(s) addons to display
                    'rating'  => 4',                // choose rating to display addons
                ),
                'defaults' => array(
                    'product' => 520, // By default uses legacy first-level parameter 'product' (if set)
                ),
            ),
        ),
    ...

Premium WordPress Apps

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.