Changeset 1128413
- Timestamp:
- 04/05/2015 11:09:09 PM (10 years ago)
- Location:
- oxford-debate
- Files:
-
- 2 edited
- 6 copied
Legend:
- Unmodified
- Added
- Removed
-
oxford-debate/tags/0.7.1/oxd-settings.php
r1102900 r1128413 41 41 $prfx_stored_meta = get_post_meta( $post->ID ); 42 42 ?> 43 44 <p> 45 <label for="titlepa-text" class="oxd-row-title"><?php _e( 'Title Posture A', 'oxd' )?></label> 46 <input type="text" name="titlepa-text" id="titlepa-text" value="<?php if ( isset ( $prfx_stored_meta['titlepa-text'] ) ) echo $prfx_stored_meta['titlepa-text'][0]; ?>" /> 47 </p> 48 <p> 49 <label for="textpa-text" class="oxd-row-text"><?php _e( 'Text Posture A', 'oxd' )?></label> 50 <textarea name="textpa-text" id="textpa-text"><?php if ( isset ( $prfx_stored_meta['textpa-text'] ) ) echo $prfx_stored_meta['textpa-text'][0]; ?></textarea> 51 </p> 52 <p> 53 <label for="titlepb-text" class="oxd-row-title"><?php _e( 'Title Posture B', 'oxd' )?></label> 54 <input type="text" name="titlepb-text" id="titlepb-text" value="<?php if ( isset ( $prfx_stored_meta['titlepb-text'] ) ) echo $prfx_stored_meta['titlepb-text'][0]; ?>" /> 55 </p> 56 <p> 57 <label for="textpb-text" class="oxd-row-text"><?php _e( 'Text Posture B', 'oxd' )?></label> 58 <textarea name="textpb-text" id="textpb-text"><?php if ( isset ( $prfx_stored_meta['textpb-text'] ) ) echo $prfx_stored_meta['textpb-text'][0]; ?></textarea> 59 </p> 60 <p> 61 <label for="duration-select" class="oxd-row-select"><?php _e( 'Duration (days)', 'oxd' )?></label> 62 <input type="text" name="duration-select" id="duration-select" value="<?php if ( isset ( $prfx_stored_meta['duration-select'] ) ) echo $prfx_stored_meta['duration-select'][0]; ?>" /> 63 64 </p> 65 66 <?php 67 global $post; 68 $custom = get_post_custom($post->ID); 69 70 // prepare arguments 71 $user_args = array( 72 // search only for Authors role 73 'role' => 'Author', 74 // order results by display_name 75 'orderby' => 'display_name' 76 ); 77 // Create the WP_User_Query object 78 $wp_user_query = new WP_User_Query($user_args); 79 // Get the results 80 $authors = $wp_user_query->get_results(); 81 // Check for results 82 if (!empty($authors)) 83 { 84 // Name is your custom field key 85 $txtpa = _e( 'Posture A user:', 'oxd' ); 86 echo $txtpa . "<select name='usera'>"; 87 // loop trough each author 88 foreach ($authors as $author) 89 { 90 // get all the user's data 91 $author_info = get_userdata($author->ID); 92 $author_id = get_post_meta($post->ID, 'usera', true); 93 if($author_id == $author_info->ID) { $author_selected = 'selected="selected"'; } else { $author_selected = ''; } 94 echo '<option value='.$author_info->ID.' '.$author_selected.'>'.$author_info->first_name.' '.$author_info->last_name.'</option>'; 95 } 96 echo "</select>"; 97 98 // USER B 99 // Name is your custom field key 100 $txtpb = _e( 'Posture B user:', 'oxd' ); 101 echo $txtpb . "<select name='userb'>"; 102 // loop trough each author 103 foreach ($authors as $author) 104 { 105 // get all the user's data 106 $author_info = get_userdata($author->ID); 107 $author_id = get_post_meta($post->ID, 'userb', true); 108 if($author_id == $author_info->ID) { $author_selected = 'selected="selected"'; } else { $author_selected = ''; } 109 echo '<option value='.$author_info->ID.' '.$author_selected.'>'.$author_info->first_name.' '.$author_info->last_name.'</option>'; 110 } 111 echo "</select>"; 112 } else { 113 echo _e( 'No authors found', 'oxd' ); 114 } 115 ?> 116 <p> 117 <label for="votea" class="oxd-row-select"><?php _e( 'Votes A', 'oxd' )?></label> 118 <input type="text" name="votea" id="votea" value="<?php if ( isset ( $prfx_stored_meta['votea'] ) ) echo $prfx_stored_meta['votea'][0]; ?>" /> 119 <label for="voteb" class="oxd-row-select"><?php _e( 'Votes B', 'oxd' )?></label> 120 <input type="text" name="voteb" id="voteb" value="<?php if ( isset ( $prfx_stored_meta['voteb'] ) ) echo $prfx_stored_meta['voteb'][0]; ?>" /> 121 </p> 43 44 <table class="form-table"> 45 <tbody> 46 <tr valign="top"> 47 <th scope="row"> 48 <label for="titlepa-text"><?php _e( 'Title Posture A', 'oxd' )?></label> 49 </th> 50 <td> 51 <input type="text" name="titlepa-text" id="titlepa-text" style="width: 80%;" value="<?php if ( isset ( $prfx_stored_meta['titlepa-text'] ) ) echo $prfx_stored_meta['titlepa-text'][0]; ?>" /> 52 <p class="description"></p> 53 </td> 54 </tr> 55 <tr> 56 </tr> 57 <tr valign="top"> 58 <th scope="row"> 59 <label for="textpa-text"><?php _e( 'Text Posture A', 'oxd' )?></label> 60 </th> 61 <td> 62 <textarea name="textpa-text" id="textpa-text" style="width: 80%; height: 150px;"><?php if ( isset ( $prfx_stored_meta['textpa-text'] ) ) echo $prfx_stored_meta['textpa-text'][0]; ?></textarea> 63 <p class="description"></p> 64 </td> 65 </tr> 66 <tr> 67 </tr> 68 <tr valign="top"> 69 <th scope="row"> 70 <label for="titlepb-text"><?php _e( 'Title Posture B', 'oxd' )?></label> 71 </th> 72 <td> 73 <input type="text" name="titlepb-text" id="titlepb-text" style="width: 80%;" value="<?php if ( isset ( $prfx_stored_meta['titlepb-text'] ) ) echo $prfx_stored_meta['titlepb-text'][0]; ?>" /> 74 <p class="description"></p> 75 </td> 76 </tr> 77 <tr> 78 </tr> 79 <tr valign="top"> 80 <th scope="row"> 81 <label for="textpb-text"><?php _e( 'Text Posture B', 'oxd' )?></label> 82 </th> 83 <td> 84 <textarea name="textpb-text" id="textpb-text" style="width: 80%; height: 150px;"><?php if ( isset ( $prfx_stored_meta['textpb-text'] ) ) echo $prfx_stored_meta['textpb-text'][0]; ?></textarea> 85 <p class="description"></p> 86 </td> 87 </tr> 88 <tr> 89 </tr> 90 <tr valign="top"> 91 <th scope="row"> 92 <label for="duration-select"><?php _e( 'Duration (days)', 'oxd' )?></label> 93 </th> 94 <td> 95 <select name="duration-select"> 96 <option value="1">1</option> 97 <option value="5">5</option> 98 <option value="7">7</option> 99 <option value="14">14</option> 100 <option value="30">30</option> 101 <option value="60">60</option> 102 <option value="90">90</option> 103 </select> 104 <p class="description"></p> 105 </td> 106 </tr> 107 <tr> 108 </tr> 109 110 <?php 111 global $post; 112 $custom = get_post_custom($post->ID); 113 114 // prepare arguments 115 $user_args = array( 116 // search only for Authors role 117 'role' => 'Author', 118 // order results by display_name 119 'orderby' => 'display_name' 120 ); 121 // Create the WP_User_Query object 122 $wp_user_query = new WP_User_Query($user_args); 123 // Get the results 124 $authors = $wp_user_query->get_results(); 125 // Check for results 126 127 if (!empty($authors)) 128 { 129 130 ?> 131 132 <tr valign="top"> 133 <th scope="row"> 134 <label for="duration-select"><?php _e( 'Posture A user:', 'oxd' )?></label> 135 </th> 136 <td> 137 <select name="usera"> 138 <?php 139 // loop trough each author 140 foreach ($authors as $author) 141 { 142 // get all the user's data 143 $author_info = get_userdata($author->ID); 144 $author_id = get_post_meta($post->ID, 'usera', true); 145 if($author_id == $author_info->ID) { $author_selected = 'selected="selected"'; } else { $author_selected = ''; } 146 echo '<option value='.$author_info->ID.' '.$author_selected.'>'.$author_info->first_name.' '.$author_info->last_name.'</option>'; 147 } 148 echo "</select>"; 149 ?> 150 <p class="description"></p> 151 </td> 152 </tr> 153 <tr> 154 </tr> 155 156 <tr valign="top"> 157 <th scope="row"> 158 <label for="duration-select"><?php _e( 'Posture B user:', 'oxd' )?></label> 159 </th> 160 <td> 161 <select name="userb"> 162 <?php 163 // loop trough each author 164 foreach ($authors as $author) 165 { 166 // get all the user's data 167 $author_info = get_userdata($author->ID); 168 $author_id = get_post_meta($post->ID, 'userb', true); 169 if($author_id == $author_info->ID) { $author_selected = 'selected="selected"'; } else { $author_selected = ''; } 170 echo '<option value='.$author_info->ID.' '.$author_selected.'>'.$author_info->first_name.' '.$author_info->last_name.'</option>'; 171 } 172 echo "</select>"; 173 ?> 174 <p class="description"></p> 175 </td> 176 </tr> 177 <tr> 178 </tr> 179 180 <?php 181 } else { 182 echo _e( 'No authors found', 'oxd' ); 183 } 184 ?> 185 <tr valign="top"> 186 <th scope="row"> 187 <label for="votea"><?php _e( 'Votes A', 'oxd' )?></label> 188 </th> 189 <td> 190 <input type="text" name="votea" id="votea" value="<?php if ( isset ( $prfx_stored_meta['votea'] ) ) echo $prfx_stored_meta['votea'][0]; else echo "0"?>" /> 191 <p class="description"></p> 192 </td> 193 </tr> 194 <tr> 195 </tr> 196 <tr valign="top"> 197 <th scope="row"> 198 <label for="votea"><?php _e( 'Votes B', 'oxd' )?></label> 199 </th> 200 <td> 201 <input type="text" name="voteb" id="voteb" value="<?php if ( isset ( $prfx_stored_meta['voteb'] ) ) echo $prfx_stored_meta['voteb'][0]; else echo "0"?>" /> 202 </td> 203 </tr> 204 <tr> 205 </tr> 206 </tbody> 207 </table> 122 208 <?php 123 209 } -
oxford-debate/tags/0.7.1/readme.txt
r1102900 r1128413 36 36 [debates_q order="ASC" orderby="title"]. 37 37 38 = What is the role for posture user ? = 39 40 Author 41 38 42 == Screenshots == 39 43 … … 45 49 46 50 == Changelog == 51 = 0.7.1 = 52 * Fixed: Improvement in the editing area 53 47 54 = 0.7.0 = 48 55 * Added: Multilanguage compatibility -
oxford-debate/trunk/oxd-settings.php
r1102900 r1128413 41 41 $prfx_stored_meta = get_post_meta( $post->ID ); 42 42 ?> 43 44 <p> 45 <label for="titlepa-text" class="oxd-row-title"><?php _e( 'Title Posture A', 'oxd' )?></label> 46 <input type="text" name="titlepa-text" id="titlepa-text" value="<?php if ( isset ( $prfx_stored_meta['titlepa-text'] ) ) echo $prfx_stored_meta['titlepa-text'][0]; ?>" /> 47 </p> 48 <p> 49 <label for="textpa-text" class="oxd-row-text"><?php _e( 'Text Posture A', 'oxd' )?></label> 50 <textarea name="textpa-text" id="textpa-text"><?php if ( isset ( $prfx_stored_meta['textpa-text'] ) ) echo $prfx_stored_meta['textpa-text'][0]; ?></textarea> 51 </p> 52 <p> 53 <label for="titlepb-text" class="oxd-row-title"><?php _e( 'Title Posture B', 'oxd' )?></label> 54 <input type="text" name="titlepb-text" id="titlepb-text" value="<?php if ( isset ( $prfx_stored_meta['titlepb-text'] ) ) echo $prfx_stored_meta['titlepb-text'][0]; ?>" /> 55 </p> 56 <p> 57 <label for="textpb-text" class="oxd-row-text"><?php _e( 'Text Posture B', 'oxd' )?></label> 58 <textarea name="textpb-text" id="textpb-text"><?php if ( isset ( $prfx_stored_meta['textpb-text'] ) ) echo $prfx_stored_meta['textpb-text'][0]; ?></textarea> 59 </p> 60 <p> 61 <label for="duration-select" class="oxd-row-select"><?php _e( 'Duration (days)', 'oxd' )?></label> 62 <input type="text" name="duration-select" id="duration-select" value="<?php if ( isset ( $prfx_stored_meta['duration-select'] ) ) echo $prfx_stored_meta['duration-select'][0]; ?>" /> 63 64 </p> 65 66 <?php 67 global $post; 68 $custom = get_post_custom($post->ID); 69 70 // prepare arguments 71 $user_args = array( 72 // search only for Authors role 73 'role' => 'Author', 74 // order results by display_name 75 'orderby' => 'display_name' 76 ); 77 // Create the WP_User_Query object 78 $wp_user_query = new WP_User_Query($user_args); 79 // Get the results 80 $authors = $wp_user_query->get_results(); 81 // Check for results 82 if (!empty($authors)) 83 { 84 // Name is your custom field key 85 $txtpa = _e( 'Posture A user:', 'oxd' ); 86 echo $txtpa . "<select name='usera'>"; 87 // loop trough each author 88 foreach ($authors as $author) 89 { 90 // get all the user's data 91 $author_info = get_userdata($author->ID); 92 $author_id = get_post_meta($post->ID, 'usera', true); 93 if($author_id == $author_info->ID) { $author_selected = 'selected="selected"'; } else { $author_selected = ''; } 94 echo '<option value='.$author_info->ID.' '.$author_selected.'>'.$author_info->first_name.' '.$author_info->last_name.'</option>'; 95 } 96 echo "</select>"; 97 98 // USER B 99 // Name is your custom field key 100 $txtpb = _e( 'Posture B user:', 'oxd' ); 101 echo $txtpb . "<select name='userb'>"; 102 // loop trough each author 103 foreach ($authors as $author) 104 { 105 // get all the user's data 106 $author_info = get_userdata($author->ID); 107 $author_id = get_post_meta($post->ID, 'userb', true); 108 if($author_id == $author_info->ID) { $author_selected = 'selected="selected"'; } else { $author_selected = ''; } 109 echo '<option value='.$author_info->ID.' '.$author_selected.'>'.$author_info->first_name.' '.$author_info->last_name.'</option>'; 110 } 111 echo "</select>"; 112 } else { 113 echo _e( 'No authors found', 'oxd' ); 114 } 115 ?> 116 <p> 117 <label for="votea" class="oxd-row-select"><?php _e( 'Votes A', 'oxd' )?></label> 118 <input type="text" name="votea" id="votea" value="<?php if ( isset ( $prfx_stored_meta['votea'] ) ) echo $prfx_stored_meta['votea'][0]; ?>" /> 119 <label for="voteb" class="oxd-row-select"><?php _e( 'Votes B', 'oxd' )?></label> 120 <input type="text" name="voteb" id="voteb" value="<?php if ( isset ( $prfx_stored_meta['voteb'] ) ) echo $prfx_stored_meta['voteb'][0]; ?>" /> 121 </p> 43 44 <table class="form-table"> 45 <tbody> 46 <tr valign="top"> 47 <th scope="row"> 48 <label for="titlepa-text"><?php _e( 'Title Posture A', 'oxd' )?></label> 49 </th> 50 <td> 51 <input type="text" name="titlepa-text" id="titlepa-text" style="width: 80%;" value="<?php if ( isset ( $prfx_stored_meta['titlepa-text'] ) ) echo $prfx_stored_meta['titlepa-text'][0]; ?>" /> 52 <p class="description"></p> 53 </td> 54 </tr> 55 <tr> 56 </tr> 57 <tr valign="top"> 58 <th scope="row"> 59 <label for="textpa-text"><?php _e( 'Text Posture A', 'oxd' )?></label> 60 </th> 61 <td> 62 <textarea name="textpa-text" id="textpa-text" style="width: 80%; height: 150px;"><?php if ( isset ( $prfx_stored_meta['textpa-text'] ) ) echo $prfx_stored_meta['textpa-text'][0]; ?></textarea> 63 <p class="description"></p> 64 </td> 65 </tr> 66 <tr> 67 </tr> 68 <tr valign="top"> 69 <th scope="row"> 70 <label for="titlepb-text"><?php _e( 'Title Posture B', 'oxd' )?></label> 71 </th> 72 <td> 73 <input type="text" name="titlepb-text" id="titlepb-text" style="width: 80%;" value="<?php if ( isset ( $prfx_stored_meta['titlepb-text'] ) ) echo $prfx_stored_meta['titlepb-text'][0]; ?>" /> 74 <p class="description"></p> 75 </td> 76 </tr> 77 <tr> 78 </tr> 79 <tr valign="top"> 80 <th scope="row"> 81 <label for="textpb-text"><?php _e( 'Text Posture B', 'oxd' )?></label> 82 </th> 83 <td> 84 <textarea name="textpb-text" id="textpb-text" style="width: 80%; height: 150px;"><?php if ( isset ( $prfx_stored_meta['textpb-text'] ) ) echo $prfx_stored_meta['textpb-text'][0]; ?></textarea> 85 <p class="description"></p> 86 </td> 87 </tr> 88 <tr> 89 </tr> 90 <tr valign="top"> 91 <th scope="row"> 92 <label for="duration-select"><?php _e( 'Duration (days)', 'oxd' )?></label> 93 </th> 94 <td> 95 <select name="duration-select"> 96 <option value="1">1</option> 97 <option value="5">5</option> 98 <option value="7">7</option> 99 <option value="14">14</option> 100 <option value="30">30</option> 101 <option value="60">60</option> 102 <option value="90">90</option> 103 </select> 104 <p class="description"></p> 105 </td> 106 </tr> 107 <tr> 108 </tr> 109 110 <?php 111 global $post; 112 $custom = get_post_custom($post->ID); 113 114 // prepare arguments 115 $user_args = array( 116 // search only for Authors role 117 'role' => 'Author', 118 // order results by display_name 119 'orderby' => 'display_name' 120 ); 121 // Create the WP_User_Query object 122 $wp_user_query = new WP_User_Query($user_args); 123 // Get the results 124 $authors = $wp_user_query->get_results(); 125 // Check for results 126 127 if (!empty($authors)) 128 { 129 130 ?> 131 132 <tr valign="top"> 133 <th scope="row"> 134 <label for="duration-select"><?php _e( 'Posture A user:', 'oxd' )?></label> 135 </th> 136 <td> 137 <select name="usera"> 138 <?php 139 // loop trough each author 140 foreach ($authors as $author) 141 { 142 // get all the user's data 143 $author_info = get_userdata($author->ID); 144 $author_id = get_post_meta($post->ID, 'usera', true); 145 if($author_id == $author_info->ID) { $author_selected = 'selected="selected"'; } else { $author_selected = ''; } 146 echo '<option value='.$author_info->ID.' '.$author_selected.'>'.$author_info->first_name.' '.$author_info->last_name.'</option>'; 147 } 148 echo "</select>"; 149 ?> 150 <p class="description"></p> 151 </td> 152 </tr> 153 <tr> 154 </tr> 155 156 <tr valign="top"> 157 <th scope="row"> 158 <label for="duration-select"><?php _e( 'Posture B user:', 'oxd' )?></label> 159 </th> 160 <td> 161 <select name="userb"> 162 <?php 163 // loop trough each author 164 foreach ($authors as $author) 165 { 166 // get all the user's data 167 $author_info = get_userdata($author->ID); 168 $author_id = get_post_meta($post->ID, 'userb', true); 169 if($author_id == $author_info->ID) { $author_selected = 'selected="selected"'; } else { $author_selected = ''; } 170 echo '<option value='.$author_info->ID.' '.$author_selected.'>'.$author_info->first_name.' '.$author_info->last_name.'</option>'; 171 } 172 echo "</select>"; 173 ?> 174 <p class="description"></p> 175 </td> 176 </tr> 177 <tr> 178 </tr> 179 180 <?php 181 } else { 182 echo _e( 'No authors found', 'oxd' ); 183 } 184 ?> 185 <tr valign="top"> 186 <th scope="row"> 187 <label for="votea"><?php _e( 'Votes A', 'oxd' )?></label> 188 </th> 189 <td> 190 <input type="text" name="votea" id="votea" value="<?php if ( isset ( $prfx_stored_meta['votea'] ) ) echo $prfx_stored_meta['votea'][0]; else echo "0"?>" /> 191 <p class="description"></p> 192 </td> 193 </tr> 194 <tr> 195 </tr> 196 <tr valign="top"> 197 <th scope="row"> 198 <label for="votea"><?php _e( 'Votes B', 'oxd' )?></label> 199 </th> 200 <td> 201 <input type="text" name="voteb" id="voteb" value="<?php if ( isset ( $prfx_stored_meta['voteb'] ) ) echo $prfx_stored_meta['voteb'][0]; else echo "0"?>" /> 202 </td> 203 </tr> 204 <tr> 205 </tr> 206 </tbody> 207 </table> 122 208 <?php 123 209 } -
oxford-debate/trunk/readme.txt
r1102900 r1128413 36 36 [debates_q order="ASC" orderby="title"]. 37 37 38 = What is the role for posture user ? = 39 40 Author 41 38 42 == Screenshots == 39 43 … … 45 49 46 50 == Changelog == 51 = 0.7.1 = 52 * Fixed: Improvement in the editing area 53 47 54 = 0.7.0 = 48 55 * Added: Multilanguage compatibility
Note: See TracChangeset
for help on using the changeset viewer.