changing block names

Permalink 1 user found helpful
I need to change the names of some of the blocks (both core and add-on) so my clients can understand more clearly what they are when they go to add them to an area of a page. (You have to admit, most of them are pretty vague at best.) I understand these values (the name and description) are stored in the database somewhere - but where? Can anybody point me in the direction? (Please?)

spjuphigh
 
mkly replied on at Permalink Reply
mkly
This is actually stored in the block controller(controller.php) itself, not the database. Typically in
public function getBlockTypeName() {
  return t("The Block Name");
}

and
public function getBlockTypeDescription() {
  return t("The description of the block");
}
spjuphigh replied on at Permalink Reply
spjuphigh
Yes, those functions call for the appropriate data to display it, but the actual string being called is hardwired into the database itself.
spjuphigh replied on at Permalink Reply
spjuphigh
Nevermind. I found it. For those of you looking for it, it's in the 'block types' table.
mkly replied on at Permalink Reply
mkly
For anyone who reads this overriding the btName in the BlockTypes database table after the installation of a core block is very unstable.
spjuphigh replied on at Permalink Reply
spjuphigh
Rut ro rorge.....I didn't know about that. Did I just potentially break my site? I just changed a bunch of the names and descriptions and it SEEMS to work as it should..... what type of "instability" should I be looking for?
mkly replied on at Permalink Reply
mkly
live the life.
Guido replied on at Permalink Reply
I know this is an old topic, but I hope this might be usefull for someone: After changing the name in the block controller, you have to go to Block Formats in the Dashboard and refresh the block which name you just changed.
VonUniGE replied on at Permalink Reply
Yes, it's useful and still working in version 5.7 .