get_locale_stylesheet_uri

Definition:
function get_locale_stylesheet_uri() {}

Retrieve localized stylesheet URI.
The stylesheet directory for the localized stylesheet files are located, by default, in the base theme directory. The name of the locale file will be the locale followed by ‘.css’. If that does not exist, then the text direction stylesheet will be checked for existence, for example ‘ltr.css’.

Source code

function get_locale_stylesheet_uri() {

	global $wp_locale;

	$stylesheet_dir_uri = get_stylesheet_directory_uri();

	$dir = get_stylesheet_directory();

	$locale = get_locale();

	if ( file_exists("$dir/$locale.css") )

		$stylesheet_uri = "$stylesheet_dir_uri/$locale.css";

	elseif ( !empty($wp_locale->text_direction) && file_exists("$dir/{$wp_locale->text_direction}.css") )

1474

get_locale

Definition:
function get_locale() {}

Gets the current locale.
If the locale is set, then it will filter the locale in the ‘locale’ filter hook and return the value.

Return values

returns:The locale of the blog or from the ‘locale’ hook.

Defined filters

  • locale
    apply_filters( 'locale', $locale )
  • locale
    apply_filters( 'locale', $locale )

Source code

function get_locale() {

	global $locale;



	if ( isset( $locale ) )

		return apply_filters( 'locale', $locale );



	// WPLANG is defined in wp-config.

	if ( defined( 'WPLANG' ) )

		$locale = WPLANG;



	// If multisite, check options.

	if ( is_multisite() ) {

		// Don't check blog option when installing.

		if ( defined( 'WP_INSTALLING' ) || ( false === $ms_locale = get_option( 'WPLANG' ) ) )

			$ms_locale = get_site_option('WPLANG');



		if ( $ms_locale !== false )

			$locale = $ms_locale;

	}



	if ( empty( $locale ) )

		$locale = 'en_US';



	return apply_filters( 'locale', $locale );

}

1472

get_link_to_edit

Definition:
function get_link_to_edit( $link_id ) {}

Retrieve link data based on ID.

Parameters

  • int $link_id: ID of link to retrieve

Return values

returns:for editing

Source code

function get_link_to_edit( $link_id ) {

	return get_bookmark( $link_id, OBJECT, 'edit' );

}

1468

get_links_withrating

Definition:
function get_links_withrating($category = -1, $before = '', $after = '<br />', $between = " ", $show_images = true,

Gets the links associated with category n and display rating stars/chars.

Parameters

  • int $category: The category to use. If no category supplied uses all
  • string $before: The html to output before the link
  • string $after: The html to output after the link
  • string $between: The html to output between the link/image and it’s description. Not used if no image or show_images == true
  • bool $show_images: Whether to show images (if defined).
  • string $orderby: The order to output the links. E.g. ‘id’, ‘name’, ‘url’, ‘description’, or ‘rating’. Or maybe owner. If you start the name with an underscore the order will be reversed. You can also specify ‘rand’ as the order which will return links in a random order.
  • bool $show_description: Whether to show the description if show_images=false/not defined.
  • string $limit: Limit to X entries. If not specified, all entries are shown.
  • int $show_updated: Whether to show last updated timestamp

Source code

function get_links_withrating($category = -1, $before = '', $after = '<br />', $between = " ", $show_images = true,

							  $orderby = 'id', $show_description = true, $limit = -1, $show_updated = 0) {

	_deprecated_function( __FUNCTION__, '2.1', 'get_bookmarks()' );



	get_links($category, $before, $after, $between, $show_images, $orderby, $show_description, true, $limit, $show_updated);

}

1466

get_links_list

Definition:
function get_links_list($order = 'name') {}

Output entire list of links by category.
Output a list of all links, listed by category, using the settings in $wpdb->linkcategories and output it as a nested HTML unordered list.

Parameters

  • string $order: Sort link categories by ‘name’ or ‘id’

Defined filters

  • link_category
    apply_filters('link_category', $cat->name )

Source code

function get_links_list($order = 'name') {

	_deprecated_function( __FUNCTION__, '2.1', 'wp_list_bookmarks()' );



	$order = strtolower($order);



	// Handle link category sorting

	$direction = 'ASC';

	if ( '_' == substr($order,0,1) ) {

		$direction = 'DESC';

		$order = substr($order,1);

	}



	if ( !isset($direction) )

		$direction = '';



	$cats = get_categories(array('type' => 'link', 'orderby' => $order, 'order' => $direction, 'hierarchical' => 0));



	// Display each category

	if ( $cats ) {

		foreach ( (array) $cats as $cat ) {

			// Handle each category.



			// Display the category name

			echo '  <li id="linkcat-' . $cat->term_id . '" class="linkcat"><h2>' . apply_filters('link_category', $cat->name ) . "</h2>\n\t<ul>\n";

			// Call get_links() with all the appropriate params

			get_links($cat->term_id, '<li>', "</li>", "\n", true, 'name', false);



			// Close the last category

			echo "\n\t</ul>\n</li>\n";

		}

	}

}

1464