我正试图了解PHP中一个相当简单的概念,但我对PHP非常了解。
我有一个函数。。
function pa_insertPage($atts, $content = null) {
// Default output if no pageid given
$output = NULL;
// extract atts and assign to array
extract(shortcode_atts(array("page" => \'2404\' // Value for Course Descriptions page
), $atts));
// if a page id is specified, then run query
if (!empty($page)) {
$pageContent = new WP_query();
$pageContent->query(array(\'page_id\' => $page));
while ($pageContent->have_posts()) : $pageContent->the_post();
// assign the content to $output
$output = apply_filters( \'the_content\', get_the_content() );
endwhile;
}
return $output;
}
我想用退回的$output
在另一个调用naada_assess()
在我的naada_assess
我调用的函数$recClasses = pa_insertPage($output);
但这似乎没有奏效。