Skip to content

Instantly share code, notes, and snippets.

View dartiss's full-sized avatar
🏠
Always working from home

David Artiss dartiss

🏠
Always working from home
View GitHub Profile
@Clorith
Clorith / plugin.php
Created December 11, 2015 15:22
Encourage your users to submit translations for your WordPress plugin
<?php
function language_detector_admin_notices() {
// Get the current language locale
$language = get_locale();
// Check if the nag screen has been disabled for this language
if ( false === get_option( 'plugin_slug_language_detector_' . $language, false ) ) {
// Check if a translation file already exists for this language
if ( $loaded = load_plugin_textdomain( 'text_domain', false, plugin_dir_path( __FILE__ ) . '/languages/' ) ) {