This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
Settings_Page::clear_oauth_credentials_link( string $text = '', $class = '', string $echo = true )
Outputs a link that allows users to clear OAuth credentials
Parameters
- $text
-
(Optional)
Default value: ''
- $echo
-
(Optional)
Default value: true
Return
(void|string)
Source
File: includes/libs/admin/page/settings-page.class.php
private function clear_oauth_credentials_link( $text = '', $class='', $echo = true ){ if( empty( $text ) ){ $text = __( 'Clear OAuth credentials', 'codeflavors-vimeo-video-post-lite' ); } $options = $this->options_obj()->get_options(); if( empty( $options[ 'vimeo_consumer_key' ] ) || empty( $options[ 'vimeo_secret_key' ] ) ){ return; } $nonce = wp_create_nonce( 'cvm-clear-oauth-token' ); $url = menu_page_url( 'cvm_settings', false ) . '&clear_oauth=true&cvm_nonce=' . $nonce . '#auth-options'; $output = sprintf( '<a href="%s" class="%s">%s</a>', $url, esc_attr( $class ), $text ); if( $echo ){ echo $output; } return $output; }