PluginProbe ʕ •ᴥ•ʔ
Loco Translate / 1.4
Loco Translate v1.4
2.8.5 2.8.4 2.5.8 2.6.0 2.6.1 2.6.10 2.6.11 2.6.12 2.6.13 2.6.14 2.6.2 2.6.3 2.6.4 2.6.5 2.6.6 2.6.7 2.6.8 2.6.9 2.7.0 2.7.1 2.7.2 2.7.3 2.8.0 2.8.1 2.8.2 2.8.3 trunk 1.0.0 1.1.0 1.1.1 1.1.2 1.1.3 1.2 1.2.1 1.2.2 1.3 1.3.1 1.4 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.5 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 2.0.0 2.0.1 2.0.10 2.0.11 2.0.12 2.0.13 2.0.14 2.0.15 2.0.16 2.0.17 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.2.0 2.2.1 2.2.2 2.3.0 2.3.1 2.3.2 2.3.3 2.3.4 2.4.0 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.5.0 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 2.5.7
loco-translate / loco.php
loco-translate Last commit date
languages 12 years ago lib 12 years ago php 12 years ago pub 12 years ago tpl 12 years ago loco.php 12 years ago readme.txt 12 years ago
loco.php
47 lines
1 <?php
2 /*
3 Plugin Name: Loco Translate
4 Plugin URI: http://wordpress.org/extend/plugins/loco-translate
5 Description: Translate Wordpress plugins and themes directly in your browser
6 Author: Tim Whitlock
7 Version: 1.4
8 Author URI: http://localise.biz/help/wordpress/translate-plugin
9 */
10
11
12
13 /**
14 * Include a component from lib subdirectory
15 * @param string $subpath e.g. "loco-admin"
16 * @return mixed value from last included file
17 */
18 function loco_require(){
19 static $dir;
20 isset($dir) or $dir = dirname(__FILE__);
21 $ret = '';
22 foreach( func_get_args() as $subpath ){
23 $ret = require_once $dir.'/lib/'.$subpath.'.php';
24 }
25 return $ret;
26 }
27
28
29
30 // Inialize admin screen
31 if( is_admin() ){
32 loco_require('loco-boot','loco-admin');
33 }
34
35 // else fire up theme functionality for admins
36 else {
37 add_action( 'after_setup_theme', 'loco_after_setup_theme' );
38 function loco_after_setup_theme(){
39 if( is_user_logged_in() ){
40 loco_require('loco-boot');
41 if( current_user_can(Loco::CAPABILITY) ){
42 // @todo font end functionality
43 }
44 }
45 }
46 }
47