You are here

function xmlsitemap_link_load_multiple in XML sitemap 7.2

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

Load sitemap links from the database.

Parameters

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

Return value

array 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
Test Custom Links.
XMLSitemapNodeFunctionalTest::testTypeSettings in xmlsitemap_node/xmlsitemap_node.test
Test the content type settings.
XMLSitemapTestHelper::assertNoSitemapLink in ./xmlsitemap.test
Assert No Sitemap Link.
XMLSitemapTestHelper::assertSitemapLink in ./xmlsitemap.test
Assert Sitemap Link.

... See full list

File

./xmlsitemap.module, line 599
xmlsitemap XML sitemap

Code

function xmlsitemap_link_load_multiple(array $conditions = array()) {
  $query = db_select('xmlsitemap');
  $query
    ->fields('xmlsitemap');
  foreach ($conditions as $field => $value) {
    $query
      ->condition($field, $value);
  }
  $links = $query
    ->execute()
    ->fetchAll(PDO::FETCH_ASSOC);
  return $links;
}