Changeset 3454510
- Timestamp:
- 02/05/2026 11:02:08 AM (7 weeks ago)
- Location:
- docus
- Files:
-
- 24 added
- 2 deleted
- 10 edited
- 1 copied
-
tags/1.0.7 (copied) (copied from docus/trunk)
-
tags/1.0.7/.gitattributes (added)
-
tags/1.0.7/.github (added)
-
tags/1.0.7/.github/workflows (added)
-
tags/1.0.7/.github/workflows/asset-readme.yml (added)
-
tags/1.0.7/.github/workflows/deploy.yml (added)
-
tags/1.0.7/.wordpress-org (added)
-
tags/1.0.7/.wordpress-org/banner-772x250.jpg (added)
-
tags/1.0.7/.wordpress-org/icon-128x128.jpg (added)
-
tags/1.0.7/.wordpress-org/screenshot-1.png (added)
-
tags/1.0.7/.wordpress-org/screenshot-2.png (added)
-
tags/1.0.7/.wordpress-org/screenshot-3.png (added)
-
tags/1.0.7/.wordpress-org/screenshot-4.png (added)
-
tags/1.0.7/admin/Recommended_Plugins.php (modified) (8 diffs)
-
tags/1.0.7/admin/assets/js/plugins_install_manager.js (modified) (2 diffs)
-
tags/1.0.7/docus.php (modified) (1 diff)
-
tags/1.0.7/includes/class.docus.php (modified) (1 diff)
-
tags/1.0.7/includes/class.shortcode.php (modified) (2 diffs)
-
tags/1.0.7/languages (deleted)
-
trunk/.gitattributes (added)
-
trunk/.github (added)
-
trunk/.github/workflows (added)
-
trunk/.github/workflows/asset-readme.yml (added)
-
trunk/.github/workflows/deploy.yml (added)
-
trunk/.wordpress-org (added)
-
trunk/.wordpress-org/banner-772x250.jpg (added)
-
trunk/.wordpress-org/icon-128x128.jpg (added)
-
trunk/.wordpress-org/screenshot-1.png (added)
-
trunk/.wordpress-org/screenshot-2.png (added)
-
trunk/.wordpress-org/screenshot-3.png (added)
-
trunk/.wordpress-org/screenshot-4.png (added)
-
trunk/admin/Recommended_Plugins.php (modified) (8 diffs)
-
trunk/admin/assets/js/plugins_install_manager.js (modified) (2 diffs)
-
trunk/docus.php (modified) (1 diff)
-
trunk/includes/class.docus.php (modified) (1 diff)
-
trunk/includes/class.shortcode.php (modified) (2 diffs)
-
trunk/languages (deleted)
Legend:
- Unmodified
- Added
- Removed
-
docus/tags/1.0.7/admin/Recommended_Plugins.php
r2790076 r3454510 106 106 public function enqueue_assets( $hook_suffix ) { 107 107 if( $this->hook_suffix ){ 108 if( $this->hook_suffix == $hook_suffix ){109 wp_enqueue_script( 'htrp-plugin-install-manager', $this->assets_url . '/js/plugins_install_manager.js', array('jquery','wp-util', 'updates'), '1.0.0', true );108 if( $this->hook_suffix != $hook_suffix ){ 109 return; 110 110 } 111 } else { 112 wp_enqueue_script( 'htrp-plugin-install-manager', $this->assets_url . '/js/plugins_install_manager.js', array('jquery','wp-util', 'updates'), '1.0.0', true ); 113 } 114 115 /** 116 * Thickbox assest 117 */ 118 add_thickbox(); 111 } 112 113 wp_enqueue_script( 'docus-plugin-install-manager', $this->assets_url . '/js/plugins_install_manager.js', array('jquery','wp-util', 'updates'), '1.0.0', true ); 119 114 120 115 /** … … 123 118 $localize_vars['ajaxurl'] = admin_url('admin-ajax.php'); 124 119 $localize_vars['text_domain'] = sanitize_title_with_dashes( $this->text_domain ); 120 $localize_vars['nonce'] = wp_create_nonce('docus_rp_nonce'); 125 121 $localize_vars['buttontxt'] = array( 126 122 'buynow' => esc_html__( 'Buy Now', $this->text_domain ), … … 130 126 'active' => esc_html__( 'Activated', $this->text_domain ), 131 127 ); 132 wp_localize_script( ' htrp-plugin-install-manager', 'htrp_params', $localize_vars );128 wp_localize_script( 'docus-plugin-install-manager', 'htrp_params', $localize_vars ); 133 129 134 130 } … … 221 217 $description = strip_tags( $prepare_plugin[$data['slug']]['description'] ); 222 218 $author_name = wp_kses( $prepare_plugin[$data['slug']]['author'], $this->plugins_allowedtags ); 223 $details_link = self_admin_url('plugin-install.php?tab=plugin-information&plugin=' . $plugin['slug'] .'&TB_iframe=true&width=772&height=577'); 224 $target = '_self'; 225 $modal_class = 'class="thickbox open-plugin-details-modal"'; 219 $details_link = 'https://wordpress.org/plugins/' . $plugin['slug'] . '/'; 220 $target = '_blank'; 226 221 227 222 }else{ … … 235 230 $button_classes = 'button button-primary'; 236 231 $target = '_blank'; 237 $modal_class = '';238 232 } 239 233 … … 263 257 <div class="name column-name" style="margin-right: 0;"> 264 258 <h3> 265 <a href="<?php echo esc_url( $details_link ) ?>" target="<?php echo esc_attr( $target ) ?>" <?php echo $modal_class; ?>>259 <a href="<?php echo esc_url( $details_link ) ?>" target="<?php echo esc_attr( $target ) ?>"> 266 260 <?php echo esc_html( $title ) ?> 267 261 <img src="<?php echo esc_url( $image_url ) ?>" class="plugin-icon" alt="<?php echo esc_attr( $title ) ?>"> … … 289 283 }else{ 290 284 ?> 291 <button class="<?php echo $button_classes; ?>" data-pluginopt='<?php echo wp_json_encode( $data ); ?>'><?php echo $button_text; ?></button>285 <button class="<?php echo esc_attr($button_classes); ?>" data-pluginopt='<?php echo wp_json_encode( $data ); ?>'><?php echo esc_html($button_text); ?></button> 292 286 293 287 <?php } ?> 294 288 </div> 295 289 <div class="column-downloaded"> 296 <a href="<?php echo esc_url( $details_link ) ?>" target="<?php echo esc_attr( $target ) ?>" <?php echo $modal_class; ?>><?php echo esc_html__('More Details', $this->text_domain) ?></a>290 <a href="<?php echo esc_url( $details_link ) ?>" target="<?php echo esc_attr( $target ) ?>"><?php echo esc_html__('More Details', $this->text_domain) ?></a> 297 291 <span class="downloaded-count"> 298 292 <?php … … 391 385 public function plugin_activation() { 392 386 387 check_ajax_referer('docus_rp_nonce', 'nonce'); 388 393 389 if ( ! current_user_can( 'install_plugins' ) || ! isset( $_POST['location'] ) || ! $_POST['location'] ) { 394 390 wp_send_json_error( -
docus/tags/1.0.7/admin/assets/js/plugins_install_manager.js
r2790076 r3454510 93 93 action : htrp_params.text_domain+'_ajax_plugin_activation', 94 94 location : $plugindata['location'], 95 nonce : htrp_params.nonce, 95 96 }, 96 97 } ).done( function( result ) { … … 132 133 action : htrp_params.text_domain+'_ajax_plugin_activation', 133 134 location : $plugindata['location'], 135 nonce : htrp_params.nonce, 134 136 }, 135 137 }).done( function( response ) { -
docus/tags/1.0.7/docus.php
r2810628 r3454510 5 5 * Author: HasThemes 6 6 * Author URI: https://hasthemes.com/ 7 * Version: 1.0. 67 * Version: 1.0.7 8 8 * Text Domain: docus 9 9 * Domain Path: /languages -
docus/tags/1.0.7/includes/class.docus.php
r2790076 r3454510 26 26 function __construct() 27 27 { 28 add_action( 'init', array( $this, 'i18n') );29 add_action( ' plugins_loaded', array( $this, 'init' ));28 add_action( 'init', array( $this, 'i18n'), 1 ); 29 add_action( 'init', array( $this, 'init' ), 10 ); 30 30 add_action( 'wp_enqueue_scripts', array( $this, 'docus_assets_enqueue' ) ); 31 31 register_activation_hook(DOCUS_PL_ROOT, array( $this, 'docus_deactivate_pro_version' )); -
docus/tags/1.0.7/includes/class.shortcode.php
r2675425 r3454510 42 42 $list_attributes = shortcode_atts($default, $attributes); 43 43 44 $api_data = json_encode( 44 // Sanitize user-supplied attributes to prevent XSS 45 $key = sanitize_text_field( $list_attributes['key'] ); 46 $channelid = sanitize_text_field( $list_attributes['channelid'] ); 47 $limit = absint( $list_attributes['limit'] ); 48 49 $api_data = wp_json_encode( 45 50 array( 46 "api_key" => $ list_attributes['key'],47 "channel_id" => $ list_attributes['channelid'],51 "api_key" => $key, 52 "channel_id" => $channelid, 48 53 "layout_style" => docus_get_option('page_layout_style',''), 49 "video_limit" => $li st_attributes['limit'],54 "video_limit" => $limit, 50 55 ) 51 56 ); … … 53 58 ob_start(); 54 59 ?> 55 <div class="htyt-channel-area" id="<?php echo 'key-' .$list_attributes['key'].'-'.$list_attributes['channelid']; ?>">56 <div class="htyt-channel-top-area" data-apidata='<?php echo $api_data; ?>'>60 <div class="htyt-channel-area" id="<?php echo 'key-' . esc_attr( $key ) . '-' . esc_attr( $channelid ); ?>"> 61 <div class="htyt-channel-top-area" data-apidata='<?php echo esc_attr($api_data); ?>'> 57 62 <div class="htyt-container"> 58 63 <div class="htyt-channel-info-wrapper"> -
docus/trunk/admin/Recommended_Plugins.php
r2790076 r3454510 106 106 public function enqueue_assets( $hook_suffix ) { 107 107 if( $this->hook_suffix ){ 108 if( $this->hook_suffix == $hook_suffix ){109 wp_enqueue_script( 'htrp-plugin-install-manager', $this->assets_url . '/js/plugins_install_manager.js', array('jquery','wp-util', 'updates'), '1.0.0', true );108 if( $this->hook_suffix != $hook_suffix ){ 109 return; 110 110 } 111 } else { 112 wp_enqueue_script( 'htrp-plugin-install-manager', $this->assets_url . '/js/plugins_install_manager.js', array('jquery','wp-util', 'updates'), '1.0.0', true ); 113 } 114 115 /** 116 * Thickbox assest 117 */ 118 add_thickbox(); 111 } 112 113 wp_enqueue_script( 'docus-plugin-install-manager', $this->assets_url . '/js/plugins_install_manager.js', array('jquery','wp-util', 'updates'), '1.0.0', true ); 119 114 120 115 /** … … 123 118 $localize_vars['ajaxurl'] = admin_url('admin-ajax.php'); 124 119 $localize_vars['text_domain'] = sanitize_title_with_dashes( $this->text_domain ); 120 $localize_vars['nonce'] = wp_create_nonce('docus_rp_nonce'); 125 121 $localize_vars['buttontxt'] = array( 126 122 'buynow' => esc_html__( 'Buy Now', $this->text_domain ), … … 130 126 'active' => esc_html__( 'Activated', $this->text_domain ), 131 127 ); 132 wp_localize_script( ' htrp-plugin-install-manager', 'htrp_params', $localize_vars );128 wp_localize_script( 'docus-plugin-install-manager', 'htrp_params', $localize_vars ); 133 129 134 130 } … … 221 217 $description = strip_tags( $prepare_plugin[$data['slug']]['description'] ); 222 218 $author_name = wp_kses( $prepare_plugin[$data['slug']]['author'], $this->plugins_allowedtags ); 223 $details_link = self_admin_url('plugin-install.php?tab=plugin-information&plugin=' . $plugin['slug'] .'&TB_iframe=true&width=772&height=577'); 224 $target = '_self'; 225 $modal_class = 'class="thickbox open-plugin-details-modal"'; 219 $details_link = 'https://wordpress.org/plugins/' . $plugin['slug'] . '/'; 220 $target = '_blank'; 226 221 227 222 }else{ … … 235 230 $button_classes = 'button button-primary'; 236 231 $target = '_blank'; 237 $modal_class = '';238 232 } 239 233 … … 263 257 <div class="name column-name" style="margin-right: 0;"> 264 258 <h3> 265 <a href="<?php echo esc_url( $details_link ) ?>" target="<?php echo esc_attr( $target ) ?>" <?php echo $modal_class; ?>>259 <a href="<?php echo esc_url( $details_link ) ?>" target="<?php echo esc_attr( $target ) ?>"> 266 260 <?php echo esc_html( $title ) ?> 267 261 <img src="<?php echo esc_url( $image_url ) ?>" class="plugin-icon" alt="<?php echo esc_attr( $title ) ?>"> … … 289 283 }else{ 290 284 ?> 291 <button class="<?php echo $button_classes; ?>" data-pluginopt='<?php echo wp_json_encode( $data ); ?>'><?php echo $button_text; ?></button>285 <button class="<?php echo esc_attr($button_classes); ?>" data-pluginopt='<?php echo wp_json_encode( $data ); ?>'><?php echo esc_html($button_text); ?></button> 292 286 293 287 <?php } ?> 294 288 </div> 295 289 <div class="column-downloaded"> 296 <a href="<?php echo esc_url( $details_link ) ?>" target="<?php echo esc_attr( $target ) ?>" <?php echo $modal_class; ?>><?php echo esc_html__('More Details', $this->text_domain) ?></a>290 <a href="<?php echo esc_url( $details_link ) ?>" target="<?php echo esc_attr( $target ) ?>"><?php echo esc_html__('More Details', $this->text_domain) ?></a> 297 291 <span class="downloaded-count"> 298 292 <?php … … 391 385 public function plugin_activation() { 392 386 387 check_ajax_referer('docus_rp_nonce', 'nonce'); 388 393 389 if ( ! current_user_can( 'install_plugins' ) || ! isset( $_POST['location'] ) || ! $_POST['location'] ) { 394 390 wp_send_json_error( -
docus/trunk/admin/assets/js/plugins_install_manager.js
r2790076 r3454510 93 93 action : htrp_params.text_domain+'_ajax_plugin_activation', 94 94 location : $plugindata['location'], 95 nonce : htrp_params.nonce, 95 96 }, 96 97 } ).done( function( result ) { … … 132 133 action : htrp_params.text_domain+'_ajax_plugin_activation', 133 134 location : $plugindata['location'], 135 nonce : htrp_params.nonce, 134 136 }, 135 137 }).done( function( response ) { -
docus/trunk/docus.php
r2810628 r3454510 5 5 * Author: HasThemes 6 6 * Author URI: https://hasthemes.com/ 7 * Version: 1.0. 67 * Version: 1.0.7 8 8 * Text Domain: docus 9 9 * Domain Path: /languages -
docus/trunk/includes/class.docus.php
r2790076 r3454510 26 26 function __construct() 27 27 { 28 add_action( 'init', array( $this, 'i18n') );29 add_action( ' plugins_loaded', array( $this, 'init' ));28 add_action( 'init', array( $this, 'i18n'), 1 ); 29 add_action( 'init', array( $this, 'init' ), 10 ); 30 30 add_action( 'wp_enqueue_scripts', array( $this, 'docus_assets_enqueue' ) ); 31 31 register_activation_hook(DOCUS_PL_ROOT, array( $this, 'docus_deactivate_pro_version' )); -
docus/trunk/includes/class.shortcode.php
r2675425 r3454510 42 42 $list_attributes = shortcode_atts($default, $attributes); 43 43 44 $api_data = json_encode( 44 // Sanitize user-supplied attributes to prevent XSS 45 $key = sanitize_text_field( $list_attributes['key'] ); 46 $channelid = sanitize_text_field( $list_attributes['channelid'] ); 47 $limit = absint( $list_attributes['limit'] ); 48 49 $api_data = wp_json_encode( 45 50 array( 46 "api_key" => $ list_attributes['key'],47 "channel_id" => $ list_attributes['channelid'],51 "api_key" => $key, 52 "channel_id" => $channelid, 48 53 "layout_style" => docus_get_option('page_layout_style',''), 49 "video_limit" => $li st_attributes['limit'],54 "video_limit" => $limit, 50 55 ) 51 56 ); … … 53 58 ob_start(); 54 59 ?> 55 <div class="htyt-channel-area" id="<?php echo 'key-' .$list_attributes['key'].'-'.$list_attributes['channelid']; ?>">56 <div class="htyt-channel-top-area" data-apidata='<?php echo $api_data; ?>'>60 <div class="htyt-channel-area" id="<?php echo 'key-' . esc_attr( $key ) . '-' . esc_attr( $channelid ); ?>"> 61 <div class="htyt-channel-top-area" data-apidata='<?php echo esc_attr($api_data); ?>'> 57 62 <div class="htyt-container"> 58 63 <div class="htyt-channel-info-wrapper">
Note: See TracChangeset
for help on using the changeset viewer.