__('Tag it', 'p2'), 'goto_homepage' => __('Go to homepage', 'p2'), // the number is calculated in the javascript in a complex way, so we can't use ngettext 'n_new_updates' => __('%d new update(s)', 'p2'), 'n_new_comments' => __('%d new comment(s)', 'p2'), 'jump_to_top' => __('Jump to top', 'p2'), 'not_posted_error' => __('An error has occured, your post was not posted', 'p2'), 'update_posted' => __('You update has been posted', 'p2'), 'loading' => __('Loading...', 'p2'), 'cancel' => __('Cancel', 'p2'), 'save' => __('Save', 'p2'), 'hide_threads' => __('Hide threads', 'p2'), 'show_threads' => __('Show threads', 'p2'), 'unsaved_changes' => __('Your comments or posts will be lost if you continue.', 'p2'), 'date_time_format' => __('%1$s on %2$s', 'p2'), 'date_format' => get_option('date_format'), 'time_format' => get_option('time_format'), // if we don't convert the entities to characters, we can't get < and > inside 'l10n_print_after' => 'try{convertEntities(p2txt);}catch(e){};', )); wp_enqueue_script( 'scrollit', P2_JS_URL .'/jquery.scrollTo-min.js', array( 'jquery' ) ); wp_enqueue_script( 'wp-locale', P2_JS_URL . '/wp-locale.js', array(), filemtime(P2_JS_PATH . '/wp-locale.js') ); // the localization functinality can't handle objects, that's why // we are using poor man's hash maps here -- using prefixes of the variable names $wp_locale_txt = array(); foreach( $wp_locale->month as $key => $month ) $wp_locale_txt["month_$key"] = $month; $i = 1; foreach( $wp_locale->month_abbrev as $key => $month ) $wp_locale_txt["monthabbrev_".sprintf('%02d', $i++)] = $month; foreach( $wp_locale->weekday as $key => $day ) $wp_locale_txt["weekday_$key"] = $day; $i = 1; foreach( $wp_locale->weekday_abbrev as $key => $day ) $wp_locale_txt["weekdayabbrev_".sprintf('%02d', $i++)] = $day; wp_localize_script( 'wp-locale', 'wp_locale_txt', $wp_locale_txt); } function print_options() { get_currentuserinfo(); $page_options['nonce']= wp_create_nonce( 'ajaxnonce' ); $page_options['prologue_updates'] = 1; $page_options['prologue_comments_updates'] = 1; $page_options['prologue_tagsuggest'] = 1; $page_options['prologue_inlineedit'] = 1; $page_options['prologue_comments_inlineedit'] = 1; $page_options['is_single'] = (int)is_single(); $page_options['is_page'] = (int)is_page(); $page_options['is_front_page'] = (int)is_front_page(); $page_options['is_first_front_page'] = (int)(is_front_page() && !is_paged() ); $page_options['is_user_logged_in'] = (int)is_user_logged_in(); $page_options['login_url'] = wp_login_url( ( ( !empty($_SERVER['HTTPS'] ) && strtolower($_SERVER['HTTPS']) == 'on' ) ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] ); ?>