Setting the License Manually
1. Paste the following code at the end of the bccl-settings.php
file:
function bccl_manual_license_settings() {
$cc_settings = get_option('cc_settings');
if ( empty($cc_settings) ) {
$cc_settings = bccl_get_default_options();
}
// Set manual licnese settings.
// EDIT BEGIN
$cc_settings['license_url'] = 'https://creativecommons.org/licenses/by/4.0/'; // URL to license page. Eg: https://creativecommons.org/licenses/by/4.0/
$cc_settings['deed_url'] = 'https://creativecommons.org/licenses/by/4.0/'; // Usually the same as license_url
$cc_settings['license_name'] = 'Creative Commons Attribution 4.0 International License'; // The name of the license
$cc_settings['license_button'] = 'https://i.creativecommons.org/l/by/4.0/88x31.png'; // URL to license image. Eg: https://i.creativecommons.org/l/by/4.0/88x31.png
// EDIT END
delete_option('cc_settings');
update_option('cc_settings', $cc_settings);
bccl_show_info_msg(__('CC-Configurator license has been manually set.', 'cc-configurator'));
}
// Uncomment the following line and visit the License Settings page (Settings->License) to auto set the license. The COMMENT the following line AGAIN.
//add_action( 'admin_init', 'bccl_manual_license_settings', 999999 );
2. Edit the license settings between the EDIT BEGIN
and EDIT END
marks. Find the license details by using the license chooser on the CC web site.
3. Uncomment (remove //
) the last line of the code (add_action
statement), so that it becomes:
add_action( 'admin_init', 'bccl_manual_license_settings', 999999 );
4. Visit the license settings page in the WordPress admin panel (Settings -> License
). The license should have been set automatically.
5. Now comment (add //
) the last line of the code, so that it becomes:
//add_action( 'admin_init', 'bccl_manual_license_settings', 999999 );
Continue using the plugin normally.