Home › Forums › ACF PRO › Pro License Key in config? › Reply To: Pro License Key in config?
As for code, maybe do what Akismet does. In wp-config.php it looks like define( 'WPCOM_API_KEY', '238r9hsvdu8923' );
. Doing a search for WPCOM_API_KEY over Akismet reveals the following related lines of code.
/wp-content/plugins/akismet/class.akismet.php:
61
62 public static function get_api_key() {
63: return apply_filters( 'akismet_get_api_key', defined('WPCOM_API_KEY') ? constant('WPCOM_API_KEY') : get_option('wordpress_api_key') );
64 }
65
/wp-content/plugins/akismet/wrapper.php:
1 <?php
2
3: global $wpcom_api_key, $akismet_api_host, $akismet_api_port;
4
5: $wpcom_api_key = defined( 'WPCOM_API_KEY' ) ? constant( 'WPCOM_API_KEY' ) : '';
/wp-content/plugins/akismet/views/config.php:
59 <table cellspacing="0" class="akismet-settings">
60 <tbody>
61: <?php if ( !defined( 'WPCOM_API_KEY' ) ):?>
62 <tr>
63 <th class="akismet-api-key" width="10%" align="left" scope="row"><?php esc_html_e('API Key', 'akismet');?></th>
..
138 </div>
139 <div id="major-publishing-actions">
140: <?php if ( !defined( 'WPCOM_API_KEY' ) ):?>
141 <div id="delete-action">
142 <a class="submitdelete deletion" href="<?php echo esc_url( Akismet_Admin::get_page_url( 'delete_key' ) ); ?>"><?php esc_html_e('Disconnect this account', 'akismet'); ?></a>
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
Accordions are a great way to group related information while allowing users to interactively show and hide content. In this video, Damon Cook goes in-depth on how to create an accessible accordion block using ACF PRO’s Repeater field.https://t.co/RXT0g25akN
— Advanced Custom Fields (@wp_acf) March 2, 2023
© 2023 Advanced Custom Fields.
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.