bsf_registration_page_url( string $append = '', int $product_id = '' )
BSF Registration Page URL
Description
Parameters
- $append
-
(string) (Optional) Append.
Default value: ''
- $product_id
-
(int) (Optional) Product ID.
Default value: ''
Source
File: admin/bsf-core/index.php
function bsf_registration_page_url( $append = '', $product_id = '' ) { $bsf_updater_options = get_option( 'bsf_updater_options', array() ); $option = false; $constant = false; $skip_brainstorm_menu = get_site_option( 'bsf_skip_braisntorm_menu', false ); $product_registration_link = apply_filters( "bsf_registration_page_url_{$product_id}", '' ); // If Brainstorm meu is not registered. if ( ( defined( 'BSF_UNREG_MENU' ) && ( BSF_UNREG_MENU === true || BSF_UNREG_MENU === 'true' ) ) || true === $skip_brainstorm_menu ) { if ( '&author' === $append ) { return admin_url( 'options.php?page=bsf-registration' . $append ); } } if ( isset( $bsf_updater_options['brainstorm_menu'] ) && '1' === $bsf_updater_options['brainstorm_menu'] ) { $option = true; } if ( defined( 'BSF_REG_MENU_TO_SETTINGS' ) && 'BSF_REG_MENU_TO_SETTINGS' === true || 'BSF_REG_MENU_TO_SETTINGS' === 'true' ) { $constant = true; } if ( '' !== $product_registration_link ) { return $product_registration_link . '' . $append; } else { if ( true === $option || true === $constant ) { // bsf menu in settings. if ( is_multisite() ) { return network_admin_url( 'settings.php?page=bsf-registration' . $append ); } else { return admin_url( 'options-general.php?page=bsf-registration' . $append ); } } else { if ( is_multisite() ) { return network_admin_url( 'admin.php?page=bsf-registration' . $append ); } else { return admin_url( 'index.php?page=bsf-registration' . $append ); } } } }
Expand full source code Collapse full source code View on Trac