function answer_shortcode($atts, $content = null) { $db_options = getShortcodeOptions('answer', 'attr'); // Attributes $atts = shortcode_atts(array('color' => $db_options['color']['value'], 'corner' => $db_options['corner']['value'], 'radius' => $db_options['radius']['value'], 'text-color' => $db_options['text-color']['value'], 'hover' => $db_options['hover']['value']), $atts); return isshort_shortcode_html($atts, $content); }
function isshort_adminpage() { if (!current_user_can('manage_options')) { wp_die(__('You do not have sufficient permissions to access this page.')); } ?> <!-- Now display the settings editing screen --> <div class="wrap "> <h1>Interview Styles Shortcode - Options</h1> <?php //get Array $isshort_options = getShortcodeOptions(); //submit action $isshort_options = getShortcodeOptions(); foreach ($isshort_options as $key => $value) { $hidden_field_name = $key . '_hidden'; $currShortcodeTitle = $isshort_options[$key]['title']; $currShortcode = $isshort_options[$key]['shortcode']; // See if the user has posted us some information // If they did, this hidden field will be set to the shortcode name if (isset($_POST[$hidden_field_name]) && $_POST[$hidden_field_name] == $key) { // Read their posted value $newVal = $_POST; array_shift($newVal); array_pop($newVal); foreach ($newVal as $key => $value) { updateShortcodeOption($value, $currShortcode, 'attr', $key, 'value'); } ?> <div id="message" class="updated notice is-dismissible"><?php echo $currShortcodeTitle; ?> Shortcode gespeichert</strong></p><button type="button" class="notice-dismiss"><span class="screen-reader-text">Diese Meldung verwerfen.</span></button></div><?php } } ?> <div id="welcome-panel" class="welcome-panel"> <!-- <a class="welcome-panel-close" href="http://localhost/wordpress/wp-admin/?welcome=0">Verwerfen</a> --> <div class="welcome-panel-content"> <h2>How To</h2> <p class="about-description">Wir haben einige Links zusammengestellt, um dir den Start zu erleichtern:</p> <div class="welcome-panel-column-container"> <div class="welcome-panel-column"> <h3>Wie funktionieren shortcodes?</h3> <p>zum Beispiel: <code>[cap]T[/cap]est</code></p> <p>Nutze die Macht der MCE Buttons!</p> <img src=""> </div> <div class="welcome-panel-column"> <h3>Attribute verwenden</h3> <ul> <li><code>[shortcode attribute="value"]text[/shortcode]</code></li> <li>Use source code view to get class names for <a href="http://ianlunn.github.io/Hover/" target="_blank">Hover.CSS </a></li> <li>gültige Farbwerte <a href="http://www.w3schools.com/colors/colors_hex.asp" target="_blank">http://www.w3schools.com/</a></li> </ul> </div> <div class="welcome-panel-column welcome-panel-last"> <!-- <h3>Links</h3> --> <ul> <li><a href="http://localhost/wordpress/" class="welcome-icon welcome-view-site">Sieh dir deine Website an</a></li> <li><a class="button button-primary button-hero load-customize hide-if-no-customize" href="/wp-admin/edit.php">Beiträge bearbeiten</a></li> </ul> </div> </div> </div> </div> <?php $isshort_options = getShortcodeOptions(); //loop the shortcodes foreach ($isshort_options as $key => $value) { $shortcode = $isshort_options[$key]['shortcode']; $isshort_shortcode_options = $isshort_options[$key]; ?> <div class="postbox-container"><div class="postbox"><div class="inside"> <table class="form-table"> <tbody> <tr> <th><h3><?php echo $isshort_shortcode_options['title']; ?> </h3></th> </tr> <?php //loop the shortcode settings foreach ($isshort_shortcode_options['attr'] as $key => $value) { ?> <form class="form-horizontal" name="isshort_options" method="post" action=""> <tr> <input type="hidden" name="<?php echo $shortcode . "_hidden"; ?> " value="<?php echo $shortcode; ?> "> <th> <label for="<?php echo $key; ?> "><?php echo $value['title']; ?> :</label><br /> <code>[<?php echo $shortcode; ?> <?php echo $value['shortcode']; ?> ="<?php echo $value['value']; ?> "]S.K.[/<?php echo $shortcode; ?> ]</code> </th> <td> <input class="form-control" type="text" name="<?php echo $key; ?> " value="<?php echo $value['value']; ?> " > <td> <label><?php echo $value['desc']; ?> </label> <td> </td><!--form-group--> </tr> <?php } //end of shortcode setting ?> <tr> <td> <p class="submit"> <input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e('Save Changes'); ?> " /> </p> </td> </tr> </form> </tbody> </table> </div></div></div> <div class="clear"></div> <?php } // end of shortcode loop ?> </div><!--wrap--> <?php // setOptionDefaults (); }