コード例 #1
0
 /**
  * Shortcode admin interface custom options
  */
 public function build_shortcode_editor_custom_options()
 {
     $html = '';
     $source = array();
     if (isset($_POST['shortcode_object'])) {
         $source = $_POST['shortcode_object'];
     }
     $html .= OTW_Form::text_input(array('id' => 'otw-shortcode-element-css_class', 'label' => $this->get_label('CSS Class'), 'description' => $this->get_label('If you\'d like to style this element separately enter a name here. A CSS class with this name will be available for you to style this particular element..'), 'parse' => $source));
     return $html;
 }
コード例 #2
0
 /**
  * Shortcode icon_link admin interface
  */
 public function build_shortcode_editor_options()
 {
     $html = '';
     $source = array();
     if (isset($_POST['shortcode_object'])) {
         $source = $_POST['shortcode_object'];
     }
     $html .= '<br />';
     $html .= OTW_Form::select(array('id' => 'otw-shortcode-element-sidebar_id', 'label' => $this->get_label('Select sidebar'), 'parse' => $source, 'options' => $this->settings['otw_sidebars_options'], 'value' => $this->settings['default_otw_sidebar']));
     return $html;
 }
コード例 #3
0
 public function build_add_column_dialog()
 {
     $content = "";
     $content .= "\n<div>";
     $content .= "\n<h3>" . $this->get_label('Choose column type') . "</h3>";
     $content .= "\n<div class=\"otw_grid_manager_column_dlg\">";
     $content .= "\n<div class=\"otw_grid_manager_column_dlg_container\">";
     $content .= "\n<div class=\"otw_grid_manager_column_dlg_row\">";
     $content .= "\n<div class=\"otw-twentyfour otw-columns\"><div class=\"otw-column-content otw-column-1_1\">1/1</div></div>";
     $content .= "\n</div>";
     $content .= "\n<div class=\"otw_grid_manager_column_dlg_row\">";
     $content .= "\n<div class=\"otw-twelve otw-columns\"><div class=\"otw-column-content otw-column-1_2\">1/2</div></div>";
     $content .= "\n</div>";
     $content .= "\n<div class=\"otw_grid_manager_column_dlg_row\">\n\t\t\t\t<div class=\"otw-eight otw-columns\"><div class=\"otw-column-content otw-column-1_3\">1/3</div></div>\n\t\t\t\t<div class=\"otw-sixteen otw-columns\"><div class=\"otw-column-content otw-column-2_3\">2/3</div></div>\n\t\t\t</div>";
     $content .= "\n<div class=\"otw_grid_manager_column_dlg_row\">\n\t\t\t\t<div class=\"otw-six otw-columns\"><div class=\"otw-column-content otw-column-1_4\">1/4</div></div>\n\t\t\t\t<div class=\"otw-eighteen otw-columns\"><div class=\"otw-column-content otw-column-3_4\">3/4</div></div>\n\t\t\t</div>";
     $content .= "\n<div class=\"otw_grid_manager_column_dlg_row\">\n\t\t\t\t<div class=\"otw-four otw-columns\"><div class=\"otw-column-content otw-column-1_6\">1/6</div></div>\n\t\t\t\t<div class=\"otw-twenty otw-columns\"><div class=\"otw-column-content otw-column-5_6\">5/6</div></div>\n\t\t\t</div>";
     $content .= "\n</div><div>";
     $content .= "\n<h3 class=\"adv_settings\" id=\"adv_settings\">" . $this->get_label('Advanced settings') . "</h3>";
     $content .= "\n<div class=\"adv_settings_container\" id=\"adv_settings_mobile_container\">";
     $content .= "\n<h4 class=\"otw_mobile\"><span>" . $this->get_label('Mobile Grid') . "</span><img src=\"" . $this->component_url . "img/gm-advanced-down-arrow.png\" alt=\"\" /></h4>";
     $content .= "\n<div id=\"adv_settings_mobile_content\">";
     $content .= "\n<p>" . $this->get_label('The grid has two modes of adapting for small displays like phones.<br />The first requires no work at all - the grid will linearize on a small device so your columns stack vertically (all in one column). If you don’t know what you are doing leave it as is and it should be all fine.<br />The other mode can take your existing grid elements and attach them to a six column phone grid. This means you can have 1, 2 or 3 columns on mobile devices. Note that you need to have all columns in a given row set up correctly in order to make it work.<br />Here is an example of two columns in a row.<br />This is correct: 1/2 +1/2<br />This is incorrect: 2/3 + 1/2 because it is more than a full row<br />This is incorrect: 1/3 + 1/3 because it doesn’t make a full row.') . "</p>";
     $content .= "\n" . OTW_Form::select(array('id' => 'otw_mobile_column_size', 'options' => $this->mobile_grid_columns));
     $content .= "\n</div>";
     $content .= "\n</div>";
     $content .= "\n<div class=\"alignleft otw_grid_manager_column_dlg_row_buttons\">\n\t\t\t\t\t<input type=\"button\" accesskey=\"S\" value=\"" . $this->get_label('Save') . "\" name=\"save_settings\" class=\"button\" id=\"otw-shortcode-btn-save\">\n\t\t\t\t\t<input type=\"button\" accesskey=\"C\" value=\"" . $this->get_label('Cancel') . "\" name=\"cancel_settings\" class=\"button\" id=\"otw-shortcode-btn-cancel\">\n\t\t\t\t</div>";
     $content .= "\n</div>";
     echo $content;
     die;
 }
コード例 #4
0
								</div>
								<div class="otw-cs-sidebar-width-selection">
									<div id="otw_cs_sidebar-width1_container_<?php 
    echo $item_type;
    ?>
">
										<?php 
    echo OTW_Form::select(array('id' => 'otw_cs_sidebar1_size_' . $item_type, 'name' => 'otw_cs_sidebar1_size_' . $item_type, 'value' => $default_values[$item_type]['sidebar1_size'], 'options' => $available_sidebar_sizes, 'label' => $this->get_label('OTW Primary Sidebar Width'), 'description' => $this->get_label('Choose the width for your Primary sidebar in columns. The whole content area including sidebars is 24 columns.')));
    ?>
									</div>
									<div id="otw_cs_sidebar-width2_container_<?php 
    echo $item_type;
    ?>
">
										<?php 
    echo OTW_Form::select(array('id' => 'otw_cs_sidebar2_size_' . $item_type, 'name' => 'otw_cs_sidebar2_size_' . $item_type, 'value' => $default_values[$item_type]['sidebar2_size'], 'options' => $available_sidebar_sizes, 'label' => $this->get_label('OTW Secondary Sidebar Width'), 'description' => $this->get_label('Choose the width for your Secondary sidebar in columns. The whole content area including sidebars is 24 columns.')));
    ?>
									
									</div>
								</div>
							</div>
						</div>
						<?php 
}
?>
						<p class="submit">
							<input type="submit" value="<?php 
echo $this->get_label('Save Default Settings');
?>
" name="submit" class="button"/>
						</p>