Replace all instances of node_type_get_label() and node_type_get_name() with node_get_type_label().

Change record: node_type_get_name() renamed to node_type_get_label(), _node_extract_type() renamed to node_type_get_base()

Comments

legovaer’s picture

Issue summary: View changes
legovaer’s picture

Title: Replace node_type_get_label() with node_get_type_label() » Replace node_type_get_label() and node_type_get_name() with node_get_type_label()
Issue summary: View changes
Palashvijay4O’s picture

Status: Active » Needs review
StatusFileSize
new3.29 KB

Well It seems to me that node_type_get_label() is not there anywhere so I just replaced the node_type_get_name(). Here's a patch.

legovaer’s picture

Status: Needs review » Needs work

Instead of only providing the $node->type, you should pass the entire $node object as in the following example;
$type_name = node_get_type_label($node->type);
Should be replaced with:
$type_name = node_get_type_label($node);

Palashvijay4O’s picture

Status: Needs work » Needs review
StatusFileSize
new3.27 KB

Oops forgot that ... I think now it would be fine !!

legovaer’s picture

Status: Needs review » Needs work

We're almost there!

According to the Drupal Coding Standards, there should be no white space after an opening "(";
($node->type ? check_plain( node_get_type_label($node)) : ''),

Palashvijay4O’s picture

Status: Needs work » Needs review
StatusFileSize
new3.27 KB

That was really a silly one . :)

legovaer’s picture

Status: Needs review » Reviewed & tested by the community

Reviewed patch and looks ok.

pfrenssen’s picture

Status: Reviewed & tested by the community » Fixed

Thanks a lot!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.