### Example composer.json Configuration Source: https://docs.nexcess.com/software/the-events-calendar/composer A sample configuration file for installing The Events Calendar Pro via Composer, including repository definitions and installer paths. ```json { "repositories": [ { "type": "package", "package": { "name": "the-events-calendar/events-calendar-pro", "version": "5.8.0", "type": "wordpress-plugin", "dist": { "url": "https://evnt.is/fetch-ecp?key=[insert-key]&version=5.8.0", "type": "zip" } } } ], "require": { "the-events-calendar/events-calendar-pro": "5.8.0" }, "extra": { "installer-paths": { "plugins/{$name}": [ "type:wordpress-plugin" ] } }, "minimum-stability": "dev" } ``` -------------------------------- ### Profile Section Shortcode Examples Source: https://docs.nexcess.com/software/learndash/memberdash/ms-membership-account Examples for configuring the profile section display and labels. ```shortcode [ms-membership-account show_profile=”no”] ``` ```shortcode [ms-membership-account profile_title=”Your Info”] ``` ```shortcode [ms-membership-account show_profile_change=”no”] ``` ```shortcode [ms-membership-account profile_change_label=”Update Info”] ``` -------------------------------- ### Full [ms-membership-account] Configuration Example Source: https://docs.nexcess.com/software/learndash/memberdash/ms-membership-account A comprehensive example combining multiple attributes to customize the account page layout. ```shortcode [ms-membership-account show_profile_change="no" profile_title="Your Info" show_activity="yes" limit_activities="3" activity_title="Last 3 Activities" activity_details_label="Full Log"] ``` -------------------------------- ### Activity Section Shortcode Examples Source: https://docs.nexcess.com/software/learndash/memberdash/ms-membership-account Examples for configuring the activity section display, limits, and labels. ```shortcode [ms-membership-account show_activity=”no”] ``` ```shortcode [ms-membership-account activity_title=”Recent Logins”] ``` ```shortcode [ms-membership-account limit_activities=”3″] ``` ```shortcode [ms-membership-account show_all_activities=”no”] ``` ```shortcode [ms-membership-account activity_details_label=”Full Activity Log”] ``` -------------------------------- ### Membership Section Shortcode Examples Source: https://docs.nexcess.com/software/learndash/memberdash/ms-membership-account Examples for configuring the membership section display and labels. ```shortcode [ms-membership-account show_membership=”no”] ``` ```shortcode [ms-membership-account membership_title=”My Plans”] ``` ```shortcode [ms-membership-account show_membership_change=”no”] ``` ```shortcode [ms-membership-account membership_change_label=”Switch Plan”] ``` -------------------------------- ### Check WP-CLI Installation Source: https://docs.nexcess.com/software/kadence/solid/manual-wordpress-backup Verify if WP-CLI is installed and available in the current environment. ```bash wp --info ``` -------------------------------- ### Invoices Section Shortcode Examples Source: https://docs.nexcess.com/software/learndash/memberdash/ms-membership-account Examples for configuring the invoices section display, limits, and labels. ```shortcode [ms-membership-account show_invoices=”no”] ``` ```shortcode [ms-membership-account invoices_title=”Billing History”] ``` ```shortcode [ms-membership-account limit_invoices=”5″] ``` ```shortcode [ms-membership-account show_all_invoices=”no”] ``` ```shortcode [ms-membership-account invoices_details_label=”Full Invoice List”] ``` -------------------------------- ### Verify Node.js Installation Source: https://docs.nexcess.com/software/the-events-calendar/event-and-tickets-mcp Check the installed version of Node.js to ensure it meets the minimum requirement of version 20 or higher. ```bash node --version ``` -------------------------------- ### Activate license via WP-CLI Source: https://docs.nexcess.com/software/kadence/solid/central/manage-sites Activates the license for installed SolidWP products. ```bash wp ithemes-licensing activate ``` -------------------------------- ### Install PHP iconv extension on Ubuntu/Debian Source: https://docs.nexcess.com/software/kadence/solid/solid-security/solid-security-faq Command to install the required iconv extension on Debian-based systems. ```bash sudo apt install php-iconv ``` -------------------------------- ### Export .ics file link example Source: https://docs.nexcess.com/software/the-events-calendar/troubleshoot-subscribe-export Example of an anchor tag using the https protocol to download a static .ics file. ```html https://demo.theeventscalendar.com/events/list/?ical=1 ``` -------------------------------- ### Configure Security Headers Source: https://docs.nexcess.com/software/kadence/solid/solid-security/security-headers Example configuration for setting security headers in a Solid application. ```javascript import { createSecurityHeaders } from "solid-security"; const headers = createSecurityHeaders({ contentSecurityPolicy: "default-src 'self';", xFrameOptions: "DENY", xContentTypeOptions: "nosniff" }); ``` -------------------------------- ### Configure Widget Start Date Source: https://docs.nexcess.com/software/the-events-calendar/events-week-widget Sets the starting week based on a specific date, following the date format defined in Events settings. ```text [tribe_this_week start_date="12-07-2015"] ``` -------------------------------- ### Extended Settings Exclusion Example Source: https://docs.nexcess.com/software/give/export-settings-from-exports A more comprehensive example demonstrating how to exclude additional settings like Mailchimp API keys and license keys from the export process. ```php /** * Exclude multiple settings from GiveWP export. */ function my_give_settings_export_excludes( $excludes ) { $excludes['stripe_settings'] = 'Stripe Settings'; $excludes['paypal_settings'] = 'PayPal Settings'; $excludes['paypal_standard_settings'] = 'PayPal Standard Settings'; $excludes['mailchimp_settings'] = 'Mailchimp Settings'; $excludes['give_license_keys'] = 'Give License Keys'; return $excludes; } add_filter( 'give_settings_export_excludes', 'my_give_settings_export_excludes' ); ``` -------------------------------- ### Configure Security Headers Source: https://docs.nexcess.com/software/kadence/solid/solid-security/security-headers Example configuration for setting security headers in a Solid application. ```typescript import { createSecurityHeaders } from "solid-security"; const headers = createSecurityHeaders({ contentSecurityPolicy: { directives: { defaultSrc: ["'self'"], scriptSrc: ["'self'", "trusted-scripts.com"] } }, xFrameOptions: "DENY" }); ``` -------------------------------- ### API Endpoint Structure Source: https://docs.nexcess.com/software/give/give-api-reference Examples of how to construct URLs for specific API endpoints. ```text http://yoursite.com/give-api// ``` ```text http://yoursite.com/give-api/donations/ ``` ```text http://yoursite.com/give-api/donations/?key=a281cf0a95be875d9eeb284fb004c938&token=5f9432f3ffa5945755ebc66179810d70 ``` -------------------------------- ### wp ithemes-licensing activate Source: https://docs.nexcess.com/software/kadence/solid/central/manage-sites Activates the license for installed SolidWP products. ```APIDOC ## wp ithemes-licensing activate ### Description Activates the license for installed SolidWP products. ``` -------------------------------- ### GET Attendees Endpoint Source: https://docs.nexcess.com/software/the-events-calendar/event-tickets-rest-api Example of a standard GET request to the attendees endpoint. ```http GET https://demo.theeventscalendar.com/wp-json/tribe/tickets/v1/attendees ``` -------------------------------- ### Initializing Gateway Configuration Source: https://docs.nexcess.com/software/kadence/restrict-content-pro/payment-gateway-api Example implementation of the init() method to define supported features and API credentials. ```php /** * Initialize the gateway configuration * * This is used to populate the $supports property, setup any API keys, and set the API endpoint. * * @access public * @return void */ public function init() { /* Example: $this->supports[] = 'one-time'; $this->supports[] = 'recurring'; $this->supports[] = 'fees'; $this->supports[] = 'trial'; global $rcp_options; if ( $this->test_mode ) { $this->api_endpoint = 'https://sandbox.gateway.com'; $this->api_key = $rcp_options['my_sandbox_api_key']; } else { $this->api_endpoint = 'https://live.gateway.com'; $this->api_key = $rcp_options['my_live_api_key']; } */ } ``` -------------------------------- ### Embed Event Schedule with Shortcode Source: https://docs.nexcess.com/software/the-events-calendar Example usage of the [tec_schedule] shortcode to display event tracks and customize the appearance. ```text [tec_schedule tracks="all" color_scheme="light" session_link"none"] ``` -------------------------------- ### Retrieve and set member status Source: https://docs.nexcess.com/software/kadence/restrict-content-pro/rcp_member Examples for getting the current status of a member and updating it to a new status. ```php $member = new RCP_Member( 1 ); $status = $member->get_status(); ``` ```php $member = new RCP_Member( 1 ); $member->set_status( ‘active’ ); ``` -------------------------------- ### Configure Security Headers Source: https://docs.nexcess.com/software/kadence/solid/solid-security/security-headers Example of setting up security headers within a Solid application configuration. ```javascript import { defineConfig } from 'solid-start'; export default defineConfig({ middleware: ['solid-security'], security: { headers: { 'Content-Security-Policy': "default-src 'self';", 'X-Frame-Options': 'DENY', 'X-Content-Type-Options': 'nosniff', 'Referrer-Policy': 'strict-origin-when-cross-origin' } } }); ``` -------------------------------- ### Display Installation Details Source: https://docs.nexcess.com/software/give/give-cli Shows GiveWP version, success/failure page URLs, currency settings, and enabled payment gateways. ```bash wp give details ``` -------------------------------- ### Initialize Payment Gateway Class Source: https://docs.nexcess.com/software/kadence/restrict-content-pro/payment-gateway-api Use the init() method to declare supported features, configure API credentials based on test mode, and include necessary SDK files. ```php supports[] = 'one-time'; $this->supports[] = 'recurring'; $this->supports[] = 'fees'; $this->supports[] = 'trial'; if ( $this->test_mode ) { $this->api_login_id = isset( $rcp_options['authorize_test_api_login'] ) ? sanitize_text_field( $rcp_options['authorize_test_api_login'] ) : ''; $this->transaction_key = isset( $rcp_options['authorize_test_txn_key'] ) ? sanitize_text_field( $rcp_options['authorize_test_txn_key'] ) : ''; $this->transaction_signature = isset( $rcp_options['authorize_test_signature_key'] ) ? sanitize_text_field( $rcp_options['authorize_test_signature_key'] ) : ''; } else { $this->api_login_id = isset( $rcp_options['authorize_api_login'] ) ? sanitize_text_field( $rcp_options['authorize_api_login'] ) : ''; $this->transaction_key = isset( $rcp_options['authorize_txn_key'] ) ? sanitize_text_field( $rcp_options['authorize_txn_key'] ) : ''; $this->transaction_signature = isset( $rcp_options['authorize_signature_key'] ) ? sanitize_text_field( $rcp_options['authorize_signature_key'] ) : ''; } require_once RCP_ANET_PATH . 'vendor/autoload.php'; } ``` -------------------------------- ### Example JSON Event Response Source: https://docs.nexcess.com/software/the-events-calendar/event-tickets-rest-api A truncated example of the JSON structure returned by the events endpoint. ```json { "events": [ { "id": 1762, "global_id": "demo.theeventscalendar.com?id=1762", "author": "2", "status": "publish", "date": "2022-12-01 12:36:40", "url": "https://demo.theeventscalendar.com/event/hosted-dinner-with-chef-monica-geller/", "rest_url": "https://demo.theeventscalendar.com/wp-json/tribe/events/v1/events/1762", "title": "Hosted Dinner with Chef Monica Geller", "description": "

