/**
     * Options page callback
     */
    public function options_cb()
    {
        ?>
		<div id="metadata-cruncher" class="wrap metadata-cruncher">
			<h2>Image Metadata Cruncher Options</h2>
			<?php 
        settings_errors();
        ?>
			<h2 class="nav-tab-wrapper">
				<?php 
        if (isset($_GET['tab'])) {
            $active_tab = $_GET['tab'];
        } else {
            $active_tab = 'settings';
        }
        function active_tab($value, $at)
        {
            if ($at == $value) {
                echo 'nav-tab-active';
            }
        }
        ?>
				<a href="?page=image_metadata_cruncher-options&tab=settings" class="nav-tab <?php 
        active_tab('settings', $active_tab);
        ?>
">Settings</a>
				<a href="?page=image_metadata_cruncher-options&tab=metadata" class="nav-tab <?php 
        active_tab('metadata', $active_tab);
        ?>
">Available Metadata</a>
				<a href="?page=image_metadata_cruncher-options&tab=usage" class="nav-tab <?php 
        active_tab('usage', $active_tab);
        ?>
"><?php 
        _e('How to Use Template Tags');
        ?>
</a>
				<a href="?page=image_metadata_cruncher-options&tab=about" class="nav-tab <?php 
        active_tab('about', $active_tab);
        ?>
">About</a>
			</h2>
			
			<?php 
        if ($active_tab == 'settings') {
            ?>
				<form action="options.php" method="post">
					<?php 
            settings_fields("{$this->prefix}_title");
            // renders hidden input fields
            settings_fields("{$this->prefix}_alt");
            // renders hidden input fields
            do_settings_sections("{$this->prefix}-section-0");
            do_settings_sections("{$this->prefix}-section-1");
            do_settings_sections("{$this->prefix}-section-2");
            submit_button();
            ?>
				</form>
			<?php 
        } elseif ($active_tab == 'metadata') {
            ?>
				<?php 
            do_settings_sections("{$this->prefix}-section-3");
            ?>
			<?php 
        } elseif ($active_tab == 'usage') {
            ?>
				<?php 
            do_settings_sections("{$this->prefix}-section-4");
            ?>
			<?php 
        } elseif ($active_tab == 'about') {
            ?>
				<?php 
            do_settings_sections("{$this->prefix}-section-5");
            ?>
			<?php 
        }
        ?>
		</div>
	<?php 
    }
예제 #2
0
</td>
				    	<td><?php 
    echo $i['Status'];
    ?>
</td>
				    </tr>
				<?php 
}
?>
    
			    </tbody>
		    </table>

	    </div>
	    <div class="tab-pane <?php 
echo active_tab('donations', $r);
?>
" id="donations">
	    	<div class='row'>
			    <div class="span3">
			    	<strong>Total:</strong> $<?php 
echo $r['data__donation__total'];
?>
<br>
					<strong>Gift Count:</strong><?php 
echo $r['data__donation__count'];
?>
<br>
				</div>

			    <div class="span3">