<li>If you belong to a news organization, give all staff expectations, support and tools to maintain ethical standards.</li> </ul> </div> <div class="code yourcode"> <?php foreach ($steps as $key => $val) { if ($val['name'] == "Fundamentals") { continue; } $question_data = get_user_meta(get_current_user_id(), 'question' . $key, true); if ($val['level'] == 1 && ($categories[$val['parent']]['title'] || $val['name'] == 'Ethical Choices')) { // If both of the next questions are empty or skipped $next = getNextEthic($key); $next_data = get_user_meta(get_current_user_id(), 'question' . $next, true); $next_next = getNextEthic($next); $next_next_data = get_user_meta(get_current_user_id(), 'question' . $next_next, true); if (empty($next_data) || $next_data[0] == 'skipped' || $next_data[0] == 'na') { if ($next_next_data['level'] == 1 || !is_array($next_next_data)) { continue; } else { if (empty($next_next_data) || $next_next_data[0] == 'skipped' || $next_next_data[0] == 'na') { continue; } } } if ($notfirst) { echo '</ul>'; } else { $notfirst = true; }
<li>Do not allow the interests of advertisers or others funding your work to affect the integrity of your journalism.</li> <h3>Community</h3> <li>Respect your audience and those you write about. Consider how your work and its permanence may affect the subjects of your reporting, your community and since the Internet knows no boundaries the larger world.</li> <h3>Professional Conduct</h3> <li>Don’t plagiarize or violate copyrights.</li> <li>Keep promises to sources, readers and the community.</li> <li>If you belong to a news organization, give all staff expectations, support and tools to maintain ethical standards.</li>'; foreach ($steps as $key => $val) { if ($val['name'] == "Fundamentals") { continue; } $question_data = get_user_meta(get_current_user_id(), 'question' . $key, true); if ($val['level'] == 1 && ($categories[$val['parent']]['title'] || $val['name'] == 'Ethical Choices')) { $next = getNextEthic($key); $next_data = get_user_meta(get_current_user_id(), 'question' . $next, true); if (empty($next_data)) { continue; } if ($notfirst) { echo '</ul>'; } else { $notfirst = true; } echo '<h2>' . ($val['name'] == 'Ethical Choices' ? 'Nature of Your Journalism' : $val['name']) . '</h2>'; echo '<ul>'; } if ($question_data[0] != 'na' && $question_data != 'na') { if ($question_data[0] == 'skipped' || $question_data == 'skipped') { //echo '<p>You skipped over the introduction to this section. Please <a href="'.get_permalink($key).'">read through the overview</a>.</p>';