Skip to content

Commit

Permalink
Update config menu location for metatag module.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jen Lampton committed Jan 19, 2017
1 parent a0dd4e3 commit 7571220
Show file tree
Hide file tree
Showing 33 changed files with 95 additions and 77 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ Installation
meta tags on each individual page (node, term, etc).

- The main administrative page ("Administer >> Configuration >> Search and
metadata >> Metatag" or admin/config/search/metatags) controls the site-wide
metadata >> Metatag" or admin/config/metadata/metatags) controls the site-wide
defaults. Global settings, Home page settings, and specific defaults for
different kinds of content are defined here.

- The list of configured sets of metatags may be controlled from the Settings
page ("Administer >> Configuration >> Search and metadata >> Settings" or
admin/config/search/metatags/settings)
admin/config/metadata/metatags/settings)

- In order to provide a specific configuration per content type, vocabulary,
etc, click "Add default meta tags".
Expand Down
26 changes: 13 additions & 13 deletions metatag.admin.inc
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function metatag_config_overview() {
if (metatag_config_access('edit', $config)) {
$operations['edit'] = array(
'title' => t('Edit'),
'href' => 'admin/config/search/metatags/config/' . $config['instance'],
'href' => 'admin/config/metadata/metatags/config/' . $config['instance'],
);
if ($config['storage'] == METATAG_STORAGE_DEFAULT) {
$operations['edit']['title'] = t('Override');
Expand All @@ -115,7 +115,7 @@ function metatag_config_overview() {
if (metatag_config_access('enable', $config)) {
$operations['enable'] = array(
'title' => t('Enable'),
'href' => 'admin/config/search/metatags/config/' . $config['instance'] . '/enable',
'href' => 'admin/config/metadata/metatags/config/' . $config['instance'] . '/enable',
'query' => array(
'token' => backdrop_get_token('enable-' . $config['instance']),
) + backdrop_get_destination(),
Expand All @@ -124,7 +124,7 @@ function metatag_config_overview() {
if (metatag_config_access('disable', $config)) {
$operations['disable'] = array(
'title' => t('Disable'),
'href' => 'admin/config/search/metatags/config/' . $config['instance'] . '/disable',
'href' => 'admin/config/metadata/metatags/config/' . $config['instance'] . '/disable',
'query' => array(
'token' => backdrop_get_token('disable-' . $config['instance']),
) + backdrop_get_destination(),
Expand All @@ -133,19 +133,19 @@ function metatag_config_overview() {
if (metatag_config_access('revert', $config)) {
$operations['revert'] = array(
'title' => t('Revert'),
'href' => 'admin/config/search/metatags/config/' . $config['instance'] . '/revert',
'href' => 'admin/config/metadata/metatags/config/' . $config['instance'] . '/revert',
);
}
if (metatag_config_access('delete', $config)) {
$operations['delete'] = array(
'title' => t('Delete'),
'href' => 'admin/config/search/metatags/config/' . $config['instance'] . '/delete',
'href' => 'admin/config/metadata/metatags/config/' . $config['instance'] . '/delete',
);
}
if (module_exists('i18n_string') && !$settings->get('i18n_disabled', FALSE)) {
$operations['translate'] = array(
'title' => t('Translate'),
'href' => 'admin/config/search/metatags/config/' . $config['instance'] . '/translate',
'href' => 'admin/config/metadata/metatags/config/' . $config['instance'] . '/translate',
);
}
$row['data']['operations'] = array(
Expand All @@ -158,7 +158,7 @@ function metatag_config_overview() {
$rows[$config['instance']] = $row;
}

$suffix = '<small>' . t('Items marked as "Unknown" will not be used. They are likely for types of pages that have been deleted or disabled on the <a href="@url">Settings page</a>.', array('@url' => url('admin/config/search/metatags/settings'))) . '</small>';
$suffix = '<small>' . t('Items marked as "Unknown" will not be used. They are likely for types of pages that have been deleted or disabled on the <a href="@url">Settings page</a>.', array('@url' => url('admin/config/metadata/metatags/settings'))) . '</small>';

$build['config_table'] = array(
'#theme' => 'table',
Expand Down Expand Up @@ -240,7 +240,7 @@ function metatag_config_add_form($form, &$form_state) {
$form['actions']['cancel'] = array(
'#type' => 'link',
'#title' => t('Cancel'),
'#href' => isset($_GET['destination']) ? $_GET['destination'] : 'admin/config/search/metatags',
'#href' => isset($_GET['destination']) ? $_GET['destination'] : 'admin/config/metadata/metatags',
);

return $form;
Expand All @@ -250,7 +250,7 @@ function metatag_config_add_form_submit($form, &$form_state) {
form_state_values_clean($form_state);
$config = $form_state['values'];
metatag_config_save($config);
$form_state['redirect'] = 'admin/config/search/metatags/config/' . $config['instance'];
$form_state['redirect'] = 'admin/config/metadata/metatags/config/' . $config['instance'];
}

function metatag_config_edit_form($form, &$form_state, $config) {
Expand Down Expand Up @@ -299,7 +299,7 @@ function metatag_config_edit_form($form, &$form_state, $config) {
$form['actions']['cancel'] = array(
'#type' => 'link',
'#title' => t('Cancel'),
'#href' => isset($_GET['destination']) ? $_GET['destination'] : 'admin/config/search/metatags',
'#href' => isset($_GET['destination']) ? $_GET['destination'] : 'admin/config/metadata/metatags',
);

$form['#submit'][] = 'metatag_config_edit_form_submit';
Expand All @@ -317,7 +317,7 @@ function metatag_config_edit_form_submit($form, &$form_state) {
$label = metatag_config_instance_label($config['instance']);
backdrop_set_message(t('The meta tag defaults for @label have been saved.', array('@label' => $label)));

$form_state['redirect'] = 'admin/config/search/metatags';
$form_state['redirect'] = 'admin/config/metadata/metatags';
}

function metatag_config_enable($data) {
Expand Down Expand Up @@ -367,7 +367,7 @@ function metatag_config_delete_form($form, &$form_state, $config) {
return confirm_form(
$form,
$title,
'admin/config/search/metatags',
'admin/config/metadata/metatags',
t('This action cannot be undone.')
);
}
Expand All @@ -386,7 +386,7 @@ function metatag_config_delete_form_submit($form, &$form_state) {
$title = t('The meta tag defaults for @label have been reverted.', array('@label' => $label));
}

$form_state['redirect'] = 'admin/config/search/metatags';
$form_state['redirect'] = 'admin/config/metadata/metatags';
}

/**
Expand Down
6 changes: 3 additions & 3 deletions metatag.i18n.inc
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ function metatag_i18n_object_info() {
'%instance' => 'instance',
),
// To produce edit links automatically.
'edit path' => 'admin/config/search/metatags/config/%instance',
'edit path' => 'admin/config/metadata/metatags/config/%instance',
// Auto-generate a 'translate' tab.
'translate tab' => 'admin/config/search/metatags/config/%instance/translate',
'translate tab' => 'admin/config/metadata/metatags/config/%instance/translate',

// Properties for string translation.
'string translation' => array(
Expand All @@ -103,7 +103,7 @@ function metatag_i18n_object_info() {
// Translatable properties of these objects.
'properties' => $config_properties,
// The path to translate individual strings.
'translate path' => 'admin/config/search/metatags/config/%instance/translate/%i18n_language',
'translate path' => 'admin/config/metadata/metatags/config/%instance/translate/%i18n_language',
),
);

Expand Down
2 changes: 1 addition & 1 deletion metatag.info
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description = Adds support and an API to implement meta tags.
package = SEO
backdrop = 1.x

configure = admin/config/search/metatags
configure = admin/config/metadata/metatags

; The custom Bulk Revert functionality.
files[] = tests/metatag.bulk_revert.test
Expand Down
26 changes: 13 additions & 13 deletions metatag.module
Original file line number Diff line number Diff line change
Expand Up @@ -109,19 +109,19 @@ function metatag_permission() {
* Implements hook_menu().
*/
function metatag_menu() {
$items['admin/config/search/metatags'] = array(
$items['admin/config/metadata/metatags'] = array(
'title' => 'Metatag',
'description' => 'Configure Metatag defaults.',
'page callback' => 'metatag_config_overview',
'access arguments' => array('administer meta tags'),
'file' => 'metatag.admin.inc',
);
$items['admin/config/search/metatags/config'] = array(
$items['admin/config/metadata/metatags/config'] = array(
'title' => 'Defaults',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10,
);
$items['admin/config/search/metatags/settings'] = array(
$items['admin/config/metadata/metatags/settings'] = array(
'title' => 'Settings',
'page callback' => 'backdrop_get_form',
'page arguments' => array('metatag_admin_settings_form'),
Expand All @@ -130,7 +130,7 @@ function metatag_menu() {
'weight' => 30,
'file' => 'metatag.admin.inc',
);
$items['admin/config/search/metatags/bulk-revert'] = array(
$items['admin/config/metadata/metatags/bulk-revert'] = array(
'title' => 'Bulk revert',
'page callback' => 'backdrop_get_form',
'page arguments' => array('metatag_bulk_revert_form'),
Expand All @@ -140,52 +140,52 @@ function metatag_menu() {
'file' => 'metatag.admin.inc',
);

$items['admin/config/search/metatags/config/add'] = array(
$items['admin/config/metadata/metatags/config/add'] = array(
'title' => 'Add default meta tags',
'page callback' => 'backdrop_get_form',
'page arguments' => array('metatag_config_add_form'),
'access arguments' => array('administer meta tags'),
'file' => 'metatag.admin.inc',
'type' => MENU_LOCAL_ACTION,
);
$items['admin/config/search/metatags/config/%metatag_config'] = array(
$items['admin/config/metadata/metatags/config/%metatag_config'] = array(
'title callback' => 'metatag_config_title',
'title arguments' => array(5),
'page callback' => 'backdrop_get_form',
'page arguments' => array('metatag_config_edit_form', 5),
'access arguments' => array('administer meta tags'),
'file' => 'metatag.admin.inc',
);
$items['admin/config/search/metatags/config/%metatag_config/edit'] = array(
$items['admin/config/metadata/metatags/config/%metatag_config/edit'] = array(
'title' => 'Edit',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10,
);
$items['admin/config/search/metatags/config/%metatag_config/enable'] = array(
$items['admin/config/metadata/metatags/config/%metatag_config/enable'] = array(
'title' => 'Enable',
'page callback' => 'metatag_config_enable',
'page arguments' => array(5),
'access callback' => 'metatag_config_access',
'access arguments' => array('enable', 5),
'file' => 'metatag.admin.inc',
);
$items['admin/config/search/metatags/config/%metatag_config/disable'] = array(
$items['admin/config/metadata/metatags/config/%metatag_config/disable'] = array(
'title' => 'Disable',
'page callback' => 'metatag_config_disable',
'page arguments' => array(5),
'access callback' => 'metatag_config_access',
'access arguments' => array('disable', 5),
'file' => 'metatag.admin.inc',
);
$items['admin/config/search/metatags/config/%metatag_config/revert'] = array(
$items['admin/config/metadata/metatags/config/%metatag_config/revert'] = array(
'title' => 'Revert',
'page callback' => 'backdrop_get_form',
'page arguments' => array('metatag_config_delete_form', 5),
'access callback' => 'metatag_config_access',
'access arguments' => array('revert', 5),
'file' => 'metatag.admin.inc',
);
$items['admin/config/search/metatags/config/%metatag_config/delete'] = array(
$items['admin/config/metadata/metatags/config/%metatag_config/delete'] = array(
'title' => 'Delete',
'page callback' => 'backdrop_get_form',
'page arguments' => array('metatag_config_delete_form', 5),
Expand All @@ -201,14 +201,14 @@ function metatag_menu() {
// these pages on the config pages *do* check the setting, which is close
// enough.
if (module_exists('i18n_string')) {
$items['admin/config/search/metatags/config/%metatag_config/translate'] = array(
$items['admin/config/metadata/metatags/config/%metatag_config/translate'] = array(
'title' => 'Translate',
'access arguments' => array('administer meta tags'),
'page callback' => 'i18n_string_object_translate_page',
'page arguments' => array('metatag_config', 5),
'type' => MENU_LOCAL_TASK,
);
$items['admin/config/search/metatags/config/%metatag_config/translate/%i18n_language'] = array(
$items['admin/config/metadata/metatags/config/%metatag_config/translate/%i18n_language'] = array(
'title' => 'Translate',
'access arguments' => array('administer meta tags'),
'page callback' => 'i18n_string_object_translate_page',
Expand Down
2 changes: 1 addition & 1 deletion metatag_app_links/tests/metatag_app_links.test
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class MetatagAppLinksTest extends MetatagTestHelper {
* Confirm that it's possible to load the main admin page.
*/
public function testAdminPage() {
$this->drupalGet('admin/config/search/metatags');
$this->drupalGet('admin/config/metadata/metatags');
$this->assertResponse(200);

// Confirm the page is correct.
Expand Down
2 changes: 1 addition & 1 deletion metatag_dc/tests/metatag_dc.test
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class MetatagDcTest extends MetatagTestHelper {
* Confirm that it's possible to load the main admin page.
*/
public function testAdminPage() {
$this->drupalGet('admin/config/search/metatags');
$this->drupalGet('admin/config/metadata/metatags');
$this->assertResponse(200);

// Confirm the page is correct.
Expand Down
2 changes: 1 addition & 1 deletion metatag_dc_advanced/tests/metatag_dc_advanced.test
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class MetatagDcAdvancedTest extends MetatagTestHelper {
* Confirm that it's possible to load the main admin page.
*/
public function testAdminPage() {
$this->drupalGet('admin/config/search/metatags');
$this->drupalGet('admin/config/metadata/metatags');
$this->assertResponse(200);

// Confirm the page is correct.
Expand Down
2 changes: 1 addition & 1 deletion metatag_devel/tests/metatag_devel.test
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class MetatagDevelest extends MetatagTestHelper {
* Confirm that it's possible to load the main admin page.
*/
public function testAdminPage() {
$this->backdropGet('admin/config/search/metatags');
$this->backdropGet('admin/config/metadata/metatags');
$this->assertResponse(200);

// Confirm the page is correct.
Expand Down
2 changes: 1 addition & 1 deletion metatag_facebook/tests/metatag_facebook.test
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class MetatagFacebookTest extends MetatagTestHelper {
* Confirm that it's possible to load the main admin page.
*/
public function testAdminPage() {
$this->drupalGet('admin/config/search/metatags');
$this->drupalGet('admin/config/metadata/metatags');
$this->assertResponse(200);

// Confirm the page is correct.
Expand Down
4 changes: 2 additions & 2 deletions metatag_favicons/tests/metatag_favicons.test
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class MetatagFaviconsTest extends MetatagTestHelper {
* Confirm that it's possible to load the main admin page.
*/
public function testAdminPage() {
$this->drupalGet('admin/config/search/metatags');
$this->drupalGet('admin/config/metadata/metatags');
$this->assertResponse(200);

// Confirm the page is correct.
Expand All @@ -61,7 +61,7 @@ class MetatagFaviconsTest extends MetatagTestHelper {
metatag_config_save($config);

// Load the config page.
$this->drupalGet('admin/config/search/metatags');
$this->drupalGet('admin/config/metadata/metatags');
$this->assertResponse(200);

// Confirm the meta tag's value is on the page.
Expand Down
2 changes: 1 addition & 1 deletion metatag_google_plus/tests/metatag_google_plus.test
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class MetatagGooglePlusTest extends MetatagTestHelper {
* Confirm that it's possible to load the main admin page.
*/
public function testAdminPage() {
$this->drupalGet('admin/config/search/metatags');
$this->drupalGet('admin/config/metadata/metatags');
$this->assertResponse(200);

// Confirm the page is correct.
Expand Down
2 changes: 1 addition & 1 deletion metatag_hreflang/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Configuration
removed. It is possible to change this so that the meta tag is not removed
by enabling the "Allow hreflang tag that matches the x-default tag" option
on the main Metatag settings page:
admin/config/search/metatags/settings
admin/config/metadata/metatags/settings


Credits / Contact
Expand Down
2 changes: 1 addition & 1 deletion metatag_hreflang/tests/metatag_hreflang.test
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class MetatagHreflangTest extends MetatagTestHelper {
* Confirm that it's possible to load the main admin page.
*/
public function testAdminPage() {
$this->drupalGet('admin/config/search/metatags');
$this->drupalGet('admin/config/metadata/metatags');
$this->assertResponse(200);

// Confirm the page is correct.
Expand Down
2 changes: 1 addition & 1 deletion metatag_importer/README.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Metatag: Importer
-----------------
This module imports data from other modules. An administrative interface is
provided (admin/config/search/metatags/importer), as well as a series of Drush
provided (admin/config/metadata/metatags/importer), as well as a series of Drush
commands:
* metatag-convert-page-title - Convert data from the Page Title module.

Expand Down
Loading

0 comments on commit 7571220

Please sign in to comment.