Join Chef Monica Geller for a Hosted Dinner!

", "all_day": false, "start_date": "2017-09-21 08:00:00", "end_date": "2017-09-21 17:00:00", "timezone": "UTC+0", "cost": "$5", "categories": [...], "tags": [...], "venue": {...}, "organizer": [...] } ], "rest_url": "...", "total": 1, "total_pages": 1 } ``` -------------------------------- ### Configure Security Headers Source: https://docs.nexcess.com/software/kadence/solid/solid-security/security-headers Example configuration for setting security headers in a Solid application environment. ```javascript v2HO6hPvmcep2svYj5f5r5d/Jrz6LouKi5d/Javr6mnO7ei736+Pa/HjJ6sTU4eWnHKS7O0v8nf7p3pa3/FzH/L2f9edPr/7nJjtQUL0Gp/9ovdbqYwXbcEE/8aLi/kn5DLub5+xaQY1jk42q7i9VZcx4c8fzT4H/Ser6W8+KCnn8Zg/007T/5863/9wxV6/8jQyZOOq8uY/ydZvyftJ7Xaf6fvE12pSFgCBgChsBBOc0OQ+V4Y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f7RuMRveszKet0E8quNgQMAUPAEDAEDAFD4N1CQF38XqCJ7gF1rzyFSnt5eZU9Z4pM42xchLgoKC ``` -------------------------------- ### Generate test demonstration page Source: https://docs.nexcess.com/software/give/give-cli Generates a page containing all GiveWP shortcodes. ```bash wp give test-demonstration-page --preview=true ``` -------------------------------- ### Get bookable dates response structure Source: https://docs.nexcess.com/software/kadence/iconic/delivery-slots/delivery-slots-rest-api Sample JSON response returned by the GET /iconic_wds/v1/get_bookable_dates/ endpoint. ```json { "success":true, "shipping_methods":{ "free_shipping:2":"Free shipping", "flat_rate:7":"Flat rate - Express", "local_pickup:8":"Local pickup", }, "dates":{ "free_shipping:2":[ { "formatted":"Fri, 4th Mar", "header_formatted":"Mar 4", "admin_formatted":"04/03/2022", "timestamp":1646409206, "ymd":"20220304", "weekday_number":"5", "weekday":"Fri", "same_day":false, "next_day":false }, { "formatted":"Sat, 5th Mar", "header_formatted":"Mar 5", "admin_formatted":"05/03/2022", "timestamp":1646495606, "ymd":"20220305", "weekday_number":"6", "weekday":"Sat", "same_day":false, "next_day":false }, } "flat_rate:7":[ { "formatted":"Fri, 4th Mar", "header_formatted":"Mar 4", "admin_formatted":"04/03/2022", "timestamp":1646409206, "ymd":"20220304", "weekday_number":"5", "weekday":"Fri", "same_day":false, "next_day":false }, { "formatted":"Sat, 5th Mar", "header_formatted":"Mar 5", "admin_formatted":"05/03/2022", "timestamp":1646495606, "ymd":"20220305", "weekday_number":"6", "weekday":"Sat", "same_day":false, "next_day":false } } } ``` -------------------------------- ### Example Serialized Attendee Data Source: https://docs.nexcess.com/software/the-events-calendar/customize-zaps An example of how attendee information is stored in the wp_postmeta table as a serialized array. ```text a:3:{s:10:"first-name";s:4:"John";s:9:"last-name";s:3:"Doe";s:13:"email-address";s:18:"john.doe@email.com";} ``` -------------------------------- ### Hooking into the Archive Loop Source: https://docs.nexcess.com/software/give/theming-give-archive-page Use this example in your theme's functions.php file to inject content before the archive loop begins. ```php function my_custom_archive_content() { echo '
This content appears before the loop!
'; } add_action( 'my-give-before-archive-loop', 'my_custom_archive_content' ); ``` -------------------------------- ### Add a user to a subscription level Source: https://docs.nexcess.com/software/kadence/restrict-content-pro/rcp_add_user_to_subscription Example demonstrating how to assign a subscription level with specific status, expiration, and discount code. ```php $user_id = 123; $args = array( ‘subscription_id’ => 3, ‘status’ => ‘active’, ‘expiration’ => date( ‘Y-m-d 23:59:59’, strtotime( ‘+1 month’, current_time( ‘timestamp’ ) ) ), ‘discount_code’ => ‘free_subscription’ ); rcp_add_user_to_subscription( $user_id, $args ); ``` -------------------------------- ### iCalendar webcal protocol link example Source: https://docs.nexcess.com/software/the-events-calendar/troubleshoot-subscribe-export Example of an anchor tag using the webcal protocol to trigger calendar application handling. ```html webcal://demo.theeventscalendar.com/?post_type=tribe_events&ical=1&eventDisplay=list ``` -------------------------------- ### View Database Schema Source: https://docs.nexcess.com/software/kadence/solid/solid-security/wp-cli-integration Creates the database schema for Solid Security. ```bash wp itsec schema ``` -------------------------------- ### Subscription Query Response Example Source: https://docs.nexcess.com/software/give/give-api-reference A sample JSON response showing the structure of subscription info and associated payment records. ```json { "subscriptions": [ { "info": { "subs_db": { "table_name": "wp_give_subscriptions", "primary_key": "id", "version": "1.1", "min_index_length": 191 }, "id": "31", "donor_id": "71", "period": "week", "frequency": "1", "initial_amount": "13.000000", "recurring_amount": "13.000000", "bill_times": "0", "transaction_id": "40019834114", "parent_payment_id": "1328", "form_id": "1325", "created": "2018-10-09 09:52:29", "expiration": "2018-11-06 23:59:59", "status": "active", "profile_id": "5371285", "gateway": "authorize", "donor": { "id": "71", "purchase_count": "5", "purchase_value": "63.000000", "email": "jink@recurrably.example", "emails": { "primary": "jink@recurrably.example" }, "name": "Jimbo Franklin", "date_created": "2018-10-09 15:48:24", "payment_ids": "1328,1336,1360,1375", "user_id": "15", "notes": [], "address": [], "token": "", "verify_key": "", "verify_throttle": "0000-00-00 00:00:00" }, "notes": "" }, "payments": [ { "id": 1375, "amount": "13.000000", "date": "October 30, 2018", "status": "renewal" }, { "id": 1360, "amount": "13.000000", "date": "October 23, 2018", "status": "renewal" }, { "id": 1336, "amount": "13.000000", "date": "October 16, 2018", "status": "renewal" } ] }, } ``` -------------------------------- ### Salesforce Setup URL Source: https://docs.nexcess.com/software/give/sending-custom-data-to-salesforce The URL path to access the Fields and Relationships manager in the Salesforce Lightning interface. ```text {your-salesforce-domain}.lightning.force.com/lightning/setup/ObjectManager/Opportunity/FieldsAndRelationships/view ``` -------------------------------- ### Display Ticket Sale Start Time Source: https://docs.nexcess.com/software/the-events-calendar/customize-event-tickets Enables the display of the ticket sale start time in the unavailability message using the tribe_tickets_unvailable_message_time filter. ```php add_filter( 'tribe_tickets_unvailable_message_time', '__return_true' ); ``` -------------------------------- ### PayPal Express Webhook Processing Example Source: https://docs.nexcess.com/software/kadence/restrict-content-pro/payment-gateway-api A comprehensive example of processing PayPal IPN webhooks, including data validation, membership retrieval, and payment recording. ```php get_id() > 0 ) { rcp_log( 'Exiting PayPal Express IPN - membership ID not found.', true ); die( 'no membership found' ); } rcp_log( sprintf( 'Processing IPN for membership #%d.', $membership->get_id() ) ); if ( empty( $user_id ) ) { $user_id = $membership->get_customer()->get_user_id(); } $member = new RCP_Member( $membership->get_customer()->get_user_id() ); // for backwards compatibility $membership_level_id = $membership->get_object_id(); if( ! $membership_level_id ) { rcp_log( 'Exiting PayPal Express IPN - no membership level ID.', true ); die( 'no membership level found' ); } if( ! $membership_level = rcp_get_subscription_details( $membership_level_id ) ) { rcp_log( 'Exiting PayPal Express IPN - no membership level found.', true ); die( 'no membership level found' ); } $amount = isset( $posted['mc_gross'] ) ? number_format( (float) $posted['mc_gross'], 2, '.', '' ) : false; $membership_gateway = $membership->get_gateway(); // setup the payment info in an array for storage $payment_data = array( 'subscription' => $membership_level->name, 'payment_type' => $posted['txn_type'], 'subscription_key' => $membership->get_subscription_key(), 'user_id' => $user_id, 'customer_id' => $membership->get_customer()->get_id(), 'membership_id' => $membership->get_id(), 'status' => 'complete', 'gateway' => ! empty( $membership_gateway ) && 'paypal_pro' == $membership_gateway ? 'paypal_pro' : 'paypal_express' ); if ( false !== $amount ) { $payment_data['amount'] = $amount; } ``` -------------------------------- ### Configure Security Headers in Solid Source: https://docs.nexcess.com/software/kadence/solid/solid-security/security-headers Example of setting security headers within a Solid application configuration. ```typescript import { defineConfig } from "solid-start"; export default defineConfig({ middleware: "./src/middleware.ts", }); ``` -------------------------------- ### Change Get Tickets Link Text Source: https://docs.nexcess.com/software/the-events-calendar/customize-event-tickets Use the gettext_with_context filter to rename the 'Get Tickets' link text globally. Ensure the filter parameter count matches the function signature. ```php /** * Change the Get Tickets on List View and Single Events * * @param string $translation The translated text. * @param string $text The text to translate. * @param string $context The option context string. * @param string $domain The domain slug of the translated text. * * @return string The translated text or the custom text. */ add_filter( 'gettext_with_context', 'tribe_change_get_tickets', 20, 4 ); function tribe_change_get_tickets( string $translation, string $text, string $context, string $domain ): string { if ( $domain != 'default' && ! str_starts_with( $domain, 'event-' ) ) { return $translation; } $ticket_text = [ // Get Tickets on List View 'Get %s' => 'Register Now!', // Get Tickets Form - Single View 'Get Tickets' => 'Register Now!', ]; // If we don't have replacement text, bail. if ( empty( $ticket_text[ $text ] ) ) { return $translation; } return $ticket_text[ $text ]; } ``` -------------------------------- ### Show licensing status via WP-CLI Source: https://docs.nexcess.com/software/kadence/solid/central/manage-sites Displays the current licensing status for SolidWP products installed on the site. ```bash wp ithemes-licensing show ``` -------------------------------- ### Shortcode Usage Examples Source: https://docs.nexcess.com/software/learndash/multiple-instructors-shortcode Various configurations for the [all_instructors] shortcode to control display elements, image size, and visibility. ```text [all_instructors] ``` ```text [all_instructors display_img=0] ``` ```text [all_instructors size=32] ``` ```text [all_instructors display_name=0] ``` ```text [all_instructors visible=3] ``` ```text [all_instructors exclude_author=1] ``` ```text [all_instructors course_id=36] ``` -------------------------------- ### Get memberships Source: https://docs.nexcess.com/software/kadence/restrict-content-pro/rest-api-memberships-route Retrieve a list of memberships from the database. ```APIDOC ## GET /memberships ### Description Retrieve a list of memberships from the Restrict Content Pro database. ``` -------------------------------- ### GET /give-api/v1/donors/ Source: https://docs.nexcess.com/software/give/give-api-reference Retrieves a list of donors from the database. ```APIDOC ## GET /give-api/v1/donors/ ### Description Retrieves a list of donors who have donated using the forms on your website. ### Method GET ### Endpoint /give-api/v1/donors/ ### Parameters #### Query Parameters - **key** (string) - Required - API key for authentication - **token** (string) - Required - API token for authentication - **number** (integer) - Optional - Number of donors to return - **donor** (string) - Optional - Identifier (ID or email) to retrieve a specific donor ### Response #### Success Response (200) - **donors** (array) - List of donor objects containing info and stats - **request_speed** (float) - Time taken for the request #### Response Example { "donors": [ { "info": { "id": "", "user_id": "", "username": "", "display_name": "", "customer_id": "3", "first_name": "Jane", "last_name": "Smith", "email": "jsmith@gmail.com" }, "stats": { "total_purchases": "4", "total_spent": "120.000000" } } ], "request_speed": 0.0060648918151855 } ``` -------------------------------- ### Retrieve All Events Source: https://docs.nexcess.com/software/the-events-calendar/event-tickets-rest-api A GET request to fetch all events from the API. ```http GET https://demo.theeventscalendar.com/wp-json/tribe/events/v1/events ``` -------------------------------- ### Override Divi Post Navigation with Event Start Date Source: https://docs.nexcess.com/software/the-events-calendar/divi-theme Hooks into WordPress navigation filters to join the event start date meta and adjust the WHERE and ORDER BY clauses for adjacent event queries. Add this to your child theme's functions.php file or a code snippets plugin. ```php add_filter( 'get_previous_post_join', 'my_tec_adjacent_events_join', 10, 2 ); add_filter( 'get_next_post_join', 'my_tec_adjacent_events_join', 10, 2 ); /** * Join event start date meta for adjacent post queries on events. */ function my_tec_adjacent_events_join( $join, $in_same_term ) { if ( ! is_singular( 'tribe_events' ) ) { return $join; } global $wpdb; $meta_join = " LEFT JOIN {$wpdb->postmeta} AS tec_mt ON (tec_mt.post_id = p.ID AND tec_mt.meta_key = '_EventStartDate') "; if ( strpos( $join, "tec_mt.meta_key = '_EventStartDate'" ) !== false ) { return $join; } return $join . $meta_join; } add_filter( 'get_previous_post_where', 'my_tec_adjacent_events_where_previous', 10, 2 ); /** * Adjust WHERE for previous event based on event start date. */ function my_tec_adjacent_events_where_previous( $where, $in_same_term ) { if ( ! is_singular( 'tribe_events' ) ) { return $where; } $event_date = get_post_meta( get_the_ID(), '_EventStartDate', true ); if ( empty( $event_date ) ) { return $where; } $where = preg_replace( "/p.post_dates*s*'[^']*'/", "tec_mt.meta_value > '{$event_date}'", $where ); if ( strpos( $where, 'tec_mt.meta_value IS NOT NULL' ) === false ) { $where .= " AND tec_mt.meta_value IS NOT NULL"; } return $where; } add_filter( 'get_previous_post_sort', 'my_tec_adjacent_events_sort_previous' ); /** * Sort previous event by event start date DESC. */ function my_tec_adjacent_events_sort_previous( $sort ) { if ( ! is_singular( 'tribe_events' ) ) { return $sort; } return ' ORDER BY tec_mt.meta_value DESC LIMIT 1'; } add_filter( 'get_next_post_sort', 'my_tec_adjacent_events_sort_next' ); /** * Sort next event by event start date ASC. */ function my_tec_adjacent_events_sort_next( $sort ) { if ( ! is_singular( 'tribe_events' ) ) { return $sort; } return ' ORDER BY tec_mt.meta_value ASC LIMIT 1'; } ``` -------------------------------- ### itsec_install_schema Action Hook Source: https://docs.nexcess.com/software/kadence/solid/solid-security/solid-security-action-hooks Fires when the DB schema is installed or updated. ```php do_action( 'itsec_install_schema', $wp_error ); ``` -------------------------------- ### Insert Quickview button via PHP Source: https://docs.nexcess.com/software/kadence/iconic/quickview/manually-insert-the-quickview-button Use these PHP snippets to display the button within product loops or custom theme templates. ```php ``` ```php display_button( $product_id ); ?> ``` -------------------------------- ### Configure Security Headers in SolidStart Source: https://docs.nexcess.com/software/kadence/solid/solid-security/security-headers Example of setting security headers within a SolidStart application configuration. ```typescript import { defineConfig } from "@solidjs/start/config"; export default defineConfig({ middleware: "./src/middleware.ts", server: { headers: { "Content-Security-Policy": "default-src 'self';", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "DENY", "X-XSS-Protection": "1; mode=block" } } }); ``` -------------------------------- ### GET /wp-json/tribe/tickets/v1/tickets Source: https://docs.nexcess.com/software/the-events-calendar/event-tickets-rest-api Retrieves a list of tickets, with optional filtering capabilities. ```APIDOC ## GET /wp-json/tribe/tickets/v1/tickets ### Description Returns a collection of tickets. Filtering can be applied to narrow down results. ### Method GET ### Endpoint /wp-json/tribe/tickets/v1/tickets ### Parameters #### Query Parameters - **attendee_information_available** (boolean) - Optional - Filter tickets by whether individual attendee collection is enabled. ``` -------------------------------- ### GET /wp-json/tribe/events/v1/events/{id} Source: https://docs.nexcess.com/software/the-events-calendar/event-tickets-rest-api Retrieves details for a specific event by its ID. ```APIDOC ## GET /wp-json/tribe/events/v1/events/{id} ### Description Returns the full details of a single event identified by its post ID. ### Method GET ### Endpoint /wp-json/tribe/events/v1/events/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - The unique post ID of the event. ``` -------------------------------- ### Get specific membership Source: https://docs.nexcess.com/software/kadence/restrict-content-pro/rest-api-memberships-route Retrieve details for a specific membership by its ID. ```APIDOC ## GET /memberships/{id} ### Description Retrieve details for a specific membership. ``` -------------------------------- ### Querying upcoming events Source: https://docs.nexcess.com/software/the-events-calendar/query-events Retrieves events starting on or after a specific date. ```php // Retrieve any upcoming events starting January 1st, 2015, or later $events = tribe_get_events( [ 'start_date' => '2015-01-01', ] ); ``` -------------------------------- ### Basic ms-membership-signup Shortcode Usage Source: https://docs.nexcess.com/software/learndash/memberdash/ms-membership-signup Displays the default membership signup list using the standard shortcode syntax. ```shortcode [ms-membership-signup] ``` -------------------------------- ### GET /wp-json/tribe/tickets/v1/attendees/ Source: https://docs.nexcess.com/software/the-events-calendar/public-attendee-list Retrieves all attendee registrations that are publicly available for all events on the site. ```APIDOC ## GET /wp-json/tribe/tickets/v1/attendees/ ### Description Retrieves a list of all publicly available attendee registrations across all events on the site. ### Method GET ### Endpoint [yoursite.com]/wp-json/tribe/tickets/v1/attendees/ ``` -------------------------------- ### Compress files via command line Source: https://docs.nexcess.com/software/kadence/fix-wordpress-incompatible-archive-error Use this command in the terminal to create a compatible zip file, replacing 'custom_plugin' with your specific folder name. ```bash zip -vr custom-plugin.zip custom_plugin/ ``` -------------------------------- ### GET /wp-json/rcp/{version}/customers/{customer_id} Source: https://docs.nexcess.com/software/kadence/restrict-content-pro/rest-api-customers-route Retrieves details for a specific customer. ```APIDOC ## GET /wp-json/rcp/{version}/customers/{customer_id} ### Description Retrieves information for a specific customer using their ID, email, or username. ### Method GET ### Endpoint /wp-json/rcp/{version}/customers/{customer_id} ### Parameters #### Path Parameters - **customer_id** (int) - Required - The customer ID to retrieve. #### Query Parameters - **id** (int) - Required - The customer ID to retrieve. - **user_email** (string) - Required - The email address of the customer to retrieve. - **user_login** (string) - Required - The username of the customer to retrieve. ``` -------------------------------- ### Manually Output the Quickview Button Source: https://docs.nexcess.com/software/kadence/iconic/quicktray/change-the-quickview-button-position Insert this code directly into a template file to display the quickview button at a specific location. ```php ```