The current 3.0 version does a bunch of stuff before checking if the module should move the link:

function ed_readmore_nodeapi(&$node, $op, $teaser, $page) {
  $enabled = variable_get('ed_readmore_readmore_tweak', 1);
  $inlineflag = variable_get('ed_readmore_readmore_inline', 1);
  $strong = variable_get('ed_readmore_readmore_strong', 1);
 
  if ($strong) {
    $strong_l = '<strong>';
    $strong_r = '</strong>';
  }
  else {
    $strong_l = '';
    $strong_r = '';
  }
  $link_text = $strong_l . t(variable_get('ed_readmore_text', ED_READMORE_TEXT_DEFAULT)) . $strong_r;
  $options = array('html' => true);
  $readmore_url = l($link_text, "node/$node->nid", $options);
  if ($enabled) {

    ...

It should probably look like this:

function ed_readmore_nodeapi(&$node, $op, $teaser, $page) {
  if (variable_get('ed_readmore_readmore_tweak', 1)) {
    $inlineflag = variable_get('ed_readmore_readmore_inline', 1);
    $strong = variable_get('ed_readmore_readmore_strong', 1);

    if ($strong) {
      $strong_l = '<strong>';
      $strong_r = '</strong>';
    }
    else {
      $strong_l = '';
      $strong_r = '';
    }
    $link_text = $strong_l . t(variable_get('ed_readmore_text', ED_READMORE_TEXT_DEFAULT)) . $strong_r;
    $options = array('html' => true);
    $readmore_url = l($link_text, "node/$node->nid", $options);

    ...

Comments

todd nienkerk’s picture

Title: hooke_node_api: Move code inside the conditional » hook_node_api: Move code inside the conditional

Fixing typo in title.

todd nienkerk’s picture

Version: 6.x-3.0 » 6.x-3.x-dev
Status: Active » Fixed

Fixed in the 3.x-dev branch.

todd nienkerk’s picture

Assigned: Unassigned » todd nienkerk

Status: Fixed » Closed (fixed)

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