-
-
Save ambdk/bd126e2ddd97cb0a5361488f8f45fea8 to your computer and use it in GitHub Desktop.
Revisions
-
ambdk revised this gist
Aug 30, 2020 . 1 changed file with 24 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -25,4 +25,27 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ // Start writing code after this line! /** * Change flags folder path for certain languages. * * Add the language codes you wish to replace in the list below. * Make sure you place your desired flags in a folder called "flags" next to this file. * Make sure the file names for the flags are identical with the ones in the original folder located at 'plugins/translatepress/assets/images/flags/'. * If you wish to change the file names, use filter trp_flag_file_name . * */ add_filter( 'trp_flags_path', 'trpc_flags_path', 10, 2 ); function trpc_flags_path( $original_flags_path, $language_code ){ // only change the folder path for the following languages: $languages_with_custom_flags = array( 'en_US', 'es_ES' ); if ( in_array( $language_code, $languages_with_custom_flags ) ) { return plugin_dir_url( __FILE__ ) . '/flags/' ; }else{ return $original_flags_path; } } -
sareiodata created this gist
Jul 2, 2014 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,28 @@ <?php /** * Plugin Name: Name Of The Plugin * Plugin URI: http://URI_Of_Page_Describing_Plugin_and_Updates * Description: A brief description of the Plugin. * Version: The Plugin's Version Number, e.g.: 1.0 * Author: Name Of The Plugin Author * Author URI: http://URI_Of_The_Plugin_Author * License: A "Slug" license name e.g. GPL2 */ /* Copyright YEAR PLUGIN_AUTHOR_NAME (email : PLUGIN AUTHOR EMAIL) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ // Start writing code after this line!