static function logo() { ?> <?php _e('Brought to you by', 'maxbuttons'); ?> <a href="http://maxfoundry.com/products/?ref=mbfree" target="_blank"><img src="<?php echo maxButtons::get_plugin_url(); ?> /images/max-foundry.png" alt="Max Foundry" /></a> <?php printf(__('Upgrade to MaxButtons Pro today! %sClick Here%s', 'maxbuttons'), '<a href="http://www.maxbuttons.com/pricing/?utm_source=wordpress&utm_medium=mbrepo&utm_content=button-list-upgrade&utm_campaign=plugin">', '</a>'); ?> <?php }
<td align="center"><img src="<?php echo maxButtons::get_plugin_url(); ?> images/checkmark-16.png" alt="Checkmark" /></td> </tr> <tr> <td><?php _e('Shortcodes to use anywhere in your WordPress site', 'maxbuttons'); ?> </td> <td align="center"><img src="<?php echo maxButtons::get_plugin_url(); ?> images/checkmark-16.png" alt="Checkmark" /></td> <td align="center"><img src="<?php echo maxButtons::get_plugin_url(); ?> images/checkmark-16.png" alt="Checkmark" /></td> </tr> </table> <h2><?php _e('Get Your Copy Today', 'maxbuttons'); ?> </h2> <p><?php printf(__('So what are you waiting for? %sGrab your copy of MaxButtons Pro today%s!', 'maxbuttons'), '<a href="https://maxbuttons.com/pricing/?utm_source=mbf-dashboard&utm_medium=mbf-plugin&utm_content=mpb-list-sidebar-21&utm_campaign=inthecart19" target="_blank">', '</a>'); ?> </p> </div> </div>
public function admin_fields() { $data = $this->data[$this->blockname]; $media_names = maxButtonsUtils::get_media_query(1); // nicenames $media_desc = maxButtonsUtils::get_media_query(3); $units = array("px" => __("px", "maxbuttons"), "%" => __("%", "maxbuttons")); $container_floats = array("" => "", "none" => __("None", "maxbuttons"), "left" => __("Left", "maxbuttons"), "right" => __("Right", "maxbuttons")); foreach ($this->fields as $field => $options) { $default = isset($options["default"]) ? $options["default"] : ''; ${$field} = isset($data[$field]) ? $data[$field] : $default; ${$field . "_default"} = $default; } // sorting routine via array merge. $fk = array_flip(array_keys($media_query)); $names_used = array_intersect_key($media_names, $fk); $media_query = array_merge($names_used, $media_query); ?> <div class="option-container"> <div class="title"><?php _e('Responsive Settings', 'maxbuttons'); ?> </div> <div class="inside"> <p><?php _e("Responsive settings let you decide the behavior of the button on different devices and screen sizes. For instance large buttons on small screens.", "maxbuttons"); ?> </p> <div class="option-design"> <div class="label"><?php _e("Auto Responsive", 'maxbuttons'); ?> <?php _e("(Experimental)", "maxbuttons"); ?> </div> <div class="input"> <input type='checkbox' name='auto_responsive' value='1' <?php checked(1, $auto_responsive); ?> > </div> <div class="clear"></div> <p><strong><?php _e("Note:", "maxbuttons"); ?> </strong><?php _e(" Auto responsive settings will take a guess only on small screens. To control your responsive settings uncheck this button. This will show more options.", "maxbuttons"); ?> </p> </div> <div class='option-design media_queries_options'> <?php foreach ($media_query as $item => $data) { foreach ($data as $index => $fields) { ?> <div class='media_query'> <span class='removebutton'><img src="<?php echo maxButtons::get_plugin_url(); ?> /assets/icons/remove.png"></span> <input type="hidden" name="media_query[]" value="<?php echo $item; ?> "> <label class='title'><?php echo $media_names[$item]; ?> </label> <p class='description'><?php echo $media_desc[$item]; ?> </p> <?php if ($item == "custom") { $custom_class = ''; } else { $custom_class = 'hidden'; } ?> <div class="custom" <?php echo $custom_class; ?> > <div class="label"><?php _e("Min width", "maxbuttons"); ?> </div> <div class="input"><input type="text" class="tiny" name="mq_custom_minwidth[]" value="<?php echo $fields["mq_custom_minwidth"]; ?> " />px</div> <div class="label max"> <?php _e("Max width", "maxbuttons"); ?> </div> <div class="input max"><input type="text" class="tiny" name="mq_custom_maxwidth[]" value="<?php echo $fields["mq_custom_maxwidth"]; ?> " />px</div> </div> <div class='label'><?php _e("Font size", "maxbuttons"); ?> </div> <div class='input'><input type='text' name='mq_font_size[]' class='tiny' value="<?php echo $fields["mq_font_size"]; ?> "> <?php echo maxButtonsUtils::selectify("mq_font_size_unit[]", $units, $fields["mq_font_size_unit"]); ?> </div> <div class='label'><?php _e("Button width", 'maxbuttons'); ?> </div> <div class='input'><input type='text' name="mq_button_width[]" value="<?php echo $fields["mq_button_width"]; ?> " class='tiny'> <?php echo maxButtonsUtils::selectify("mq_button_width_unit[]", $units, $fields["mq_button_width_unit"]); ?> </div> <div class='label'><?php _e("Container width", 'maxbuttons'); ?> </div> <div class='input'><input type='text' name="mq_container_width[]" value="<?php echo $fields["mq_container_width"]; ?> " class='tiny'> <?php echo maxButtonsUtils::selectify("mq_container_width_unit[]", $units, $fields["mq_container_width_unit"]); ?> </div> <div class='label'><?php _e("Container float", "maxbuttons"); ?> </div> <div class="input"><?php echo maxButtonsUtils::selectify("mq_container_float[]", $container_floats, $fields["mq_container_float"]); ?> </div> <?php $mq_hide = isset($fields["mq_hide"]) ? $fields["mq_hide"] : ''; ?> <div class="label"><?php _e("Hide button on this view", "maxbuttons"); ?> </div> <div class="input"><input type="checkbox" name="mq_hide[]" value="none" <?php checked('none', $mq_hide); ?> ></div> </div> <?php if ($item != 'custom') { unset($media_names[$item]); } // remove existing queries from new query selection } } ?> <div class="new_query_space"></div> <div class="clear"></div> <div class="option-design new-query"> <div class="label"><?php _e('New Query', 'maxbuttons'); ?> </div> <div class="input"> <?php echo maxButtonsUtils::selectify("new_query", $media_names, ''); ?> <a class="button add_media_query"><?php _e("Add", "maxbuttons"); ?> </a> </div> <div class="clear"></div> </div> </div> </div> <!-- inside --> <div class='media_option_prot'> <div class='media_query'> <span class='removebutton'><img src="<?php echo MB()->get_plugin_url(); ?> assets/icons/remove.png"></span> <input type="hidden" name="media_query[]" value=""> <label class='title'></label> <p class='description'>Description here</p> <div class="custom"> <div class="label"><?php _e("Min width", "maxbuttons"); ?> </div> <div class="input"><input type="text" class="tiny" name="mq_custom_minwidth[]" value="0" />px</div> <div class="label max"> <?php _e("Max width", "maxbuttons"); ?> </div> <div class="input max"><input type="text" class="tiny" name="mq_custom_maxwidth[]" value="0" />px</div> </div> <div class='label'><?php _e("Font size", "maxbuttons"); ?> </div> <div class='input'><input type='text' name='mq_font_size[]' class='tiny' value="90"> <?php echo maxButtonsUtils::selectify("mq_font_size_unit[]", $units, "%"); ?> </div> <div class='label'><?php _e("Button width", "maxbuttons"); ?> </div> <div class='input'><input type='text' name="mq_button_width[]" value="0" class='tiny'> <?php echo maxButtonsUtils::selectify("mq_button_width_unit[]", $units, ""); ?> </div> <div class='label'><?php _e("Container width", "maxbuttons"); ?> </div> <div class='input'> <input type='text' name="mq_container_width[]" value="0" class='tiny'> <?php echo maxButtonsUtils::selectify("mq_container_width_unit[]", $units, ""); ?> </div> <div class='label'><?php _e("Container float", "maxbuttons"); ?> </div> <div class="input"><?php echo maxButtonsUtils::selectify("mq_container_float[]", $container_floats, ""); ?> </div> <div class="label"><?php _e("Hide button on this view", "maxbuttons"); ?> </div> <div class="input"><input type="checkbox" name="mq_hide[]" value="none"></div> `</div> </div> <div id="media_desc"> <?php foreach ($media_desc as $key => $desc) { echo "<span id='{$key}'>{$desc}</span>"; } ?> </div> </div> <!-- container --> <?php }
public function admin_fields() { $data = $this->data[$this->blockname]; $media_names = maxButtonsUtils::get_media_query(1); // nicenames $media_desc = maxButtonsUtils::get_media_query(3); $units = array("px" => __("px", "maxbuttons"), "%" => __("%", "maxbuttons")); $container_floats = array("" => "", "none" => __("None", "maxbuttons"), "left" => __("Left", "maxbuttons"), "right" => __("Right", "maxbuttons")); foreach ($this->fields as $field => $options) { $default = isset($options["default"]) ? $options["default"] : ''; ${$field} = isset($data[$field]) ? $data[$field] : $default; ${$field . "_default"} = $default; } ?> <div class="option-container"> <div class="title"><?php _e('Responsive Settings', 'maxbuttons'); ?> </div> <div class="inside"> <div class="option-design"> <div class="label"><?php _e("Auto Responsive", 'maxbuttons'); ?> <?php _e("(Experimental)", "maxbuttons"); ?> </div> <div class="input"> <input type='checkbox' name='auto_responsive' value='1' <?php checked(1, $auto_responsive); ?> > </div> <div class="clear"></div> </div> <div class='option-design media_queries_options'> <?php foreach ($media_query as $item => $fields) { ?> <div class='media_query'> <span class='removebutton'><img src="<?php echo maxButtons::get_plugin_url(); ?> /assets/icons/remove.png"></span> <input type="hidden" name="media_query[]" value="<?php echo $item; ?> "> <label class='title'><?php echo $media_names[$item]; ?> </label> <p class='description'><?php echo $media_desc[$item]; ?> </p> <?php if ($item == "custom") { $custom_class = ''; } else { $custom_class = 'hidden'; } ?> <div class="custom" <?php echo $custom_class; ?> > <div class="label"><?php _e("Min width", "maxbuttons"); ?> </div> <div class="input"><input type="text" class="tiny" name="mq_custom_minwidth[]" value="<?php echo $fields["mq_custom_minwidth"]; ?> " />px</div> <div class="input max"><input type="text" class="tiny" name="mq_custom_maxwidth[]" value="<?php echo $fields["mq_custom_maxwidth"]; ?> " />px</div> <div class="label max"> <?php _e("Max width", "maxbuttons"); ?> </div> </div> <div class='label'><?php _e("Button width", 'maxbuttons'); ?> </div> <div class='input'><input type='text' name="mq_button_width[]" value="<?php echo $fields["mq_button_width"]; ?> " class='tiny'> <?php echo maxButtonsUtils::selectify("mq_button_width_unit[]", $units, $fields["mq_button_width_unit"]); ?> </div> <div class='label'><?php _e("Container width", 'maxbuttons'); ?> </div> <div class='input'><input type='text' name="mq_container_width[]" value="<?php echo $fields["mq_container_width"]; ?> " class='tiny'> <?php echo maxButtonsUtils::selectify("mq_container_width_unit[]", $units, $fields["mq_container_width_unit"]); ?> </div> <div class='label'><?php _e("Container float", "maxbuttons"); ?> </div> <div class="input"><?php echo maxButtonsUtils::selectify("mq_container_float[]", $container_floats, $fields["mq_container_float"]); ?> </div> </div> <div class="clear"></div> <?php } ?> <div class="new_query_space"></div> <div class="option-design new-query"> <div class="label"><?php _e('New Query', 'maxbuttons'); ?> </div> <div class="input"> <?php echo maxButtonsUtils::selectify("new_query", $media_names, ''); ?> <a class="button add_media_query"><?php _e("Add", "maxbuttons"); ?> </a> </div> <div class="clear"></div> </div> </div> </div> <!-- inside --> <div class='media_option_prot'> <div class='media_query'> <span class='removebutton'><img src="<?php echo maxButtons::get_plugin_url(); ?> /assets/icons/remove.png"></span> <input type="hidden" name="media_query[]" value=""> <label class='title'></label> <p class='description'>Description here</p> <div class="custom"> <div class="label"><?php _e("Min width", "maxbuttons"); ?> </div> <div class="input"><input type="text" class="tiny" name="mq_custom_minwidth[]" value="0" />px</div> <div class="input max"><input type="text" class="tiny" name="mq_custom_maxwidth[]" value="0" />px</div> <div class="label max"> <?php _e("Max width", "maxbuttons"); ?> </div> </div> <div class='label'><?php _e("Button width", "maxbuttons"); ?> </div> <div class='input'><input type='text' name="mq_button_width[]" value="0" class='tiny'> <?php echo maxButtonsUtils::selectify("mq_button_width_unit[]", $units, ""); ?> </div> <div class='label'><?php _e("Container width", "maxbuttons"); ?> </div> <div class='input'> <input type='text' name="mq_container_width[]" value="0" class='tiny'> <?php echo maxButtonsUtils::selectify("mq_container_width_unit[]", $units, ""); ?> </div> <div class='label'><?php _e("Container float", "maxbuttons"); ?> </div> <div class="input"><?php echo maxButtonsUtils::selectify("mq_container_float[]", $container_floats, ""); ?> </div> `</div> <div class="clear"></div> </div> <div id="media_desc"> <?php foreach ($media_desc as $key => $desc) { echo "<span id='{$key}'>{$desc}</span>"; } ?> </div> </div> <!-- container --> <?php }
alert("<?php _e('Please select a button.', 'maxbuttons'); ?> "); return; } // Send shortcode to the editor window.send_to_editor('[maxbutton id="' + button_id + '"]'); } </script> <div id="select-maxbutton-container" style="display:none" > <div class="wrap"> <h2 style="padding-top: 3px; padding-left: 40px; background: url(<?php echo maxButtons::get_plugin_url() . 'images/mb-peach-32.png'; ?> ) no-repeat;"> <?php _e('Insert Button into Editor', 'maxbuttons'); ?> </h2> <p><?php _e('Select a button from the list below to place the button shortcode in the editor.', 'maxbuttons'); ?> </p> <div id="mb_media_buttons"> <div class='loading'><?php