Alert: 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.

Instagram_Settings::add_localization_strings()

Adds translatable strings for the JS


Source Source

File: src/integrations/instagram/settings/settings-instagram.php

	private function add_localization_strings() {
		// Update the main JS object
		add_filter(
			'automator_assets_backend_js_data',
			function( $data ) {
				// Add strings
				$data['i18n']['settingsInstagram'] = array(
					'linkedFacebookPage'      => esc_html__( 'Account linked to Facebook Page:', 'uncanny-automator' ),
					'connectInstagramAccount' => esc_html__( 'Connect Instagram account', 'uncanny-automator' ),
					'noInstagram'             => esc_html__( 'No Instagram Business or Professional account connected to this Facebook page.', 'uncanny-automator' ),
					/* translators: 1. Number of followers */
					'followers'               => esc_html_x( '%1$s followers', 'Instagram', 'uncanny-automator' ),
				);

				return $data;
			}
		);
	}