HEX
Server: nginx/1.26.1
System: Linux main-vm 5.15.0-153-generic #163-Ubuntu SMP Thu Aug 7 16:37:18 UTC 2025 x86_64
User: root (0)
PHP: 8.2.19
Disabled: NONE
Upload Files
File: /var/www/bellecouture/wp-content/plugins/easy-digital-downloads/src/Integrations/WPCode.php
<?php
namespace EDD\Integrations;

// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;

/**
 * Handles registering the `easydigitaldownloads` username in the WPCode snippets library.
 *
 * @since 3.2.4
 */
class WPCode {

	/**
	 * Registers the event subscribers.
	 *
	 * @since 3.2.4
	 * @return void
	 */
	public function subscribe() {
		add_action( 'load-code-snippets_page_wpcode-snippet-manager', array( $this, 'register_username' ), 10, 3 );
		add_action( 'load-code-snippets_page_wpcode-library', array( $this, 'register_username' ), 10, 3 );
	}

	/**
	 * Registers our username in the WPCode snippets library.
	 *
	 * @since 3.2.4
	 * @return void
	 */
	public function register_username() {
		if ( ! function_exists( 'wpcode_register_library_username' ) ) {
			return;
		}

		wpcode_register_library_username( 'easydigitaldownloads', 'EDD', EDD_VERSION );
	}
}