diff --git a/languages/no-links-please-anti-spam-it_IT.po b/languages/no-links-please-anti-spam-it_IT.po new file mode 100644 index 0000000..f015d8b --- /dev/null +++ b/languages/no-links-please-anti-spam-it_IT.po @@ -0,0 +1,62 @@ +msgid "" +msgstr "" +"Project-Id-Version: No links please! Anti-SPAM\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-12-05 11:09+0000\n" +"PO-Revision-Date: 2018-12-05 11:15+0000\n" +"Last-Translator: Valerio Bozzolan \n" +"Language-Team: Italiano\n" +"Language: it_IT\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Loco https://localise.biz/\n" +"X-Loco-Version: 2.2.0; wp-4.4.16" + +#: wp-no-links-please-anti-spam.php:30 +msgid "Please try again but without links in the text. Thank you." +msgstr "Per favore riprova ma senza link nel testo. Grazie." + +#: wp-no-links-please-anti-spam.php:51 +msgid "Please remember that links are not appreciated inside comments." +msgstr "Per favore ricorda che nel commento non sono apprezzati link." + +#: wp-no-links-please-anti-spam.php:71 +msgid "Anti-spam stats from \"No links, please!\"" +msgstr "Statistiche anti-spam da \"Nessun link, per favore!\"" + +#: wp-no-links-please-anti-spam.php:80 +#, php-format +msgid "Spammers blocked since activation: %s and counting!" +msgstr "Spammer bloccati dall'attivazione: %s in aumento!" + +#. Name of the plugin +msgid "No links please! Anti-SPAM" +msgstr "Nessun link per favore! Anti-SPAM" + +#. Description of the plugin +msgid "" +"This simple but effective anti-SPAM system protects your WordPress site from " +"SPAM. It works without imposing annoying CAPTCHAs, quizzes, configurations, " +"third-party services, artificial intelligence or unicorns. How? It just " +"drops any anonymous comment with links inside, alerting humans about this " +"netiquette." +msgstr "" +"Questo sistema anti-SPAM semplice ma efficace protegge il tuo sito WordPress " +"dallo SPAM. Funziona senza imporre alcun noioso CAPTCHA, quiz, " +"configurazione, servizi di terze parti, intelligenza artificiale o unicorni. " +"Come? Scartando qualsiasi commento anonimo che contenga dei link all'interno," +" avvisando gli umani di questa netiquette." + +#. URI of the plugin +msgid "https://github.com/valerio-bozzolan/wp-no-links-please-anti-spam" +msgstr "https://github.com/valerio-bozzolan/wp-no-links-please-anti-spam" + +#. Author of the plugin +msgid "Valerio Bozzolan" +msgstr "Valerio Bozzolan" + +#. Author URI of the plugin +msgid "https://boz.reyboz.it/?l=en" +msgstr "https://boz.reyboz.it/?l=it" diff --git a/languages/no-links-please-anti-spam.pot b/languages/no-links-please-anti-spam.pot new file mode 100644 index 0000000..237af05 --- /dev/null +++ b/languages/no-links-please-anti-spam.pot @@ -0,0 +1,58 @@ +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: No links please! Anti-SPAM\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-12-05 11:15+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: \n" +"Language: \n" +"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Loco https://localise.biz/\n" +"X-Loco-Version: 2.2.0; wp-4.4.16" + +#: wp-no-links-please-anti-spam.php:30 +msgid "Please try again but without links in the text. Thank you." +msgstr "" + +#: wp-no-links-please-anti-spam.php:51 +msgid "Please remember that links are not appreciated inside comments." +msgstr "" + +#: wp-no-links-please-anti-spam.php:71 +msgid "Anti-spam stats from \"No links, please!\"" +msgstr "" + +#: wp-no-links-please-anti-spam.php:80 +#, php-format +msgid "Spammers blocked since activation: %s and counting!" +msgstr "" + +#. Name of the plugin +msgid "No links please! Anti-SPAM" +msgstr "" + +#. Description of the plugin +msgid "" +"This simple but effective anti-SPAM system protects your WordPress site from " +"SPAM. It works without imposing annoying CAPTCHAs, quizzes, configurations, " +"third-party services, artificial intelligence or unicorns. How? It just " +"drops any anonymous comment with links inside, alerting humans about this " +"netiquette." +msgstr "" + +#. URI of the plugin +msgid "https://github.com/valerio-bozzolan/wp-no-links-please-anti-spam" +msgstr "" + +#. Author of the plugin +msgid "Valerio Bozzolan" +msgstr "" + +#. Author URI of the plugin +msgid "https://boz.reyboz.it/?l=en" +msgstr "" diff --git a/wp-no-links-please-anti-spam.php b/wp-no-links-please-anti-spam.php index e0b0d74..6324e18 100644 --- a/wp-no-links-please-anti-spam.php +++ b/wp-no-links-please-anti-spam.php @@ -1,106 +1,117 @@ 400, 'back_link' => true, ] ); } } return $approved; } add_filter( 'pre_comment_approved', 'no_links_please_anti_spam_handler', '99', 2 ); /** * Remove the author URL from the comment form for anonymous users */ function no_links_please_anti_spam_form_default_fields( $fields ) { if( ! is_user_logged_in() ) { // remove author URL unset( $fields[ 'url' ] ); // show netiquette message $netiquette = __( "Please remember that links are not appreciated inside comments.", 'no-links-please-anti-spam' ); $netiquette = apply_filters( 'no_links_please_anti_spam_netiquette', $netiquette ); $fields[ 'comment_form_before' ] .= ""; } return $fields; } add_filter( 'comment_form_default_fields', 'no_links_please_anti_spam_form_default_fields' ); /** * Unuseful callback fired when the shortcode is used */ function no_links_please_anti_spam_counter() { return get_option( 'no_links_please_anti_spam_count', 0 ); } add_shortcode( 'no_links_please_anti_spam_counter', 'no_links_please_anti_spam_counter' ); /** * Register the unuseful Dashboard widget */ function no_links_please_anti_spam_dashboard_widget() { wp_add_dashboard_widget( 'no_links_please_anti_spam_dashboard_widget', __( "Anti-spam stats from \"No links, please!\"", 'no-links-please-anti-spam' ), 'no_links_please_anti_spam_dashboard_widget_content' ); } /** * Register the unuseful Dashboard widget content */ function no_links_please_anti_spam_dashboard_widget_content() { echo '

