コード例 #1
0
<?php

$metaKeys = meAnjanWqg_Posts::getAllPostMetaKeys();
$selectedMetaKey = meAnjanWqg_Utils::arrayValueAsString($wqgData, 'sorting/meta_key', '', 'trim');
?>

<script type="text/javascript">
    var meAnjanWqgPostMetaList = <?php 
echo json_encode($metaKeys);
?>
;
</script>

<table class="form-table">

    <tr>
        <td>
            <label>
                <strong>Sort By (#orderby)</strong>Order by field<br/>
                <?php 
$orderByKeys = meAnjanWqg_Posts::getPostOrderByFields();
$selectedOrderBykeys = meAnjanWqg_Utils::arrayValueAsString($wqgData, 'sorting/orderby', 'date', 'trim');
?>

                <select id="<?php 
echo $idPrefix;
?>
sorting-orderby" name="sorting[orderby]" class="chosen" data-placeholder="Select the field">
                    <?php 
foreach ($orderByKeys as $key) {
    ?>
コード例 #2
0
ファイル: meta.php プロジェクト: anjan011/wp-query-generator
<?php

$metaComparisonTypes = array('=', '!=', '>', '>=', '<', '<=', 'LIKE', 'NOT LIKE', 'IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN', 'NOT EXISTS', 'REGEXP', 'NOT REGEXP', 'RLIKE');
?>

<table class="form-table">
    <tr>
        <td>
            <label>
                <strong>Meta Key (#meta_key)</strong>Meta key name<br/>

                <select size="1" name="meta[key]" data-placeholder=" ">
                    <option></option>
                    <?php 
foreach (meAnjanWqg_Posts::getAllPostMetaKeys() as $metaKey) {
    ?>
                    <option value="<?php 
    echo $metaKey;
    ?>
" <?php 
    if ($metaKey == meAnjanWqg_Utils::arrayValue($wqgData, 'meta/key')) {
        ?>
selected<?php 
    }
    ?>
><?php 
    echo $metaKey;
    ?>
</option>
                    <?php 
}