You are here

function xmlsitemap_link_load_multiple in XML sitemap 6.2

Same name and namespace in other branches
  1. 7.2 xmlsitemap.module \xmlsitemap_link_load_multiple()

Load sitemap links from the database.

Parameters

$conditions: An array of conditions on the {xmlsitemap} table in the form 'field' => $value.

Return value

An array of sitemap link arrays.

Related topics

6 calls to xmlsitemap_link_load_multiple()
XMLSitemapCustomFunctionalTest::testCustomFileLinks in xmlsitemap_custom/xmlsitemap_custom.test
Test adding files as custom links.
XMLSitemapCustomFunctionalTest::testCustomLinks in xmlsitemap_custom/xmlsitemap_custom.test
XMLSitemapNodeFunctionalTest::testTypeSettings in xmlsitemap_node/xmlsitemap_node.test
Test the content type settings.
XMLSitemapTestHelper::assertNoSitemapLink in ./xmlsitemap.test
XMLSitemapTestHelper::assertSitemapLink in ./xmlsitemap.test

... See full list

File

./xmlsitemap.module, line 544
Main file for the xmlsitemap module.

Code

function xmlsitemap_link_load_multiple(array $conditions = array()) {
  $links = array();
  module_load_include('inc', 'xmlsitemap');
  $args = _xmlsitemap_build_conditions($conditions);
  $query = db_query("SELECT * FROM {xmlsitemap} WHERE " . implode(' AND ', $conditions), $args);
  while ($link = db_fetch_array($query)) {
    $links[] = $link;
  }
  return $links;
}