Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Fx Bénard fxbenard

🏠
Working from home
Block or report user

Report or block fxbenard

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@fxbenard
fxbenard / EDD Coming Soon Filtre
Last active Aug 29, 2015
Divers filtres pour personnaliser l'extensin EDD Coming Soon
View EDD Coming Soon Filtre
function edd_coming_soon_modify_default_status_text() {
return 'Not long now!';
}
add_filter( 'edd_cs_coming_soon_text', 'edd_coming_soon_modify_default_status_text' );
@fxbenard
fxbenard / woo-load-textdomain-child-theme
Last active Aug 29, 2015
WooThemes load textdomain in child theme my own way
View woo-load-textdomain-child-theme
<?php
/*
* Load my own woo-load-textdomain function
* Thanks to @grabbler for is help
*/
add_action( 'after_setup_theme', 'woo_load_textdomain', 10 );
function woo_load_textdomain(){
$locale = get_locale();
@fxbenard
fxbenard / Translations_Included.md
Last active Oct 28, 2019
A list of all the languages supported by WP-Translations, for devs to add to theirs WordPress plugins/themes readme.txt
View Translations_Included.md

== Translations included ==

Thanks to all the WP-Translations Team Members.

  • العربية (Arabic),
  • 中文 (Chinese (China)),
  • Català (Catalan),
  • Dansk (Danish),
  • Nederlands (België) Dutch (Belgium),
  • Nederlands (Dutch),
View my_plugin_row_meta.php
<?php
/**
* Plugin Row Meta
*
* Adds GitHub and translate links below the plugin description on the plugins page.
* Author: benhuson, tweaked by fxbenard for WP-Translations
* Replace references to 'my-plugin' to reflect your plugin folder and file name.
* Update the GitHub Repo and Translation links.
*
@fxbenard
fxbenard / getrmpomakemo.sh
Created Mar 5, 2014
Pull translations with Transifex client, create the mo and remove the po
View getrmpomakemo.sh
#! /bin/sh
# Pull all files from Transifex;
# Minimum percentage change to whatever you want
tx pull -a --minimum-perc=100
# Create .mo files from .po files.
# Twisted by WP-Translations.org, created by grappler.
for file in `find . -name "*.po"` ; do msgfmt -o ${file/.po/.mo} $file && rm $file ; done
@fxbenard
fxbenard / getpomakemo.sh
Last active Nov 9, 2016
Script to pull translations with Transifex client and create the mo files.
View getpomakemo.sh
#! /bin/sh
# Pull all files;
# Minimum percentage change to whatever you want
tx pull -a --minimum-perc=100
# Create .mo files from .po files.
# Twisted by WP-Translations.org, created by grappler.
for file in `find . -name "*.po"` ; do msgfmt -o ${file/.po/.mo} $file ; done
View potomo.sh
#! /bin/sh
for file in `find . -name "*.po"` ; do msgfmt -o ${file/.po/.mo} $file && rm $file ; done
@fxbenard
fxbenard / Gruntfile.js
Created Jan 4, 2014
Transifex integration into my Gruntfile.js
View Gruntfile.js
var shell = require('shelljs');
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
po2mo: {
files: {
src: 'lang/*.po',
@fxbenard
fxbenard / pulls
Last active Nov 9, 2016
TX Client command lines
View pulls
/* Pull source and language from TX */
$tx pull -s -t
/* Pull languages from TX over a percentage */
$tx pull -a --minimum-perc=number
/* Pull a specific language from TX, eg.French */
$tx pull -l fr_FR
@fxbenard
fxbenard / makepot
Last active Dec 27, 2015
Command line to execute the WordPress i18n tool: makepot.php
View makepot
/* From a command line tool opened in last-svn/tools/i18n */
php makepot.php wp-plugin /path/to/my/plugin-dir plugin-slug.pot
You can’t perform that action at this time.