/** * @return StoryBoxOptions */ public static function getInstance() { if (self::$_instance == null) { self::$_instance = new self(); } return self::$_instance; }
private function _administrationAvailableItems() { echo '<h4>Default & Theme Suggested</h4>'; echo '<table class="wp-list-table widefat">'; echo '<thead>'; echo '<tr>'; echo '<th>' . __('Structure') . '</th>'; echo '<th>' . __('Information') . '</th>'; echo '<th>' . __('Display ?') . '</th>'; echo '</tr>'; echo '</thead>'; echo '<tbody>'; foreach (array_unique(array_merge(StoryBoxOptions::getInstance()->availableItemsList, StoryBoxOptions::getInstance()->themeAvailableItems)) as $availableItem) { echo '<tr>'; echo '<td>' . $availableItem . '</td>'; echo '<td>' . (in_array($availableItem, StoryBoxOptions::getInstance()->themeAvailableItems) ? '<strong style="color: #2ecc71;">Theme Suggested</strong>' : (in_array($availableItem, StoryBoxOptions::getInstance()->defaultAvailableItems) ? '<strong style="color: #3498db;">Default</strong>' : 'Available')) . '</td>'; echo '<td><input type="checkbox" name="availableItems[]" value="' . $availableItem . '" ' . (in_array($availableItem, StoryBoxOptions::getInstance()->availableItems) ? 'checked="checked"' : '') . '/></td>'; echo '</tr>'; } echo '</tbody>'; echo '</table>'; }
public function frontIntegration() { ?> <script type="text/javascript"> jQuery(document).ready(function(){ WPStoryBox.Init(<?php echo get_theme_mod($this->settingSections); ?> , <?php echo json_encode(StoryBoxOptions::getInstance()->disabledMobileDevices); ?> ); }); </script> <?php }