Changeset 937944
- Timestamp:
- 06/24/2014 05:10:56 PM (12 years ago)
- Location:
- wodtogether-whiteboards/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (2 diffs)
-
wodtogether-whiteboards.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wodtogether-whiteboards/trunk/readme.txt
r732238 r937944 4 4 Requires at least: 3.0 5 5 Tested up to: 3.5.1 6 Stable tag: 3. 1.06 Stable tag: 3.2.0 7 7 License: GPLv2 8 8 … … 22 22 23 23 == Changelog == 24 = 3.2.0 = 25 * adding option for inline results and comments 26 * removing old unused option to display wods 24 27 = 3.1.0 = 25 28 * adding program id option to show whiteboards from only 1 program -
wodtogether-whiteboards/trunk/wodtogether-whiteboards.php
r732238 r937944 4 4 * Plugin URI: http://wodtogether.com 5 5 * Description: Automatic embedding of WODTogether whiteboards into blog posts. Other widgets too 6 * Version: 3. 1.06 * Version: 3.2.0 7 7 * Author: WODTogether, Inc. 8 8 * Author URI: http://wodtogether.com … … 45 45 add_settings_field('wodtogether_required_category', 'Required Category', 'wodtogether_setting_required_category', 'wodtogether', 'wodtogether_main'); 46 46 add_settings_field('wodtogether_static_page', 'Static Page (Today\'s WOD)', 'wodtogether_setting_static_page', 'wodtogether', 'wodtogether_main'); 47 add_settings_field('wodtogether_ show_wods', 'Show WOD Details by Default', 'wodtogether_setting_show_wods', 'wodtogether', 'wodtogether_main');47 add_settings_field('wodtogether_inline_results', 'Allow Inline Results and Comments', 'wodtogether_setting_inline_results', 'wodtogether', 'wodtogether_main'); 48 48 } 49 49 … … 96 96 <p><strong>Note:</strong> If you want to show Today's WOD on a static Page (instead of/in addition to on each blog post), select a page in the dropdown.</p>"; 97 97 } 98 function wodtogether_setting_ show_wods() {99 $options = get_option('wodtogether_options'); 100 101 $checked = (isset($options[' show_wods']) && $options['show_wods']) ? ' checked' : '';102 echo "<input id='wodtogether_ show_wods' name='wodtogether_options[show_wods]' {$checked} type='checkbox' value='1' />";98 function wodtogether_setting_inline_results() { 99 $options = get_option('wodtogether_options'); 100 101 $checked = (isset($options['inline_results']) && $options['inline_results']) ? ' checked' : ''; 102 echo "<input id='wodtogether_inline_results' name='wodtogether_options[inline_results]' {$checked} type='checkbox' value='1' />"; 103 103 } 104 104 … … 117 117 } 118 118 119 if (!is_numeric($input[' show_wods'])) {120 $input[' show_wods'] = 0; // default to off119 if (!is_numeric($input['inline_results'])) { 120 $input['inline_results'] = 0; // default to off 121 121 } 122 122 … … 193 193 $gym_id =(!isset($wodtogetherSettings['gym_id']) || !$wodtogetherSettings['gym_id'] || !is_numeric($wodtogetherSettings['gym_id'])) ? 2958 : $wodtogetherSettings['gym_id']; 194 194 $program_id = (!isset($wodtogetherSettings['program_id']) || !$wodtogetherSettings['program_id'] || !is_numeric($wodtogetherSettings['program_id'])) ? '' : $wodtogetherSettings['program_id']; 195 $ show_wods = (isset($wodtogetherSettings['show_wods']) && $wodtogetherSettings['show_wods']) ? '/show-wods/1' : '';195 $inline_results = (isset($wodtogetherSettings['inline_results']) && $wodtogetherSettings['inline_results']) ? 'true' : 'false'; 196 196 197 197 $date_offset = (isset($wodtogetherSettings['date_offset']) && $wodtogetherSettings['date_offset']) ? 86400 : 0; … … 200 200 $date = date('Y-m-d', strtotime($datestr) + $date_offset); 201 201 202 $whiteboardsHtml = "<div id=\"wb_{$whiteboarded}\" class=\"wodtogether_whiteboard_wods wodtogether_wb\" data-gid=\"{$gym_id}\" data-pids=\"{$program_id}\" data-date=\"{$date}\" ></div>";202 $whiteboardsHtml = "<div id=\"wb_{$whiteboarded}\" class=\"wodtogether_whiteboard_wods wodtogether_wb\" data-gid=\"{$gym_id}\" data-pids=\"{$program_id}\" data-date=\"{$date}\" data-inline_results=\"{$inline_results}\"></div>"; 203 203 204 204 $whiteboarded++;
Note: See TracChangeset
for help on using the changeset viewer.