### Install Multisite Ultimate using Git and Composer Source: https://github.com/superdav42/wp-multisite-waas/blob/main/README.md This snippet provides the command-line steps for developers to install the Multisite Ultimate plugin using Git to clone the repository and Composer to install its dependencies. This method requires SSH access to the server and familiarity with command-line tools. ```bash cd wp-content/plugins/ git clone https://github.com/superdav42/wp-multisite-waas.git cd wp-multisite-waas composer install ``` -------------------------------- ### Developer Installation: Install PHP Dependencies Source: https://github.com/superdav42/wp-multisite-waas/blob/main/readme.txt Command to install all required PHP dependencies using Composer after cloning the plugin repository. This step is crucial for ensuring the plugin functions correctly in a developer setup. ```Shell composer install ``` -------------------------------- ### Configure WordPress Multisite Network Settings in wp-config.php Source: https://github.com/superdav42/wp-multisite-waas/wiki/how-do-i-install-wordpress-multisite These PHP constants define the core settings for a WordPress Multisite network, including whether it uses subdomains or subdirectories, the current site's domain, path, and IDs. These lines are typically generated by WordPress during the network setup process and must be added to `wp-config.php`. ```PHP define('MULTISITE', true); define('SUBDOMAIN_INSTALL', true); define('DOMAIN_CURRENT_SITE', 'multisite.local'); define('PATH_CURRENT_SITE', '/'); define('SITE_ID_CURRENT_SITE', 1); define('BLOG_ID_CURRENT_SITE', 1); ``` -------------------------------- ### Set Up Development Environment Dependencies Source: https://github.com/superdav42/wp-multisite-waas/blob/main/readme.txt Commands to install the necessary Node.js and PHP dependencies for local development of the Multisite Ultimate plugin. This ensures all required packages are available for building and running the plugin. ```Shell npm install composer install ``` -------------------------------- ### Developer Installation: Clone Repository Source: https://github.com/superdav42/wp-multisite-waas/blob/main/readme.txt Commands for developers to clone the Multisite Ultimate plugin repository directly into the WordPress plugins directory. This is the first step for setting up a development environment using Git. ```Shell cd wp-content/plugins/ git clone https://github.com/superdav42/wp-multisite-waas.git cd wp-multisite-waas ``` -------------------------------- ### Install PHP Dependencies with Composer Source: https://github.com/superdav42/wp-multisite-waas/blob/main/readme.txt This command installs the necessary PHP dependencies for the plugin using Composer. It is an alternative to using the pre-packaged release from the GitHub Releases page, ensuring all required libraries are present in the plugin directory. ```bash composer install ``` -------------------------------- ### Enable WordPress Multisite Feature in wp-config.php Source: https://github.com/superdav42/wp-multisite-waas/wiki/how-do-i-install-wordpress-multisite This PHP constant enables the WordPress Multisite feature. It must be added to the `wp-config.php` file before the 'That’s all, stop editing! Happy blogging.' line to activate the network setup options in the WordPress admin area. ```PHP define('WP_ALLOW_MULTISITE', true); ``` -------------------------------- ### Set WordPress Language via URL Parameter Source: https://github.com/superdav42/wp-multisite-waas/wiki/activating-wp-ultimo-language-selector This example demonstrates how to bypass the language selector and directly set the language for WordPress signup or login pages by appending a 'locale' query parameter to the URL. The specified language must be installed on the WordPress network for this to function correctly. ```URL https://yournetwork.com/wp-signup.php?locale=it_IT ``` -------------------------------- ### Convert HTML Documentation to Markdown Source: https://github.com/superdav42/wp-multisite-waas/wiki/README This section provides instructions and commands for converting existing HTML documentation files into Markdown format. It involves installing required Python libraries and then executing a Python script to perform the conversion. ```bash pip install beautifulsoup4 html2text ``` ```bash python convert_simple.py ``` -------------------------------- ### Configure Apache .htaccess Rules for WordPress Multisite Source: https://github.com/superdav42/wp-multisite-waas/wiki/how-do-i-install-wordpress-multisite These Apache rewrite rules are essential for WordPress Multisite to function correctly, handling URL routing for subdomains or subdirectories. They ensure that requests are properly directed to the WordPress index file while allowing access to existing files and directories, and should be added to the `.htaccess` file. ```ApacheConf RewriteEngine On RewriteBase / RewriteRule ^index.php$ - [L] # add a trailing slash to /wp-admin RewriteRule ^wp-admin$ wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule ^(wp-(content|admin|includes).*) $1 [L] RewriteRule ^(.*\.php)$ $1 [L] RewriteRule . index.php [L] ``` -------------------------------- ### Define Optional cPanel Connection Settings in PHP Source: https://github.com/superdav42/wp-multisite-waas/wiki/cPanel-Integration This PHP code snippet allows for optional configuration of the cPanel integration. `WU_CPANEL_PORT` specifies the port for cPanel communication, defaulting to 2083, while `WU_CPANEL_ROOT_DIR` defines the document root for domain mapping, typically `/public_html`. These constants can be adjusted in `wp-config.php` if your cPanel setup deviates from the defaults. ```php define('WU_CPANEL_PORT', 2083); // Default is 2083 define('WU_CPANEL_ROOT_DIR', '/public_html'); // Default is /public_html ``` -------------------------------- ### WP Multisite WAAS: Pre-select Site Template URL Parameter Source: https://github.com/superdav42/wp-multisite-waas/wiki/customizing-your-registration-form This API documentation describes the URL parameter used to pre-select a specific site template on a WP Multisite WAAS registration or checkout form. It details the parameter's structure, how to obtain the required ID, and provides usage examples for different scenarios. ```APIDOC URL Parameter: ?template_id=X Description: Used to pre-select a specific site template on the registration or checkout form. Parameters: template_id (integer): The unique ID number of the site template to be pre-selected. - How to obtain the ID: Go to 'Multisite Ultimate > Sites', click 'Manage' next to the desired site template, and note the 'SITE ID' number displayed. Usage Examples: 1. Pre-selecting a template on a basic registration page: www.mynetwork.com/register/?template_id=2 2. Pre-selecting a template on a registration page for a specific product/plan: www.mynetwork.com/register/premium-plan/?template_id=2 ``` -------------------------------- ### Fix CORS Issues for Font Icons on Mapped Domains Source: https://github.com/superdav42/wp-multisite-waas/wiki/code-snippets-for-v2 This snippet provides server configuration examples for Apache and NGINX to resolve Cross-Origin Resource Sharing (CORS) issues that prevent custom fonts and icons from loading correctly on WordPress sub-sites with mapped domains. The issue arises because font files are often loaded directly via CSS, bypassing domain mapping rewrites. These configurations add the necessary `Access-Control-Allow-Origin` header. ```APACHE Header set Access-Control-Allow-Origin "*" ``` ```NGINX location ~ .(ttf|ttc|otf|eot|woff|font.css|css)$ { add_header Access-Control-Allow-Origin "*"; } ``` -------------------------------- ### Tagging a New Release Version with Git Source: https://github.com/superdav42/wp-multisite-waas/blob/main/README.md This snippet demonstrates the Git commands required to tag a new version for the Multisite Ultimate plugin. Following semantic versioning, the tag must begin with 'v' and triggers an automated GitHub Actions workflow to build, package, and release the plugin. ```bash git tag v2.3.5 # For example, for version 2.3.5 git push origin v2.3.5 ``` -------------------------------- ### Run Development Build Process Source: https://github.com/superdav42/wp-multisite-waas/blob/main/readme.txt Command to execute the build process during development. This step generates translation POT files, minifies CSS and JavaScript assets, and optimizes other assets before committing changes. ```Shell npm run build ``` -------------------------------- ### Applying Discount Code via URL Parameter Source: https://github.com/superdav42/wp-multisite-waas/wiki/creating-discount-codes-v2 This API documentation describes how to use the 'discount_code' URL parameter to automatically apply a coupon code to a product registration or checkout page. The parameter should be appended to the shareable link of the desired plan. ```APIDOC URL Parameter: discount_code Description: The coupon code to be automatically applied to the checkout form. Type: String Format: ?discount_code=XXX (where XXX is the coupon code) Example Usage: Shareable Link: mynetworkdomain.com/register/premium/ Coupon Code: 50OFF Resulting URL: mynetworkdomain.com/register/premium/?discount_code=50OFF ``` -------------------------------- ### Multisite Ultimate Register API Endpoint (POST) Source: https://github.com/superdav42/wp-multisite-waas/wiki/the-wp-ultimo-register-api-endpoint Documents the Multisite Ultimate /register API endpoint, which facilitates the complete customer onboarding process by creating a user, customer, site, and membership. It details the required POST body parameters and their expected types and values, along with the endpoint's URL and return value. ```APIDOC Endpoint: /wp-json/wu/v2/register Method: POST URL: https://yoursite.com/wp-json/wu/v2/register Description: Creates a new WordPress user, Multisite Ultimate customer, WordPress network site, and Multisite Ultimate membership in a single call. Authentication: Requires API credentials obtained from Multisite Ultimate > Settings > API & Webhooks. Request Body Parameters: customer_id: integer (Optional) - If provided, identifies an existing customer. If not, a new customer and WordPress user will be created using the 'customer' object. customer: object (Required if customer_id is not provided) user_id: integer (Optional) - If provided, identifies an existing WordPress user. If not, a new user will be created. username: string (Required if creating new user) password: string (Required if creating new user) email: string (Required if creating new user) membership: object (Required) status: string (Required) - Current status of the membership. Allowed values: "pending", "active", "trialing", "expired", "on-hold", "canceled" products: array of integer (Required) Description: An array containing one or more product IDs from your network. This endpoint does not create products. Example: [1, 2] payment: object (Required) status: string (Required) - Current status of the payment. Allowed values: "pending", "completed", "refunded", "partially-refunded", "partially-paid", "failed", "canceled" site: object (Required) site_url: string (Required) - The URL for the new site. site_title: string (Required) - The title for the new site. Return Value: An array containing information about the newly created membership. ``` -------------------------------- ### Configure ServerPilot API Credentials in wp-config.php Source: https://github.com/superdav42/wp-multisite-waas/wiki/ServerPilot-Integration This PHP snippet defines the necessary constants in your WordPress wp-config.php file to enable the ServerPilot integration. These constants provide the Client ID, API Key, and App ID required for Multisite Ultimate to authenticate and interact with your ServerPilot account and specific application. ```php define('WU_SERVER_PILOT_CLIENT_ID', 'your_client_id'); define('WU_SERVER_PILOT_API_KEY', 'your_api_key'); define('WU_SERVER_PILOT_APP_ID', 'your_app_id'); ``` -------------------------------- ### Define SUNRISE Constant for Domain Mapping Source: https://github.com/superdav42/wp-multisite-waas/wiki/how-to-configure-domain-mapping-v1 To enable custom domain mapping functionality in Multisite Ultimate, the `SUNRISE` constant must be defined as true in the `wp-config.php` file. This works in conjunction with the `sunrise.php` file, which needs to be copied from the `wp-ultimo` directory to `wp-content`. ```PHP define('SUNRISE', true); ``` -------------------------------- ### Define Closte Client API Key in wp-config.php Source: https://github.com/superdav42/wp-multisite-waas/wiki/Closte-Integration This PHP constant is required in your `wp-config.php` file to enable the Closte integration. It holds the unique API key for authenticating your WordPress instance with the Closte platform, allowing for automated domain and SSL management. ```php define('CLOSTE_CLIENT_API_KEY', 'your_api_key'); ``` -------------------------------- ### Define RunCloud API and Application Constants in PHP Source: https://github.com/superdav42/wp-multisite-waas/wiki/Runcloud-Integration This PHP code block defines essential constants required for the Multisite Ultimate RunCloud integration. These constants, including API key, API secret, server ID, and application ID, must be placed in the `wp-config.php` file to enable communication with the RunCloud API and identify the target server and web application. ```php define('WU_RUNCLOUD_API_KEY', 'your_api_key'); define('WU_RUNCLOUD_API_SECRET', 'your_api_secret'); define('WU_RUNCLOUD_SERVER_ID', 'your_server_id'); define('WU_RUNCLOUD_APP_ID', 'your_app_id'); ``` -------------------------------- ### Define Required cPanel API Credentials in PHP Source: https://github.com/superdav42/wp-multisite-waas/wiki/cPanel-Integration This PHP code snippet defines the essential constants for connecting Multisite Ultimate to your cPanel account. These constants, `WU_CPANEL_USERNAME`, `WU_CPANEL_PASSWORD`, and `WU_CPANEL_HOST`, must be placed in your `wp-config.php` file to enable the integration. They provide the necessary authentication details for API communication. ```php define('WU_CPANEL_USERNAME', 'your_cpanel_username'); define('WU_CPANEL_PASSWORD', 'your_cpanel_password'); define('WU_CPANEL_HOST', 'your_cpanel_host'); ``` -------------------------------- ### WP Ultimo API: Payment Creation Function and Mercator Hooks Source: https://github.com/superdav42/wp-multisite-waas/blob/main/readme.txt This entry documents the `wu_create_payment` function, which now includes an option to skip validation, primarily for migrator functionality. It also re-introduces deprecated Mercator hooks for backwards compatibility, related to mapping lifecycle events. ```APIDOC Function: wu_create_payment(array $args) - Description: Creates a payment entry within WP Ultimo. - Parameters: - $args (array): An array of arguments for payment creation. - skip_validation (boolean, optional): If true, skips validation during the payment creation process. Required for migrator operations. Deprecated Mercator Hooks (Re-added for Backwards Compatibility): - mercator.mapping.created - Description: Triggered when a new Mercator mapping is created. - mercator.mapping.updated - Description: Triggered when an existing Mercator mapping is updated. - mercator.mapping.deleted - Description: Triggered when a Mercator mapping is deleted. ``` -------------------------------- ### Define GridPane Integration Constants in wp-config.php Source: https://github.com/superdav42/wp-multisite-waas/wiki/GridPane-Integration These PHP constants are essential for enabling and configuring the GridPane integration within your WordPress `wp-config.php` file. They include a master switch to activate the integration, your GridPane API key for authentication, and specific server and application (site) IDs to target the correct GridPane resources. ```php define('WU_GRIDPANE', true); define('WU_GRIDPANE_API_KEY', 'your_api_key'); define('WU_GRIDPANE_SERVER_ID', 'your_server_id'); define('WU_GRIDPANE_APP_ID', 'your_site_id'); ``` -------------------------------- ### Multisite Ultimate Network Registration Endpoint Parameters Source: https://github.com/superdav42/wp-multisite-waas/wiki/the-wp-ultimo-register-api-endpoint This section details the complete set of parameters for the Multisite Ultimate network's membership registration endpoint. It defines the structure of the JSON payload, including fields for customer information, membership status and dates, product IDs, payment details, and site configuration. Data types and allowed string values for status fields are specified. ```APIDOC "customer_id" : integer, "customer" : { "user_id" : integer, "username" : "string", "password" : "string", "email" : "string" }, "membership" : { "status" : "string", // one of "pending", "active", "trialing", "expired", "on-hold", "cancelled" "date_expiration" : "string", "date_trial_end" : "string", "date_activated" : "string", "date_renewed" : "string", "date_cancellation" : "string", "date_payment_plan_completed": "string" }, "products" : [1,2], "duration" : "string", "duration_unit" : "string", "discount_code" : "string", "auto_renew" : "boolean", "country" : "string", "currency" : "string", "payment" : { "status" : "string" // one of "pending", "completed", "refunded", "partially-refunded", "partially-paid", "failed", "cancelled" }, "payment_method" : { "gateway" : "string", "gateway_customer_id" : "string", "gateway_subscription_id" : "string", "gateway_payment_id" : "string" }, "site" : { "site_url" : "string", "site_title" : "string", "publish" : "boolean", "template_id" : "string" } ``` -------------------------------- ### Multisite Ultimate Search and Replace API Source: https://github.com/superdav42/wp-multisite-waas/wiki/why-wp-ultimo The Search and Replace API enables the automatic population of placeholders within site templates. This functionality allows for dynamic customization of new sites based on information provided by the customer immediately after sign-up, streamlining the site creation process. ```APIDOC Search and Replace API: Functionality: Auto-populate placeholders in site templates. Usage: - Annotate site templates with placeholders using double curly braces. - Example Placeholder: {{site_name}} Process: - Information provided by the customer during sign-up is used. - Placeholders are replaced automatically immediately after sign-up. Purpose: Automate the customization of new sites based on templates. ``` -------------------------------- ### Trigger Automated Plugin Release Source: https://github.com/superdav42/wp-multisite-waas/blob/main/readme.txt Commands to create and push a semantic versioning tag to the Git repository. This action triggers an automated release build via GitHub Actions, publishing a new version of the plugin. ```Shell git tag v2.3.5 git push origin v2.3.5 ``` -------------------------------- ### Define Cloudflare API Credentials in wp-config.php Source: https://github.com/superdav42/wp-multisite-waas/wiki/Cloudflare-Integration This PHP snippet defines the necessary constants for the Cloudflare integration within the WordPress `wp-config.php` file. These constants, `WU_CLOUDFLARE_API_KEY` and `WU_CLOUDFLARE_ZONE_ID`, are crucial for authenticating and identifying the Cloudflare zone the integration will manage. Ensure you replace the placeholder values with your actual API token and Zone ID obtained from your Cloudflare dashboard. ```php define('WU_CLOUDFLARE_API_KEY', 'your_api_key'); define('WU_CLOUDFLARE_ZONE_ID', 'your_zone_id'); ``` -------------------------------- ### Configure WP Engine API Key in PHP Source: https://github.com/superdav42/wp-multisite-waas/wiki/WP-Engine-Integration This PHP snippet demonstrates how to manually define the WP Engine API key within the `wp-config.php` file. It provides two constant options, `WPE_APIKEY` (preferred) or `WPE_API`, for cases where automatic detection of the WP Engine environment is not sufficient. ```php define('WPE_APIKEY', 'your_api_key'); // OR define('WPE_API', 'your_api_key'); ``` -------------------------------- ### Check Multisite Ultimate User Plan and Subscription Status Source: https://github.com/superdav42/wp-multisite-waas/wiki/code-snippets-for-v2 This entry documents and demonstrates the use of Multisite Ultimate's native functions (`wu_has_plan` and `wu_is_active_subscriber`) to programmatically verify a user's plan membership and active subscription status. These functions are crucial for implementing conditional features or access controls based on subscription tiers. The `wu_has_plan` function requires a valid 'Plan ID'. ```APIDOC wu_has_plan($user_id, $plan_id) - Checks if a user is subscribed to a specific plan. - Parameters: - $user_id: The ID of the user to check. - $plan_id: The ID of the plan to verify against. (Can be found in Multisite Ultimate > Products) - Returns: Boolean (true if user is on the plan, false otherwise). wu_is_active_subscriber($user_id) - Checks if a user has an active subscription. - Parameters: - $user_id: The ID of the user to check. - Returns: Boolean (true if user has an active subscription, false otherwise). ``` ```PHP $user_id = get_current_user_id(); $plan_id = 50; // Example Plan ID if (wu_has_plan($user_id, $plan_id) && wu_is_active_subscriber($user_id)) { // USER IS MEMBER OF PLAN AND HIS SUBSCRIPTION IS ACTIVE, DO STUFF } else { // USER IS NOT A MEMBER OF PLAN -- OR -- HIS SUBSCRIPTION IS NOT ACTIVE, DO OTHER STUFF } ``` -------------------------------- ### Define WordPress SUNRISE Constant in Closte Source: https://github.com/superdav42/wp-multisite-waas/wiki/setting-the-sunrise-constant-to-true-on-closte This PHP snippet defines the 'SUNRISE' constant as 'true'. It is specifically used within the Closte hosting platform's 'Additional wp-config.php content' field. This method allows WordPress Multisite Ultimate to enable features like domain mapping when direct editing of the wp-config.php file is restricted by the host. ```PHP define('SUNRISE', true); ``` -------------------------------- ### cPanel API2 Domain Management Operations Source: https://github.com/superdav42/wp-multisite-waas/wiki/cPanel-Integration This APIDOC entry describes the core cPanel API2 operations utilized by the Multisite Ultimate integration for managing domains. It outlines the functionality for adding and removing addon domains and subdomains, which are configured to point to the root directory. The integration relies on cPanel's API2 for these automated tasks. ```APIDOC cPanel API2 Calls for Domain Management: Addon Domain Creation: - Method: cPanel API2 (e.g., AddonDomain::addaddondomain) - Purpose: Automatically creates an addon domain in cPanel when a domain is mapped in Multisite Ultimate. - Parameters: - domain: The domain name to add (e.g., 'example.com') - dir: The document root directory (e.g., '/public_html') - Behavior: Configures the addon domain to point to the specified root directory. Addon Domain Removal: - Method: cPanel API2 (e.g., AddonDomain::deladdondomain) - Purpose: Removes an addon domain from cPanel when its mapping is deleted in Multisite Ultimate. - Parameters: - domain: The domain name to remove Subdomain Creation: - Method: cPanel API2 (e.g., SubDomain::addsubdomain) - Purpose: Automatically creates a subdomain in cPanel for subdomain multisite installations when a new site is created. - Parameters: - domain: The subdomain part (e.g., 'blog') - rootdomain: The main domain (e.g., 'yourdomain.com') - dir: The document root directory (e.g., '/public_html') - Behavior: Configures the subdomain to point to the specified root directory. Permissions: - The cPanel account used must have permissions to add/remove addon domains and subdomains. Limitations: - Does not handle DNS configuration. - Does not handle SSL certificate issuance (requires cPanel's SSL/TLS tools or AutoSSL). ``` -------------------------------- ### Define Required Cloudways API Constants in PHP Source: https://github.com/superdav42/wp-multisite-waas/wiki/Cloudways-Integration These PHP constants are essential for the Cloudways integration to function. They provide the necessary API credentials (email, API key) and specific identifiers (server ID, application ID) for your Cloudways environment. These values must be obtained from your Cloudways dashboard and added to your WordPress `wp-config.php` file. ```php define('WU_CLOUDWAYS_EMAIL', 'your_cloudways_email'); define('WU_CLOUDWAYS_API_KEY', 'your_api_key'); define('WU_CLOUDWAYS_SERVER_ID', 'your_server_id'); define('WU_CLOUDWAYS_APP_ID', 'your_app_id'); ``` -------------------------------- ### WP Ultimo API: Template Selection URL Filter and Shortcode Source: https://github.com/superdav42/wp-multisite-waas/blob/main/readme.txt This entry documents the WordPress filter hook `wu_template_selection_rewrite_rule_slug` which allows modification of the URL slug used for pre-selecting site templates. It also details the `wu_templates_list` shortcode, which now supports a 'cols' parameter for layout control and has had its site template limitation removed. ```APIDOC Filter Hook: wu_template_selection_rewrite_rule_slug - Description: Allows modification of the '/template/' portion of the pre-selected site template URL. - Parameters: - $slug (string): The current slug for the template selection URL. - Returns: (string) The modified slug. Shortcode: [wu_templates_list] - Description: Displays a list of site templates. The 100-site template limitation has been removed. - Parameters: - cols (integer, optional): Specifies the number of columns for the template list display. Defaults to 3. - Usage Example: [wu_templates_list cols="4"] ``` -------------------------------- ### Define Optional Cloudways Extra Domains Constant in PHP Source: https://github.com/superdav42/wp-multisite-waas/wiki/Cloudways-Integration This optional PHP constant allows you to specify additional domains that should always be included during the domain syncing process with Cloudways. This is useful for domains not managed directly by Multisite Ultimate, wildcard domains, or development/staging domains. The value should be a comma-separated list of domain names. ```php define('WU_CLOUDWAYS_EXTRA_DOMAINS', 'domain1.com,domain2.com,*.wildcard.com'); ``` -------------------------------- ### WordPress Multisite Ultimate Form Embedding Shortcodes Source: https://github.com/superdav42/wp-multisite-waas/wiki/customizing-your-registration-form These shortcodes are provided by Multisite Ultimate 2.0 to embed login and checkout forms directly into WordPress pages. They allow for flexible placement and integration of custom forms created within the plugin's editor. ```APIDOC [wu_login_form] - Purpose: Embeds the login form configured within Multisite Ultimate. - Usage: Place this shortcode on your WordPress login page or any page where a login interface is required. [wu_checkout] - Purpose: Embeds the registration or checkout form created using the Multisite Ultimate checkout form editor. - Usage: Place this shortcode on your WordPress registration page to display the custom checkout form built with the editor. This allows for customized fields and product offerings. ``` -------------------------------- ### Change WordPress Multisite Ultimate Account Menu Position Source: https://github.com/superdav42/wp-multisite-waas/wiki/code-snippets-for-v2 This PHP snippet modifies the display position of the 'Account' menu item within the client's WordPress Dashboard. It leverages a WordPress filter to allow administrators to customize the order of menu items, enhancing the user interface. The snippet can be integrated into the theme's `functions.php` file, a mu-plugin, or a custom plugin. ```PHP add_filter('wu_my_account_menu_position', function() { return 10; // Tweak this value to place the menu in the desired position. }); ``` -------------------------------- ### Reorder WordPress Multisite Ultimate Country List (PHP) Source: https://github.com/superdav42/wp-multisite-waas/wiki/re-ordering-the-wp-ultimo-country-list This PHP snippet reorders the country list in the WordPress Multisite Ultimate plugin by modifying the 'wu_get_countries' filter. It removes a specified country (e.g., Germany) from its alphabetical position and re-adds it to the top of the list, ensuring it appears first in the dropdown. Users should replace 'DE' with their desired two-letter country code and update the country name accordingly. ```php add_filter('wu_get_countries', function($countries) { // Change DE to the two-letter code of your country // Example below for Germany. unset($countries['DE']); // Change DE to the two-letter code of your country // and the name of your country's name. // Example below, for Germany. $countries = array_merge(array( 'DE' => __('Germany', 'wp-ultimo'), ), $countries); return $countries; }); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.