function _ai_insert_text_at in Content Injector (formerly AdSense Injector) 6.3
Same name and namespace in other branches
- 7.3 adsense_injector.module \_ai_insert_text_at()
Handle 'manual' insertion at the specified position
Parameters
$node_body The node body text to process:
$at The insertion point of the '[ad_here]' marker.:
1 call to _ai_insert_text_at()
- _ai_manual_insertion in ./
adsense_injector.module - Perform manual insertions, if any.
File
- ./
adsense_injector.module, line 97 - Inject adsense ads into node content automatically.
Code
function _ai_insert_text_at($node_body, $at, $insertion) {
$front = substr($node_body, 0, $at);
$end = substr($node_body, $at + strlen(ADSENSE_INJECTOR_MANUAL_INSERTION_TAG));
return $front . _ai_html_comment('ManualInsertion', 'START') . $insertion . _ai_html_comment('ManualInsertion', 'END') . $end;
}