| @@ -17,112 +17,83 @@ | ||
| 17 | 17 | } |
| 18 | 18 | |
| 19 | 19 | ?> |
| 20 | 20 | |
| 21 | -<div class="postbox "> | |
| 22 | - <div class="postbox-header"> | |
| 23 | - <h2 class="hndle"> | |
| 24 | - <?php | |
| 25 | - esc_html_e( 'Publish', 'wpcoder' ); ?> | |
| 26 | - </h2> | |
| 21 | +<div class="wowp-settings__header"> | |
| 22 | + | |
| 23 | + <div class="wowp-settings__title"> | |
| 24 | + <label class="screen-reader-text" id="title-prompt-text" | |
| 25 | + for="title"><?php esc_html_e( 'Enter title here', 'wp-coder' ); ?> | |
| 26 | + </label> | |
| 27 | + <?php Field::text( 'title' ); ?> | |
| 28 | + <input type="submit" name="submit_settings" id="submit_settings" class="button wowp-button button-dark" | |
| 29 | + value="<?php esc_attr_e( 'Save', 'wp-coder' ); ?>"> | |
| 27 | 30 | </div> |
| 28 | 31 | |
| 29 | - <div class="inside"> | |
| 32 | + <div class="wowp-settings__publish"> | |
| 30 | 33 | |
| 31 | - <div class="submitbox wowp-sidebar" id="submitpost"> | |
| 34 | + <div class="wowp-settings__publish-status"> | |
| 35 | + <div class="wowp-field has-checkbox"> | |
| 36 | + <span class="label"> | |
| 37 | + <?php esc_html_e( 'Deactivate', 'wp-coder' ); ?> | |
| 38 | + <sup class="wowp-tooltip" data-tooltip="Temporarily disables this code snippet without deleting it.">ℹ</sup> | |
| 39 | + </span> | |
| 40 | + <label class="switch"> | |
| 41 | + <?php Field::checkbox( 'status' ); ?> | |
| 42 | + <span class="slider"></span> | |
| 43 | + </label> | |
| 44 | + </div> | |
| 32 | 45 | |
| 33 | - <div id="minor-publishing"> | |
| 34 | - <div class="misc-pub-section wowp-sidebar-pub-section"> | |
| 46 | + <div class="wowp-field has-checkbox"> | |
| 47 | + <span class="label"> | |
| 48 | + <?php esc_html_e( 'Test mode', 'wp-coder' ); ?> | |
| 49 | + <sup class="wowp-tooltip" | |
| 50 | + data-tooltip="Code runs only for logged-in administrators. Useful for testing before publishing.">ℹ</sup> | |
| 51 | + </span> | |
| 52 | + <label class="switch"> | |
| 53 | + <?php Field::checkbox( 'mode' ); ?> | |
| 54 | + <span class="slider"></span> | |
| 55 | + </label> | |
| 56 | + </div> | |
| 35 | 57 | |
| 36 | - <div class="wowp-field has-checkbox"> | |
| 37 | - <label> | |
| 38 | - <span class="label"><?php | |
| 39 | - esc_html_e( 'Status', 'wpcoder' ); ?></span> | |
| 40 | - <?php | |
| 41 | - Field::checkbox( 'status' ); ?> | |
| 42 | - <span><?php | |
| 43 | - esc_html_e( 'Deactivate', 'wpcoder' ); ?></span> | |
| 44 | - </label> | |
| 58 | + </div> | |
| 45 | 59 | |
| 46 | - </div> | |
| 60 | + <div class="wowp-settings__publish-info"> | |
| 61 | + <?php if ( ! empty( $shortcode ) ) : ?> | |
| 62 | + <div class="wowp-field has-addon"> | |
| 63 | + <label for="shortcode" class="label is-addon"> | |
| 64 | + <span class="wowp-tooltip on-right is-pointer can-copy" data-tooltip="Copy"> | |
| 65 | + <span class="dashicons dashicons-shortcode"></span> | |
| 66 | + </span> | |
| 67 | + </label> | |
| 68 | + <input type="text" id="shortcode" readonly value="<?php echo esc_attr( $shortcode ); ?>"> | |
| 69 | + </div> | |
| 70 | + <?php endif; ?> | |
| 47 | 71 | |
| 48 | - <div class="wowp-field has-checkbox"> | |
| 49 | - <label> | |
| 50 | - <span class="label"><?php | |
| 51 | - esc_html_e( 'Test mode', 'wpcoder' ); ?></span> | |
| 52 | - <?php | |
| 53 | - Field::checkbox( 'mode' ); ?> | |
| 54 | - <span><?php | |
| 55 | - esc_html_e( 'Activate', 'wpcoder' ); ?></span> | |
| 56 | - </label> | |
| 57 | - </div> | |
| 72 | + <div class="wowp-field has-addon"> | |
| 73 | + <label for="tag" class="label is-addon"><span class="dashicons dashicons-tag"></span></label> | |
| 74 | + <input list="wowp-tags" type="text" name="tag" id="tag" | |
| 75 | + value="<?php echo esc_attr( $default['tag'] ); ?>"> | |
| 76 | + <datalist id="wowp-tags"> | |
| 77 | + <?php DBManager::display_tags(); ?> | |
| 78 | + </datalist> | |
| 79 | + </div> | |
| 58 | 80 | |
| 59 | - <div class="wowp-field has-addon border-default"> | |
| 60 | - <label for="tag" class="is-addon"><span class="dashicons dashicons-tag"></span></label> | |
| 61 | - <input list="wowp-tags" type="text" name="tag" id="tag" value="<?php | |
| 62 | - echo esc_attr( $default['tag'] ); ?>"> | |
| 63 | - <datalist id="wowp-tags"> | |
| 64 | - <?php | |
| 65 | - DBManager::display_tags(); ?> | |
| 66 | - </datalist> | |
| 67 | - </div> | |
| 68 | - | |
| 69 | - <div class="wowp-field has-addon border-default"> | |
| 70 | - <label for="link" class="is-addon"> | |
| 71 | - <?php | |
| 72 | - if ( ! empty( $link ) ): ?> | |
| 73 | - <a href="<?php | |
| 74 | - echo esc_url( $link ); ?>" target="_blank"> | |
| 75 | - <span class="dashicons dashicons-admin-links"></span> | |
| 76 | - </a> | |
| 77 | - <?php | |
| 78 | - else: ?> | |
| 81 | + <div class="wowp-field has-addon"> | |
| 82 | + <label for="link" class="label is-addon"> | |
| 83 | + <?php if ( ! empty( $link ) ): ?> | |
| 84 | + <a href="<?php echo esc_url( $link ); ?>" target="_blank"> | |
| 85 | + <span class="wowp-tooltip on-right is-pointer" data-tooltip="Open Link"> | |
| 79 | 86 | <span class="dashicons dashicons-admin-links"></span> |
| 80 | - <?php | |
| 81 | - endif; ?> | |
| 82 | - </label> | |
| 83 | - <input type="url" name="param[link]" id="link" value="<?php | |
| 84 | - echo esc_url( $link ); ?>"> | |
| 85 | - </div> | |
| 86 | - | |
| 87 | - <?php | |
| 88 | - if ( ! empty( $shortcode ) ) : ?> | |
| 89 | - <div class="wowp-field has-addon border-default"> | |
| 90 | - <label for="shortcode" class="is-addon wowp-shortcode-copy"> | |
| 91 | - <span class="dashicons dashicons-shortcode"></span> | |
| 92 | - </label> | |
| 93 | - <input type="text" id="shortcode" readonly value="<?php | |
| 94 | - echo esc_attr( $shortcode ); ?>"> | |
| 95 | - </div> | |
| 96 | - <?php | |
| 97 | - endif; ?> | |
| 98 | - | |
| 99 | - </div> | |
| 100 | - </div> | |
| 101 | - | |
| 102 | - <div class="major-publishing-actions" id="major-publishing-actions"> | |
| 103 | - <?php | |
| 104 | - if ( ! empty( $default['id'] ) ): ?> | |
| 105 | - <div id="delete-action"> | |
| 106 | - <a class="submitdelete deletion" href="<?php | |
| 107 | - echo esc_url( Link::remove( $default['id'] ) ); ?>"> | |
| 108 | - <?php | |
| 109 | - esc_html_e( 'Delete', 'floating-button' ); ?> | |
| 87 | + </span> | |
| 110 | 88 | </a> |
| 111 | - </div> | |
| 112 | - <?php | |
| 113 | - endif; ?> | |
| 114 | - | |
| 115 | - <div id="publishing-action"> | |
| 116 | - <?php | |
| 117 | - submit_button( null, 'primary', 'submit_settings', false ); ?> | |
| 118 | - </div> | |
| 119 | - <div class="clear"></div> | |
| 120 | - | |
| 89 | + <?php else: ?> | |
| 90 | + <span class="dashicons dashicons-admin-links"></span> | |
| 91 | + <?php endif; ?> | |
| 92 | + </label> | |
| 93 | + <input type="url" name="param[link]" id="link" value="<?php echo esc_url( $link ); ?>"> | |
| 121 | 94 | </div> |
| 95 | + </div> | |
| 122 | 96 | |
| 97 | + </div> | |
| 123 | 98 | |
| 124 | - </div> | |
| 125 | - </div> | |
| 126 | 99 | </div> |
| 127 | - | |
| 128 | -<?php | |