Skip to content

Instantly share code, notes, and snippets.

View fxbenard's full-sized avatar
🏠
Working from home

FX Bénard fxbenard

🏠
Working from home
View GitHub Profile
@fxbenard
fxbenard / .config
Last active November 9, 2016 14:49
The config template file for the Transifex client for WordPress projects
[main]
host = https://www.transifex.com
[project_slug.pot_slug]
file_filter = languages/pot_slug-<lang>.po
source_file = languages/pot_slug.pot
source_lang = en_US
type = PO
@fxbenard
fxbenard / I-luv-my-sprintf.php
Last active December 25, 2015 16:39
With and without WP function sprintf
sprintf( __( 'If you like my plugin, please <a href="%s">give it a good rating and leave a review</a>.','yourtextdomain'),
esc_url( 'http://wordpress.org/support/view/plugin-reviews/myplugin" target="blank' ) ) )
@fxbenard
fxbenard / oembed test
Last active December 22, 2015 21:39
Test of oembed in WordPress
$ tx init
Creating .tx folder...
Transifex instance [https://www.transifex.com]:
Creating skeleton...
Creating config file...
No configuration file found.
No entry found for host https://www.transifex.com. Creating...
Please enter your transifex username: user
Password: <...>
Updating /home/username/.transifexrc file...
@fxbenard
fxbenard / class.php
Created September 27, 2012 14:39
How to make it i18n without error ?
private $defaultCapabilities = array(
'connections_view_dashboard' => 'View Dashboard',
'connections_manage' => 'View List (Manage)',
'connections_add_entry' => 'Add Entry',
'connections_add_entry_moderated' => 'Add Entry Moderated',
'connections_edit_entry' => 'Edit Entry',
'connections_edit_entry_moderated' => 'Edit Entry Moderated',
'connections_delete_entry' => 'Delete Entry',
'connections_view_public' => 'View Public Entries',
'connections_view_private' => 'View Private Entries',
@fxbenard
fxbenard / functions.php
Created June 26, 2012 19:31
my child functions.php
/* Do theme setup on the 'after_setup_theme' hook. */
add_action( 'after_setup_theme', 'cascade_child_theme_setup', 11 );
/**
* Theme setup function. This function adds support for theme features and defines the default theme
* actions and filters.
*
* @since 0.1.0
*/
function cascade_child_theme_setup() {