메소드 |
설명 |
|
__construct ( ) |
Plugin setup |
|
add_custom_columns ( array $columns ) : array |
Adds new columns on the administrative post listing |
|
add_language_into_url_via_redirect ( ) |
Redirects to the current URL but with the language in it |
|
add_language_to_post_link ( string $url, object | integer $post ) : string |
Adds a language slug into the URL (after the site's root, before the relative URL) |
|
add_language_to_url ( string $url, string $language_slug = null ) : string |
Adds a language slug into a URL (after the site's root, before the relative URL) |
|
add_meta_boxes ( ) |
Meta box manipulation for the write screens |
|
cancel_redirect_to_self ( string $redirect_url ) : string | false |
At times redirect_canonical() will attempt to redirect from the URL it thinks it's at to
the URL that is actually in the address bar. This function prevents those redirect loops. |
|
change_locale ( string $locale ) : string |
Changes the locale setting based on the current post language being displayed |
|
create_new_language_term ( string $name, string $slug ) : array | false |
Creates a new language term. This plugin's term slugs are prefixed to avoid collisions, so this function just makes life easier. |
|
debug_query ( string $query ) : string |
Output some text for debugging queries |
|
debug_var_dump ( mixed $var ) : mixed |
var_dump() the passed variable. Used for debugging filters. |
|
debug_wp_redirect ( string $redirect_to ) : string | null |
Output some text about where a redirect attempt was made to for debugging purposes |
|
do_url_hackery ( ) |
Takes care of all of the URL hackery |
|
filter_by_language_dropdown ( ) |
Adds an additional filter dropdown for language to the manage posts page in the admin area |
|
get_post_language ( integer $post_ID ) : object | false |
Get the language of a post ID |
|
get_tax_sql_cached ( $post_table_name, $type ) |
*
A caching wrapper for get_tax_sql() |
|
get_term ( $value ) : mixed |
Fetches a taxonomy term by it's slug or ID. This plugin's term slugs are prefixed to avoid collisions, so this function just makes life easier. |
|
get_translations ( integer $post_ID ) : array | false |
Fetches a list of all versions of a post ID |
|
join_in_taxonomy_table ( string $join, string $post_table_name = null ) : string |
Modifies a query by JOIN'ing in the taxonomy tables, but only if needed (determined by Internacional::should_modify_query() ) |
|
join_in_taxonomy_table_p ( string $join ) : string |
Modifies a query by JOIN'ing in the taxonomy tables, but only if needed (determined by Internacional::should_modify_query() )
The previous/next post link queries use "p" instead of the actual posts database table name. |
|
language_picker_meta_box ( ) |
Outputs the contents of the language picker meta box for the write screen |
|
limit_where_by_language ( string $where ) : string |
Modifies the WHERE part of a query by limiting the results to the current language |
|
list_translations ( string $content ) : string |
Adds a list of other versions of a post to the end of the passed string (i.e. the_content) |
|
output_custom_columns_content ( $column_name, $post_ID ) |
Outputs the contents of the custom columns |
|
register_setting_section ( ) |
Adds a new section to Settings -> Reading |
|
register_sidebar_widget ( ) |
Registers a sidebar widget |
|
relationship_picker_meta_box ( ) |
Outputs the contents of the relationship picker meta box for the write screen |
|
save_meta_box_results ( $post_ID, $post ) |
Saves the results of the custom meta boxes |
|
settings_field_language ( ) |
Outputs the new settings section for selecting the default language |
|
settings_section ( ) |
Outputs the new settings section for selecting the default language |
|
should_modify_query ( ) : boolean |
A helper function to determine if the database queries should be altered to limit the shown data to a single language |
|
strip_slug_prefix ( string | object $slug ) : string | object |
Strips the prefix out of a slug |
|
wp_loaded ( ) |
Stuff that needs to run a bit later |
|