Passing By REF in the_content
-
Hi I am trying to pass a string out of a wordpress filter + function i.e.
‘<?php
function check_content($content)
{
global $A;if (isset($_POST[‘key1’])
{
$option = “1”;
DO THE CONTENT………..1
}
elseif (isset($_POST[‘key2’])
{
$option = “2”;
DO THE CONTENT………..2
}
Etc. Etc.$A[SELOPT] = $option;
return $content;
}
add_filter(‘the_content’,’check_content’);?>’
I have used a global variable as an array and/or string I would like to pass it by reference but I cannot do that either, does anyone know a simple way around this? None of the above works 100%, I have looked around the posts and similar situations do not cure this problem.
All I want to do is pass one variable “other than content” out of this function, I must be missing something?Thanks in advance for any replies.
- The topic ‘Passing By REF in the_content’ is closed to new replies.