Tag Info

New answers tagged

1

wp_schedule_event can not be used for PRECISE time measurements as you are trying to do. An event scheduled with wp_schedule_event rarely runs exactly when it is scheduled to run, it runs sometime after the time which it has been configured for. To understand this, you must understand that php doesn't know what time it is until you ask it to look. Wordpress ...


0

I am vaguely aware that it has something to do with the way Wordpress is initialized. I know WPLANG can't be changed on the fly. It's how PHP works: You can't change an already defined constant. But there're filters for that. The following plugin is a sketch that you could use and try to see if this direction fits your needs. <?php defined( ...


2

Installing languages in WordPress Skeleton is pretty much the same as in a standard WP install. All WP-Skeleton does is alters the paths to accommodate WP as a Git submodule. This means instead of installing languages files under wp-content/languages or wp-includes/languages, you need to place them in content/languages. Basically, all you need to do is: ...


0

You can call load_plugin_textdomain() multiple times in each plugin, but I would not do that. Put the common files into a separate plugin, for example luke-carbis-library. In that plugin create two simple functions for setup and loading extra files: add_action( 'plugins_loaded', 'lcl_init' ); function lcl_init() { $dir = plugin_dir_path( __FILE__ ); ...


8

Use the fourth parameter for get_post_time(): $time = get_post_time( 'F j, Y', // format TRUE, // GMT get_the_ID(), // Post ID TRUE // translate, use date_i18n() ); get_post_time() calls mysql2date() internally, and it passes the $translate argument through. In mysql2date() we find this: if ( $translate ) ...



Top 50 recent answers are included