Changeset 3150237
- Timestamp:
- 09/11/2024 04:33:42 PM (15 months ago)
- Location:
- quicksnap
- Files:
-
- 91 added
- 1 deleted
- 14 edited
-
tags/1.0.4 (added)
-
tags/1.0.4/Admin (added)
-
tags/1.0.4/Admin/Admin.php (added)
-
tags/1.0.4/Admin/MetaBox.php (added)
-
tags/1.0.4/Admin/Template (added)
-
tags/1.0.4/Admin/Template/Metabox (added)
-
tags/1.0.4/Admin/Template/Metabox/custom-css.php (added)
-
tags/1.0.4/Admin/Template/Metabox/general-settings.php (added)
-
tags/1.0.4/Admin/Template/Metabox/sidebar.php (added)
-
tags/1.0.4/Admin/Template/Metabox/template-metabox.php (added)
-
tags/1.0.4/App (added)
-
tags/1.0.4/App/App.php (added)
-
tags/1.0.4/App/Shortcode.php (added)
-
tags/1.0.4/Includes (added)
-
tags/1.0.4/Includes/Includes.php (added)
-
tags/1.0.4/Includes/Post_Type.php (added)
-
tags/1.0.4/assets (added)
-
tags/1.0.4/assets/admin (added)
-
tags/1.0.4/assets/admin/css (added)
-
tags/1.0.4/assets/admin/css/quicksnap-admin.css (added)
-
tags/1.0.4/assets/admin/icon (added)
-
tags/1.0.4/assets/admin/icon/code.svg (added)
-
tags/1.0.4/assets/admin/icon/sliders-horizontal.svg (added)
-
tags/1.0.4/assets/admin/js (added)
-
tags/1.0.4/assets/admin/js/quicksnap-admin.js (added)
-
tags/1.0.4/assets/app (added)
-
tags/1.0.4/assets/app/css (added)
-
tags/1.0.4/assets/app/css/quicksnap-app.css (added)
-
tags/1.0.4/assets/app/img (added)
-
tags/1.0.4/assets/app/img/placeholder-150.png (added)
-
tags/1.0.4/assets/app/js (added)
-
tags/1.0.4/assets/app/js/quicksnap-app.js (added)
-
tags/1.0.4/composer.json (added)
-
tags/1.0.4/quicksnap.php (added)
-
tags/1.0.4/readme.txt (added)
-
tags/1.0.4/vendor (added)
-
tags/1.0.4/vendor/appsero (added)
-
tags/1.0.4/vendor/appsero/client (added)
-
tags/1.0.4/vendor/appsero/client/.editorconfig (added)
-
tags/1.0.4/vendor/appsero/client/.github (added)
-
tags/1.0.4/vendor/appsero/client/.github/workflows (added)
-
tags/1.0.4/vendor/appsero/client/.github/workflows/wpcs.yml (added)
-
tags/1.0.4/vendor/appsero/client/.gitignore (added)
-
tags/1.0.4/vendor/appsero/client/.php-cs-fixer.dist.php (added)
-
tags/1.0.4/vendor/appsero/client/composer.json (added)
-
tags/1.0.4/vendor/appsero/client/composer.lock (added)
-
tags/1.0.4/vendor/appsero/client/phpcs.xml.dist (added)
-
tags/1.0.4/vendor/appsero/client/readme.md (added)
-
tags/1.0.4/vendor/appsero/client/src (added)
-
tags/1.0.4/vendor/appsero/client/src/Client.php (added)
-
tags/1.0.4/vendor/appsero/client/src/Insights.php (added)
-
tags/1.0.4/vendor/appsero/client/src/License.php (added)
-
tags/1.0.4/vendor/autoload.php (added)
-
tags/1.0.4/vendor/composer (added)
-
tags/1.0.4/vendor/composer/ClassLoader.php (added)
-
tags/1.0.4/vendor/composer/InstalledVersions.php (added)
-
tags/1.0.4/vendor/composer/LICENSE (added)
-
tags/1.0.4/vendor/composer/autoload_classmap.php (added)
-
tags/1.0.4/vendor/composer/autoload_namespaces.php (added)
-
tags/1.0.4/vendor/composer/autoload_psr4.php (added)
-
tags/1.0.4/vendor/composer/autoload_real.php (added)
-
tags/1.0.4/vendor/composer/autoload_static.php (added)
-
tags/1.0.4/vendor/composer/installed.json (added)
-
tags/1.0.4/vendor/composer/installed.php (added)
-
tags/1.0.4/vendor/composer/platform_check.php (added)
-
trunk/Admin/Admin.php (modified) (2 diffs)
-
trunk/Admin/MetaBox.php (modified) (3 diffs)
-
trunk/Admin/Template/Metabox/custom-css.php (added)
-
trunk/Admin/Template/Metabox/general-settings.php (added)
-
trunk/Admin/Template/Metabox/sidebar.php (added)
-
trunk/Admin/Template/Metabox/template-metabox.php (modified) (2 diffs)
-
trunk/App/Shortcode.php (modified) (1 diff)
-
trunk/Includes/Post_Type.php (modified) (2 diffs)
-
trunk/README.md (deleted)
-
trunk/assets/admin/css/quicksnap-admin.css (modified) (1 diff)
-
trunk/assets/admin/icon (added)
-
trunk/assets/admin/icon/code.svg (added)
-
trunk/assets/admin/icon/sliders-horizontal.svg (added)
-
trunk/assets/admin/js/quicksnap-admin.js (modified) (1 diff)
-
trunk/composer.json (modified) (1 diff)
-
trunk/quicksnap.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/vendor/appsero (added)
-
trunk/vendor/appsero/client (added)
-
trunk/vendor/appsero/client/.editorconfig (added)
-
trunk/vendor/appsero/client/.github (added)
-
trunk/vendor/appsero/client/.github/workflows (added)
-
trunk/vendor/appsero/client/.github/workflows/wpcs.yml (added)
-
trunk/vendor/appsero/client/.gitignore (added)
-
trunk/vendor/appsero/client/.php-cs-fixer.dist.php (added)
-
trunk/vendor/appsero/client/composer.json (added)
-
trunk/vendor/appsero/client/composer.lock (added)
-
trunk/vendor/appsero/client/phpcs.xml.dist (added)
-
trunk/vendor/appsero/client/readme.md (added)
-
trunk/vendor/appsero/client/src (added)
-
trunk/vendor/appsero/client/src/Client.php (added)
-
trunk/vendor/appsero/client/src/Insights.php (added)
-
trunk/vendor/appsero/client/src/License.php (added)
-
trunk/vendor/composer/InstalledVersions.php (added)
-
trunk/vendor/composer/autoload_classmap.php (modified) (1 diff)
-
trunk/vendor/composer/autoload_psr4.php (modified) (1 diff)
-
trunk/vendor/composer/autoload_real.php (modified) (1 diff)
-
trunk/vendor/composer/autoload_static.php (modified) (2 diffs)
-
trunk/vendor/composer/installed.json (added)
-
trunk/vendor/composer/installed.php (added)
-
trunk/vendor/composer/platform_check.php (added)
Legend:
- Unmodified
- Added
- Removed
-
quicksnap/trunk/Admin/Admin.php
r3146494 r3150237 27 27 // Enqueue Admin Scripts. 28 28 add_action( 'admin_enqueue_scripts', array( $this, 'wtdqs_quicksnap_admin_scripts' ) ); 29 30 // Initialize the plugin tracker 31 $this->wtdqs_appsero_init_tracker_quicksnap(); 29 32 } 30 33 … … 45 48 wp_enqueue_style( 'wtdqs-quicksnap-admin-stypes', WTDQS_QUICKSNAP_URL . 'assets/admin/css/quicksnap-admin.css', array(), WTDQS_QUICKSNAP_VERSION, 'all' ); 46 49 wp_enqueue_script( 'wtdqs-quicksnap-admin-script', WTDQS_QUICKSNAP_URL . 'assets/admin/js/quicksnap-admin.js', array( 'jquery' ), WTDQS_QUICKSNAP_VERSION, true ); 50 51 52 // $settings = wp_enqueue_code_editor(array('type' => 'text/css')); 53 // wp_add_inline_script( 54 // 'wtdqs-quicksnap-admin-script', 55 // sprintf('jQuery(function($) { wp.codeEditor.initialize($("#wtdqs_quicksnap_otp_custom_css"), %s); });', wp_json_encode($settings)) 56 // ); 57 // Localize the script with new data. 58 59 wp_enqueue_code_editor( array( 'type' => 'text/html' ) ); 60 } 61 62 /** 63 * Initialize the plugin tracker 64 * 65 * @return void 66 */ 67 public function wtdqs_appsero_init_tracker_quicksnap() { 68 69 70 71 $client = new \Appsero\Client( '2fa946af-208d-482d-8a71-2fdbe089e860', 'Quicksnap', __FILE__ ); 72 73 // Change Admin notice text 74 $notice = sprintf( $client->__trans( 'Want to help make <strong>%1$s</strong> even more awesome? Allow %1$s to collect non-sensitive diagnostic data and usage information. I agree to get Important Plugin Updates related information on my email from %1$s (I can unsubscribe anytime).' ), $client->name ); 75 $client->insights()->notice( $notice ); 76 // Active insights 77 $client->insights()->init(); 78 47 79 } 48 80 } -
quicksnap/trunk/Admin/MetaBox.php
r3146508 r3150237 61 61 public function wtdqs_quicksnap_meta_shortcode_box_callback() { 62 62 $post_id = get_the_ID(); 63 echo '<div class="wtdqs-quicksnap-shortcode-wrap">'; 63 64 if ( '' != $post_id ) { 64 echo '<input type="text" id="wtdqs_quicksnap_shortcode" name="wtdqs_quicksnap_shortcode" value="[wtdqs_quicksnap id=' . esc_attr( $post_id ) . ']" readonly>';65 echo '<input type="text" class="wtdqs-quicksnap-shortcode" name="wtdqs-quicksnap-shortcode" value="[wtdqs_quicksnap id=' . esc_attr( $post_id ) . ']" readonly>'; 65 66 } else { 66 echo '<input type="text" id="wtdqs_quicksnap_shortcode" name="wtdqs_quicksnap_shortcode" value="" readonly>'; 67 } 67 echo '<input type="text" class="wtdqs-quicksnap-shortcode" name="wtdqs-quicksnap-shortcode" value="" readonly>'; 68 } 69 echo '<a href="#" class="wtdqs-quicksnap-shortcode-btn button">Copy</a>'; 70 echo '</div>'; 68 71 } 69 72 … … 83 86 ); 84 87 } 88 85 89 86 90 /** … … 111 115 $quicksnap_data['thumbnail_position'] = isset( $_POST['_wtdqs_quicksnap_otp']['thumbnail_position'] ) ? sanitize_text_field( wp_unslash($_POST['_wtdqs_quicksnap_otp']['thumbnail_position']) ) : ''; 112 116 $quicksnap_data['is_excerpt'] = isset( $_POST['_wtdqs_quicksnap_otp']['is_excerpt'] ) ? 1 : 0; 117 $quicksnap_data['custom_css'] = isset( $_POST['_wtdqs_quicksnap_otp']['custom_css'] ) ? wp_kses_post( wp_unslash($_POST['_wtdqs_quicksnap_otp']['custom_css']) ) : ''; 113 118 114 119 update_post_meta( $post_id, '_wtdqs_quicksnap_otp', $quicksnap_data ); -
quicksnap/trunk/Admin/Template/Metabox/template-metabox.php
r3146494 r3150237 7 7 // Get the post meta value. 8 8 $data = isset( $args['_wtdqs_quicksnap_otp'] ) ? $args['_wtdqs_quicksnap_otp'] : ''; 9 // Get all post types including custom post types and pages. with name and value.10 $post_types = get_post_types( array( 'public' => true ), 'names' );11 unset( $post_types['attachment'] );12 unset( $post_types['wtdqs-quicksnap'] );13 9 14 $post_type = isset( $data['post_type'] ) ? $data['post_type'] : '';15 $maximum_items_display = isset( $data['maximum_items_display'] ) ? $data['maximum_items_display'] : '';16 $is_thumbnail = isset( $data['is_thumbnail'] ) ? $data['is_thumbnail'] : '';17 $thumbnail_position = isset( $data['thumbnail_position'] ) ? $data['thumbnail_position'] : '';18 $is_excerpt = isset( $data['is_excerpt'] ) ? $data['is_excerpt'] : '';19 10 20 11 // Nonce Field. … … 22 13 23 14 ?> 24 <div class="wtdqs-metabox-option"> 25 <div class="wtdqs-metabox-header"> 26 <h3><?php echo esc_html( __( 'Quicksnap Options', 'quicksnap' ) ); ?></h3> 27 </div> 28 <div class="wtdqs-flexbox"> 15 <div class="wtdqs-metabox-option wtdqs-flexbox"> 16 <?php 17 // include a template file wordpress standard way. usinge load template function. 18 load_template( WTDQS_QUICKSNAP_PATH . 'Admin/Template/Metabox/sidebar.php', true, $data ); 19 20 ?> 21 22 <div class="wtdqs-metabox-content"> 23 <div class="wtdqs-metabox-content-wrap"> 29 24 30 <div class="wtdqs-metabox-field wtdqs-width-50"> 31 <div class="wtdqs-metabox-field-wrap"> 32 <label for="_wtdqs_quicksnap_otp[post_type]"><?php echo esc_html( __( 'Select Post Type', 'quicksnap' ) ); ?></label> 33 <span><?php echo esc_html( __( 'Select Post Type', 'quicksnap' ) ); ?></span> 34 <select name="_wtdqs_quicksnap_otp[post_type]" id="_wtdqs_quicksnap_otp[post_type]"> 35 <?php 36 foreach ( $post_types as $value ) { 37 $selected = $post_type === $value ? 'selected' : ''; 38 ?> 39 <option value="<?php echo esc_attr( $value ); ?>" <?php echo esc_attr( $selected ); ?> ><?php echo esc_html( $value ); ?></option> 40 <?php } ?> 41 </select> 42 </div> 25 <!-- Load General settings Template--> 26 <?php 27 load_template( WTDQS_QUICKSNAP_PATH . 'Admin/Template/Metabox/general-settings.php', true, $data ); 28 ?> 29 <!-- Load General settings Template--> 30 31 <!-- Load Custom CSS Template--> 32 <?php 33 load_template( WTDQS_QUICKSNAP_PATH . 'Admin/Template/Metabox/custom-css.php', true, $data ); 34 ?> 35 <!-- Load Custom CSS Template--> 36 37 38 39 43 40 44 41 </div> 45 46 <div class="wtdqs-metabox-field wtdqs-width-50">47 <div class="wtdqs-metabox-field-wrap">48 <label for="_wtdqs_quicksnap_otp[maximum_items_display]"><?php echo esc_html( __( 'Maximum Items Search Result', 'quicksnap' ) ); ?></label>49 <span><?php echo esc_html( __( 'Type Maximum Items To Dysplay', 'quicksnap' ) ); ?></span>50 <input type="number" id="_wtdqs_quicksnap_otp[maximum_items_display]" value="<?php echo esc_html( $maximum_items_display ); ?>" name="_wtdqs_quicksnap_otp[maximum_items_display]">51 </div>52 53 </div>54 55 <div class="wtdqs-metabox-field wtdqs-width-50">56 <div class="wtdqs-metabox-field-wrap">57 <label for="_wtdqs_quicksnap_otp[is_thumbnail]"><?php echo esc_html( __( 'Show Thumbnail', 'quicksnap' ) ); ?></label>58 <span><?php echo esc_html( __( 'Enable Thumbnail', 'quicksnap' ) ); ?></span>59 <input type="checkbox" <?php echo $is_thumbnail == 1 ? 'checked' : ''; ?> id="_wtdqs_quicksnap_otp[is_thumbnail]" name="_wtdqs_quicksnap_otp[is_thumbnail]" >60 </div>61 62 </div>63 <div class="wtdqs-metabox-field wtdqs-width-50">64 <div class="wtdqs-metabox-field-wrap">65 <label for="_wtdqs_quicksnap_otp[thumbnail_position]"><?php echo esc_html( __( 'Thumbnail Position', 'quicksnap' ) ); ?></label>66 <span><?php echo esc_html( __( 'Select Thumbnail Position', 'quicksnap' ) ); ?></span>67 <select name="_wtdqs_quicksnap_otp[thumbnail_position]" id="_wtdqs_quicksnap_otp[thumbnail_position]">68 <option <?php echo '0' === $thumbnail_position ? 'selected' : ''; ?> value="0"><?php echo esc_html( __( 'Select Option', 'quicksnap' ) ); ?></option>69 <option <?php echo 'left' === $thumbnail_position ? 'selected' : ''; ?> value="left"><?php echo esc_html( __( 'Left', 'quicksnap' ) ); ?></option>70 <option <?php echo 'right' === $thumbnail_position ? 'selected' : ''; ?> value="right"><?php echo esc_html( __( 'Right', 'quicksnap' ) ); ?></option>71 <option <?php echo 'top' === $thumbnail_position ? 'selected' : ''; ?> value="top"><?php echo esc_html( __( 'Top', 'quicksnap' ) ); ?></option>72 <option <?php echo 'bottom' === $thumbnail_position ? 'selected' : ''; ?> value="bottom"><?php echo esc_html( __( 'Bottom', 'quicksnap' ) ); ?></option>73 </select>74 </div>75 76 </div>77 <div class="wtdqs-metabox-field wtdqs-width-50">78 <div class="wtdqs-metabox-field-wrap">79 <label for="_wtdqs_quicksnap_otp[is_excerpt]"><?php echo esc_html( __( 'Show Excerpt', 'quicksnap' ) ); ?></label>80 <span><?php echo esc_html( __( 'Enable Excerpt', 'quicksnap' ) ); ?></span>81 <input type="checkbox" <?php echo $is_excerpt == 1 ? 'checked' : ''; ?> id="_wtdqs_quicksnap_otp[is_excerpt]" name="_wtdqs_quicksnap_otp[is_excerpt]">82 </div>83 84 </div>85 86 42 </div> 87 43 -
quicksnap/trunk/App/Shortcode.php
r3146508 r3150237 189 189 // Enqueue app Scripts. 190 190 $this->wtdqs_quicksnap_shortcode_scripts(); 191 192 193 $custom_css = isset( $meta['custom_css'] ) ? $meta['custom_css'] : ''; 194 191 195 192 196 ob_start(); 197 193 198 ?> 199 <style> 200 <?php echo wp_kses_post($custom_css); ?> 201 </style> 194 202 <div id="wtdqs-quicksnap-<?php echo esc_attr( $this->post_id ); ?>" data-id="<?php echo esc_attr( $this->post_id ); ?>" class="wtdqs-quicksnap <?php echo esc_attr( $class ); ?>" > 195 203 <div class="search_box"> 196 204 197 205 <input class="wtdqs-search-field" type="text" id="wtdqs-search-field-<?php echo esc_attr( $this->post_id ); ?>" name="wtdqs-search-field" placeholder="Search"> 198 <!-- <input type="submit" value="Search"> -->206 199 207 </div> 200 208 <div class="wtdqs-search-result"> -
quicksnap/trunk/Includes/Post_Type.php
r3146494 r3150237 23 23 // Register Post Type. 24 24 add_action( 'init', array( $this, 'wtdqs_Quicksnap_post_type' ) ); 25 26 // Add Custom Columns. 27 add_filter( 'manage_wtdqs-quicksnap_posts_columns', array( $this, 'wtdqs_quicksnap_columns' ) ); 28 29 // add shortcode column data. 30 add_action( 'manage_wtdqs-quicksnap_posts_custom_column', array( $this, 'wtdqs_quicksnap_columns_data' ), 10, 2 ); 31 25 32 } 26 33 … … 74 81 register_post_type( 'wtdqs-quicksnap', $args ); 75 82 } 83 84 /** 85 * Add Custom Columns. 86 */ 87 public function wtdqs_quicksnap_columns( $columns ) { 88 $columns = array( 89 'cb' => '<input type="checkbox" />', 90 'title' => __( 'Title', 'quicksnap' ), 91 'shortcode' => __( 'ShortCode', 'quicksnap' ), 92 'date' => __( 'Date', 'quicksnap' ), 93 ); 94 95 return $columns; 96 } 97 98 /** 99 * Add Custom Columns Data. 100 */ 101 public function wtdqs_quicksnap_columns_data( $column, $post_id ) { 102 switch ( $column ) { 103 case 'shortcode': 104 echo '<div class="wtdqs-quicksnap-shortcode-wrap">'; 105 echo '<input type="text" class="wtdqs-quicksnap-shortcode" name="wtdqs_quicksnap_shortcode" value="[wtdqs_quicksnap id=' . esc_attr( $post_id ) . ']" readonly>'; 106 // add copy to clipboard. btn 107 echo '<a href="#" class="wtdqs-quicksnap-shortcode-btn button">Copy</a>'; 108 echo '</div>'; 109 break; 110 } 111 } 112 113 76 114 } -
quicksnap/trunk/assets/admin/css/quicksnap-admin.css
r3146494 r3150237 1 :root { 2 --wtdqs-primary-color: #1791C8; 3 } 4 5 .wtdqs-flexbox { 6 display: flex; 7 flex-wrap: wrap; 8 gap: 16px; 9 } 10 11 .wtdqs-width-50 { 12 width: calc(50% - 16px); 13 } 14 15 .wtdqs-gap-8 { 16 gap: 8px; 17 } 18 19 .wtdqs-metabox-option { 20 margin-top: 16px; 21 } 22 23 /* SideBar */ 24 .wtdqs-metabox-sidebar { 25 height: auto; 26 width: 180px; 27 } 28 29 .wtdqs-metabox-tabs-menu { 30 margin: 0; 31 border-radius: 4px; 32 } 33 34 .wtdqs-metabox-tabs-btn { 35 padding: 8px; 36 /*! flex-basis: inherit; */ 37 font-size: 15px; 38 font-style: normal; 39 font-weight: 400; 40 line-height: 24px; 41 text-decoration: none; 42 background-color: #1791C826; 43 color: #000; 44 border-radius: 4px; 45 /*! margin-bottom: 2px; */ 46 align-items: center; 47 } 48 49 .wtdqs-metabox-tabs-btn.active, 50 .wtdqs-metabox-tabs-btn:hover { 51 background-color: #1791C850; 52 } 53 54 .wtdqs-metabox-tabs-btn img { 55 height: 15px; 56 width: 15px; 57 } 58 59 .wtdqs-metabox-tabs-menu li { 60 margin: 0; 61 padding: 0; 62 margin-bottom: 3px; 63 } 64 65 .wtdqs-tabs-item { 66 display: none; 67 visibility: hidden; 68 opacity: 0; 69 } 70 71 .wtdqs-tabs-item.active { 72 display: block; 73 visibility: visible; 74 opacity: 1; 75 } 76 77 /* SideBar */ 78 79 /* Content */ 80 .wtdqs-metabox-content { 81 width: calc(100% - 196px); 82 } 83 84 .wtdqs-metabox-content-wrap { 85 border-left: 1px solid #ddd; 86 padding-left: 16px; 87 } 88 89 /* Content */ 1 90 2 91 3 .wtdqs-flexbox { 4 display: flex; 5 flex-wrap: wrap; 6 gap: 16px; 7 } 8 .wtdqs-width-50 { 9 width: calc(50% - 16px); 10 } 92 .wtdqs-metabox-field-wrap label, 93 .wtdqs-metabox-field-wrap span { 94 display: block; 95 line-height: 1.8; 96 } 11 97 12 .wtdqs-metabox-field-wrap label, .wtdqs-metabox-field-wrap span { 13 display: block; 14 line-height: 1.8; 15 } 16 .wtdqs-metabox-field-wrap label { 17 font-size: 16px; 18 font-weight: 700; 19 } 20 21 .wtdqs-metabox-field-wrap { 22 height: calc(100% - 32px); 23 border: 1px solid #ddd; 24 margin-bottom: 16px; 25 padding: 16px; 26 border-radius: 8px; 27 } 28 .wtdqs-metabox-option { 29 padding: 16px; 30 } 31 .wtdqs-metabox-field-wrap input[type="number"], .wtdqs-metabox-field-wrap select { 32 min-width: 70%; 33 border: 1px solid #ddd; 34 padding: 4px; 35 } 36 .wtdqs-metabox-field-wrap span { 37 margin-bottom: 10px; 38 } 98 .wtdqs-metabox-field-wrap label { 99 font-size: 16px; 100 font-weight: 700; 101 } 102 103 .wtdqs-metabox-field-wrap { 104 height: calc(100% - 32px); 105 border: 1px solid #ddd; 106 margin-bottom: 16px; 107 padding: 16px; 108 border-radius: 8px; 109 } 110 111 .wtdqs-metabox-field-wrap input[type="number"], 112 .wtdqs-metabox-field-wrap select { 113 min-width: 70%; 114 border: 1px solid #ddd; 115 padding: 4px; 116 } 117 118 .wtdqs-metabox-field-wrap span { 119 margin-bottom: 10px; 120 } 121 122 123 #custom-css .CodeMirror span { 124 margin: 0 !important; 125 padding: 0 !important; 126 display: inline-block !important; 127 128 } 129 130 .CodeMirror-wrap pre { 131 padding-left: 30px !important; 132 } 133 134 .CodeMirror-gutter-elt { 135 left: 0 !important; 136 min-width: auto !important; 137 } 138 139 .wtdqs-quicksnap-shortcode-wrap input { 140 text-align: center; 141 width: 100%; 142 margin-bottom: 9px; 143 } 144 145 .wtdqs-quicksnap-shortcode-wrap { 146 text-align: center; 147 } -
quicksnap/trunk/assets/admin/js/quicksnap-admin.js
r3146494 r3150237 1 1 /** 2 2 * Quicksnap Admin JS 3 * 3 * 4 4 * @since 1.0 5 5 */ 6 7 (function($) {8 $(document).ready(function(){9 6 10 $('input[name="wtdqs-search-field"]').on('change', function() { 11 alert('The input field has changed!'); 12 // Your code here 13 }); 7 (function ($) { 8 "use strict"; 9 $(document).ready(function () { 10 // Load Css Code Editor 11 // if #wtdqs_quicksnap_otp_custom_css exists 12 if ($("#wtdqs_quicksnap_otp_custom_css").length > 0) { 13 var editorSettings = wp.codeEditor.defaultSettings 14 ? _.clone(wp.codeEditor.defaultSettings) 15 : {}; 16 editorSettings.codemirror = _.extend({}, editorSettings.codemirror, { 17 indentUnit: 1, 18 tabSize: 2, 19 theme: "dracula", 20 }); 21 var editor = wp.codeEditor.initialize( 22 $("#wtdqs_quicksnap_otp_custom_css"), 23 editorSettings 24 ); 25 } 26 $('input[name="wtdqs-search-field"]').on("change", function () { 27 alert("The input field has changed!"); 28 // Your code here 29 }); 14 30 31 // Tabs Section added 32 $(".wtdqs-metabox-tabs-btn").on("click", function (e) { 33 e.preventDefault(); 34 35 var tab_id = $(this).attr("data-active"); 36 $(".wtdqs-metabox-tabs-btn").removeClass("active"); 37 $(".wtdqs-tabs-item").removeClass("active"); 38 39 $(this).addClass("active"); 40 $("#" + tab_id).addClass("active"); 15 41 }); 42 43 // copy to clipboard and show message 44 $(".wtdqs-quicksnap-shortcode-btn").on("click", function (e) { 45 e.preventDefault(); 46 47 let input = $(this) 48 .closest(".wtdqs-quicksnap-shortcode-wrap") 49 .find(".wtdqs-quicksnap-shortcode"); 50 input.select(); 51 document.execCommand("copy"); 52 // show message copied int the button 53 $(this).text("Copied!"); 54 }); 55 }); 16 56 })(jQuery); -
quicksnap/trunk/composer.json
r3146494 r3150237 18 18 "lint": "phpcs", 19 19 "lint-fix": "phpcbf" 20 }, 21 "require": { 22 "appsero/client": "^2.0" 20 23 } 21 24 } -
quicksnap/trunk/quicksnap.php
r3146695 r3150237 6 6 * Plugin URI: https://github.com/mdrejon/quicksnap 7 7 * Description: Quicksnap is a plugin that allows you to search for posts and pages in the WordPress admin area. 8 * Version: 1.0. 38 * Version: 1.0.4 9 9 * Author: Sydur Rahman 10 10 * Author URI: https://github.com/mdrejon/ … … 14 14 * Domain Path: /languages 15 15 * Requires at least: 4.9 16 * Requires PHP: 5.2.416 * Requires PHP: 7.2 17 17 */ 18 18 -
quicksnap/trunk/readme.txt
r3146695 r3150237 2 2 Contributors: mdrejon 3 3 Tags: ajax search, product search, woocommerce search, post type search 4 Requires at least: 4. 24 Requires at least: 4.9 5 5 Tested up to: 6.6 6 6 Requires PHP: 7.4 7 Stable tag: 1.0. 37 Stable tag: 1.0.4 8 8 License: GPL-2.0+ 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.txt … … 32 32 33 33 34 = 1.0. 2- 05/09/2024 =34 = 1.0.3 - 05/09/2024 = 35 35 36 - Update Screenshot 36 - Update Screenshot 37 38 39 = 1.0.4 - 11/09/2024 = 40 41 - New Feature : Custom Css Feature Added 42 - Improved : Admin Panel Structure 43 - Intrigation : Appsero 44 45 -
quicksnap/trunk/vendor/composer/autoload_classmap.php
r3146494 r3150237 8 8 return array( 9 9 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', 10 'PHPCSUtils\\AbstractSniffs\\AbstractArrayDeclarationSniff' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/AbstractSniffs/AbstractArrayDeclarationSniff.php', 11 'PHPCSUtils\\BackCompat\\BCFile' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/BackCompat/BCFile.php', 12 'PHPCSUtils\\BackCompat\\BCTokens' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/BackCompat/BCTokens.php', 13 'PHPCSUtils\\BackCompat\\Helper' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/BackCompat/Helper.php', 14 'PHPCSUtils\\Exceptions\\InvalidTokenArray' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/InvalidTokenArray.php', 15 'PHPCSUtils\\Exceptions\\TestFileNotFound' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/TestFileNotFound.php', 16 'PHPCSUtils\\Exceptions\\TestMarkerNotFound' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/TestMarkerNotFound.php', 17 'PHPCSUtils\\Exceptions\\TestTargetNotFound' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/TestTargetNotFound.php', 18 'PHPCSUtils\\Fixers\\SpacesFixer' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Fixers/SpacesFixer.php', 19 'PHPCSUtils\\Internal\\Cache' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Internal/Cache.php', 20 'PHPCSUtils\\Internal\\IsShortArrayOrList' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Internal/IsShortArrayOrList.php', 21 'PHPCSUtils\\Internal\\IsShortArrayOrListWithCache' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Internal/IsShortArrayOrListWithCache.php', 22 'PHPCSUtils\\Internal\\NoFileCache' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Internal/NoFileCache.php', 23 'PHPCSUtils\\Internal\\StableCollections' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Internal/StableCollections.php', 24 'PHPCSUtils\\TestUtils\\UtilityMethodTestCase' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/TestUtils/UtilityMethodTestCase.php', 25 'PHPCSUtils\\Tokens\\Collections' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Tokens/Collections.php', 26 'PHPCSUtils\\Tokens\\TokenHelper' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Tokens/TokenHelper.php', 27 'PHPCSUtils\\Utils\\Arrays' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Arrays.php', 28 'PHPCSUtils\\Utils\\Conditions' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Conditions.php', 29 'PHPCSUtils\\Utils\\Context' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Context.php', 30 'PHPCSUtils\\Utils\\ControlStructures' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/ControlStructures.php', 31 'PHPCSUtils\\Utils\\FunctionDeclarations' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/FunctionDeclarations.php', 32 'PHPCSUtils\\Utils\\GetTokensAsString' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/GetTokensAsString.php', 33 'PHPCSUtils\\Utils\\Lists' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Lists.php', 34 'PHPCSUtils\\Utils\\MessageHelper' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/MessageHelper.php', 35 'PHPCSUtils\\Utils\\Namespaces' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Namespaces.php', 36 'PHPCSUtils\\Utils\\NamingConventions' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/NamingConventions.php', 37 'PHPCSUtils\\Utils\\Numbers' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Numbers.php', 38 'PHPCSUtils\\Utils\\ObjectDeclarations' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/ObjectDeclarations.php', 39 'PHPCSUtils\\Utils\\Operators' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Operators.php', 40 'PHPCSUtils\\Utils\\Orthography' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Orthography.php', 41 'PHPCSUtils\\Utils\\Parentheses' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Parentheses.php', 42 'PHPCSUtils\\Utils\\PassedParameters' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/PassedParameters.php', 43 'PHPCSUtils\\Utils\\Scopes' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Scopes.php', 44 'PHPCSUtils\\Utils\\TextStrings' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/TextStrings.php', 45 'PHPCSUtils\\Utils\\UseStatements' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/UseStatements.php', 46 'PHPCSUtils\\Utils\\Variables' => $vendorDir . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Variables.php', 10 47 ); -
quicksnap/trunk/vendor/composer/autoload_psr4.php
r3146494 r3150237 10 10 'WTDQS_Quicksnap\\App\\' => array($baseDir . '/App'), 11 11 'WTDQS_Quicksnap\\Admin\\' => array($baseDir . '/Admin'), 12 'PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\' => array($vendorDir . '/dealerdirect/phpcodesniffer-composer-installer/src'), 13 'Appsero\\' => array($vendorDir . '/appsero/client/src'), 12 14 ); -
quicksnap/trunk/vendor/composer/autoload_real.php
r3146494 r3150237 22 22 return self::$loader; 23 23 } 24 25 require __DIR__ . '/platform_check.php'; 24 26 25 27 spl_autoload_register(array('ComposerAutoloaderInit5128285fc141787be41dafc4e9d96028', 'loadClassLoader'), true, true); -
quicksnap/trunk/vendor/composer/autoload_static.php
r3146494 r3150237 13 13 'WTDQS_Quicksnap\\App\\' => 20, 14 14 'WTDQS_Quicksnap\\Admin\\' => 22, 15 ), 16 'P' => 17 array ( 18 'PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\' => 57, 19 ), 20 'A' => 21 array ( 22 'Appsero\\' => 8, 15 23 ), 16 24 ); … … 29 37 0 => __DIR__ . '/../..' . '/Admin', 30 38 ), 39 'PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\' => 40 array ( 41 0 => __DIR__ . '/..' . '/dealerdirect/phpcodesniffer-composer-installer/src', 42 ), 43 'Appsero\\' => 44 array ( 45 0 => __DIR__ . '/..' . '/appsero/client/src', 46 ), 31 47 ); 32 48 33 49 public static $classMap = array ( 34 50 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', 51 'PHPCSUtils\\AbstractSniffs\\AbstractArrayDeclarationSniff' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/AbstractSniffs/AbstractArrayDeclarationSniff.php', 52 'PHPCSUtils\\BackCompat\\BCFile' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/BackCompat/BCFile.php', 53 'PHPCSUtils\\BackCompat\\BCTokens' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/BackCompat/BCTokens.php', 54 'PHPCSUtils\\BackCompat\\Helper' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/BackCompat/Helper.php', 55 'PHPCSUtils\\Exceptions\\InvalidTokenArray' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/InvalidTokenArray.php', 56 'PHPCSUtils\\Exceptions\\TestFileNotFound' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/TestFileNotFound.php', 57 'PHPCSUtils\\Exceptions\\TestMarkerNotFound' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/TestMarkerNotFound.php', 58 'PHPCSUtils\\Exceptions\\TestTargetNotFound' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Exceptions/TestTargetNotFound.php', 59 'PHPCSUtils\\Fixers\\SpacesFixer' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Fixers/SpacesFixer.php', 60 'PHPCSUtils\\Internal\\Cache' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Internal/Cache.php', 61 'PHPCSUtils\\Internal\\IsShortArrayOrList' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Internal/IsShortArrayOrList.php', 62 'PHPCSUtils\\Internal\\IsShortArrayOrListWithCache' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Internal/IsShortArrayOrListWithCache.php', 63 'PHPCSUtils\\Internal\\NoFileCache' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Internal/NoFileCache.php', 64 'PHPCSUtils\\Internal\\StableCollections' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Internal/StableCollections.php', 65 'PHPCSUtils\\TestUtils\\UtilityMethodTestCase' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/TestUtils/UtilityMethodTestCase.php', 66 'PHPCSUtils\\Tokens\\Collections' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Tokens/Collections.php', 67 'PHPCSUtils\\Tokens\\TokenHelper' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Tokens/TokenHelper.php', 68 'PHPCSUtils\\Utils\\Arrays' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Arrays.php', 69 'PHPCSUtils\\Utils\\Conditions' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Conditions.php', 70 'PHPCSUtils\\Utils\\Context' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Context.php', 71 'PHPCSUtils\\Utils\\ControlStructures' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/ControlStructures.php', 72 'PHPCSUtils\\Utils\\FunctionDeclarations' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/FunctionDeclarations.php', 73 'PHPCSUtils\\Utils\\GetTokensAsString' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/GetTokensAsString.php', 74 'PHPCSUtils\\Utils\\Lists' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Lists.php', 75 'PHPCSUtils\\Utils\\MessageHelper' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/MessageHelper.php', 76 'PHPCSUtils\\Utils\\Namespaces' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Namespaces.php', 77 'PHPCSUtils\\Utils\\NamingConventions' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/NamingConventions.php', 78 'PHPCSUtils\\Utils\\Numbers' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Numbers.php', 79 'PHPCSUtils\\Utils\\ObjectDeclarations' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/ObjectDeclarations.php', 80 'PHPCSUtils\\Utils\\Operators' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Operators.php', 81 'PHPCSUtils\\Utils\\Orthography' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Orthography.php', 82 'PHPCSUtils\\Utils\\Parentheses' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Parentheses.php', 83 'PHPCSUtils\\Utils\\PassedParameters' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/PassedParameters.php', 84 'PHPCSUtils\\Utils\\Scopes' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Scopes.php', 85 'PHPCSUtils\\Utils\\TextStrings' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/TextStrings.php', 86 'PHPCSUtils\\Utils\\UseStatements' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/UseStatements.php', 87 'PHPCSUtils\\Utils\\Variables' => __DIR__ . '/..' . '/phpcsstandards/phpcsutils/PHPCSUtils/Utils/Variables.php', 35 88 ); 36 89
Note: See TracChangeset
for help on using the changeset viewer.