Repository navigation
Public Functions
Wrapper of Inpsyde_Multilingualpress_Helpers function for function to get the linked elements and display them as a list
/**
* wrapper of Inpsyde_Multilingualpress_Helpers function for function to get the linked elements and display them as a list
*
* @access public
* @since 0.8
* @param mixed param array
*/
function mlp_show_linked_elements( $args )Parameters
- link_text
- Available values
- text - only show the name of the language (default)
- flag - display the flag of the language
- text_flag - display name of the language and the flag of the language
- Available values
- echo
- Available values
- TRUE - Output the HTML (default)
- FALSE - Return the HTML
- Available values
- sort
- Available values
- blogid - use the blogid to sort (default)
- name - use the language name to sort
- Available values
- show_current_blog
- Available values
- TRUE - display the current language
- FALSE - hide the current language (default)
- Available values
Example
Output of mlp_show_linked_elements( array( 'link_text' => 'flag', 'show_current_blog' => TRUE ) );
<div class="mlp_language_box">
<ul>
<li><a href="http://example.org/blog2?noredirect=en"><img title="en" alt="en" src="http://example.org/wp-content/plugins/multilingual-press/flags/us.gif"></a></li>
<li class="current"><a href="http://example.org/blog3?noredirect=de"><img title="de" alt="de" src="http://example.org/wp-content/plugins/multilingual-press/flags/de.gif" id="mlp_current_locale">de</a></li>
</ul>
</div>Wrapper of internal inpsyde_multilingualpress:get_available_languages
/**
* wrapper of internal inpsyde_multilingualpress:get_available_languages
* load the available languages
*
* @access public
* @since 0.1
* @return array Available languages
*/
mlp_get_available_languages()Wrapper of internal inpsyde_multilingualpress:: get_available_language_title
/**
* wrapper of internal inpsyde_multilingualpress:: get_available_language_title
* load the available language titles
*
* @access public
* @since 0.5.3b
* @return array Available languages
*/
mlp_get_available_languages_titles()
Wrapper of internal inpsyde_multilingualpress function to get the element ID in other blogs for the selected element
/**
* wrapper of internal inpsyde_multilingualpress function to get the element ID in other blogs for the selected element
*
* @access public
* @since 0.1
* @param int $element_id ID of the selected element
* @param string $type type of the selected element
* @param int $blog_id ID of the selected blog
* @return array linked elements
*/
mlp_get_linked_elements( $element_id, $type = '', $blog_id = 0 )
Return an Array with Blog_ID => Post_ID Example:
array
2 => int 48 (length=2)
5 => int 10 (length=2)
Wrapper of internal inpsyde_multilingualpress function for custom plugins to get activated on all language blogs
/**
* wrapper of internal inpsyde_multilingualpress function for custom plugins to get activated on all language blogs
*
* @access public
* @since 0.1
* @param int $element_id ID of the selected element
* @param string $type type of the selected element
* @param int $blog_id ID of the selected blog
* @param string $hook name of the hook that will be executed
* @param array $param parameters for the function
* @return array linked elements
*/
mlp_run_custom_plugin( $element_id, $type = '', $blog_id = 0, $hook, $param )
Wrapper of internal inpsyde_multilingualpress function for function to get the url of the flag from a blogid
/**
* wrapper of internal inpsyde_multilingualpress function for function to get the url of the flag from a blogid
* @access public
* @since 0.1
* @param int $blog_id ID of a blog
* @return string url of the language image
*/
mlp_get_language_flag( $blog_id = 0 )