This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
msgattrib --translated woocommerce-subscriptions-ro_RO.po -o woocommerce-subscriptions-ro_RO_ONLY_TRANSLATED.po |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'after_setup_theme', 'load_custom_translations'); | |
function load_custom_translations(){ | |
load_child_theme_textdomain( 'woocommerce-bookings', get_stylesheet_directory() . '/translations' ); | |
load_child_theme_textdomain( 'woocommerce-social-login', get_stylesheet_directory() . '/translations' ); | |
} | |
add_filter( 'load_textdomain_mofile', 'filter_custom_translation_paths', 10, 2); | |
/** | |
* Update the path for loading custom translations for plugins |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$role = add_role( 'new_role', 'My new role' ); | |
// Add all your needed roles here and then, don't forget: | |
$role->add_cap( 'unfiltered_html' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
vagrant_dir = File.expand_path(File.dirname(__FILE__)) | |
Vagrant.configure("2") do |config| | |
# Store the current version of Vagrant for use in conditionals when dealing | |
# with possible backward compatible issues. | |
vagrant_version = Vagrant::VERSION.sub(/^v/, '') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div mc:edit="author_name"></div> | |
<div mc:edit="comment_content"></div> | |
Reply to your task using the link below: | |
<div mc:edit="task_link"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define( 'ABC_NEW_COMMENT_EMAIL_MARKER', '|||abcNewComment||' ); | |
add_filter( "comment_notification_text", "abc_comment_notification_text", 10, 2 ); | |
/** | |
* Filter for changing the content of the email notification sent upon new comment. | |
* | |
* This function replaces the original comment email with a prefix + the comment_id. | |
* Later it will be extracted and inserted into Mandrill template as variables by abc_replace_mandrill_template. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// In my case, I had to wait for the Flexslider to load. The slider was added by the theme, not by my code, so I could not subscribe to the start callback event | |
jQuery("document").ready(function() { | |
waitForSlider(); | |
}); | |
function waitForSlider() { | |
// Test if slider is visible, i.e. loaded | |
if (jQuery(".wooslider-next").is(":visible")) { | |
// Do your stuff here. Slider is loaded | |
} |