Skip to content
This repository has been archived by the owner on Sep 25, 2018. It is now read-only.

Add an option to "reset content type names" #18

Open
rudolfbyker opened this issue Nov 28, 2016 · 0 comments
Open

Add an option to "reset content type names" #18

rudolfbyker opened this issue Nov 28, 2016 · 0 comments

Comments

@rudolfbyker
Copy link
Member

On the admin page, /admin/structure/rsc_library, add an option to "Reset content type names". This might require something along the lines of:

module_load_include('inc', 'node', 'content_types');

// reset content types
foreach(array_keys(rsc_library_node_info()) as $name) {

  $type = node_type_load($name);
  node_type_reset($type);
  node_type_save($type);

}

// rebuild content types and menus
node_types_rebuild();
menu_rebuild();
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant