File manager - Edit - /home/verseaumee/maze/wp-content/plugins/reddit-for-woocommerce/js/src/utils/getConnectedJetpackInfo.js
Back
/** * External dependencies */ import { __ } from '@wordpress/i18n'; /** * @typedef {import('~/data/selectors').JetpackAccount} JetpackAccount */ /** * Get a connected jetpack information for display on UI. * This function should always be called after the jetpack is connected. * * @param {JetpackAccount} jetpack Connected jetpack account data. * @return {string} Return email if current user is jetpack owner. * Otherwise, return a successfully connected info only. */ export default function getConnectedJetpackInfo( jetpack ) { // Error-proofing for calling with not yet connect jetpack. if ( jetpack.active !== 'yes' ) { return ''; } if ( jetpack.owner === 'yes' ) { return jetpack.email; } // Show a connected text instead of owner email to non jetpack owner users. return __( 'Successfully connected through Jetpack', 'reddit-for-woocommerce' ); }
| ver. 1.4 |
Github
|
.
| PHP 8.5.7 | Generation time: 0 |
proxy
|
phpinfo
|
Settings