'; printf( __( "Spammers blocked since activation: %s and counting!", 'no-links-please-anti-spam' ), '' . no_links_please_anti_spam_counter() . '' ); echo '

'; } add_action( 'wp_dashboard_setup', 'no_links_please_anti_spam_dashboard_widget' ); // allow shortcodes to be used in widgets add_filter( 'widget_text', 'do_shortcode' ); /** * Unuseful callback fired when the plugin is activated */ function no_links_please_anti_spam_activation() { add_option( 'no_links_please_anti_spam_init', date('U') ); add_option( 'no_links_please_anti_spam_count', 0 ); } register_uninstall_hook( __FILE__, 'no_links_please_anti_spam_activation' ); /** * Unuseful callback fired when the plugin is uninstalled */ function no_links_please_anti_spam_uninstall() { delete_option( 'no_links_please_anti_spam_init' ); delete_option( 'no_links_please_anti_spam_count' ); } register_uninstall_hook( __FILE__, 'no_links_please_anti_spam_uninstall' ); + +/** + * Load plugin textdomain. + * + */ +function no_links_please_anti_spam_load_textdomain() { + load_plugin_textdomain( 'no_links_please_anti_spam_uninstall', false, basename( dirname( __FILE__ ) ) . '/languages' ); +} +add_action( 'init', 'no_links_please_anti_spam_load_textdomain' );