Changeset 2870559
- Timestamp:
- 02/24/2023 11:18:07 AM (3 years ago)
- Location:
- multistore-multivendor/trunk
- Files:
-
- 2 edited
-
index.php (modified) (6 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
multistore-multivendor/trunk/index.php
r2581737 r2870559 6 6 Author: CodingMall.com 7 7 Author URI: https://codingmall.com/wordpress/ 8 Version: 1. 0.08 Version: 1.1.1 9 9 License: GPLv2 (or later) 10 10 Text Domain: cm-mswoo … … 50 50 } 51 51 } 52 53 52 54 53 55 private function setHooks(){ … … 55 57 56 58 if (is_admin()){ 59 add_filter( 'wp_dropdown_users_args', array($this,'wpdocs_add_subscribers_to_dropdown'),10,1 ); 57 60 }else{ 58 61 add_filter( 'pre_option_siteurl', array($this,'modif_url'), 10, 2 ); 59 62 add_filter( 'pre_option_home', array($this,'modif_url'), 10, 2 ); 60 63 61 add_action('wp_loaded', array($this, 'buffer_start'));62 add_action('shutdown', array($this, 'buffer_end' ));64 //add_action('wp_loaded', array($this, 'buffer_start')); 65 //add_action('shutdown', array($this, 'buffer_end' )); 63 66 add_action( 'woocommerce_product_query', array($this, 'modif_prod_qry') ); 64 67 add_filter( 'woocommerce_product_related_posts_query',array($this,'modif_related_prods'), 10, 3); 65 68 } 69 } 70 71 function wpdocs_add_subscribers_to_dropdown( $query_args ) { 72 //echo '<pre>';var_dump($query_args); die(); 73 $query_args['role__in'] = array( 'contributor', 'administrator' ); 74 $query_args['capability'] = []; 75 //$query_args['role__not_in'] = array( 'editor' ); 76 77 // Unset the 'who' as this defaults to the 'author' role 78 unset( $query_args['who'] ); 79 80 return $query_args; 66 81 } 67 82 … … 89 104 90 105 public function wpInit(){ 91 add_post_type_support( 'product', 'author');106 add_post_type_support( 'product', array('author') ); 92 107 } 93 108 94 public function buffer_start() { ob_start(array($this, 'modifContent')); }109 /* public function buffer_start() { ob_start(array($this, 'modifContent')); } 95 110 public function buffer_end() { @ob_end_flush(); } 96 111 … … 100 115 $content = str_replace($home,$dom,$content); 101 116 return $content; 102 } 117 } */ 103 118 104 119 private function getAid($dom){ … … 112 127 } 113 128 114 -
multistore-multivendor/trunk/readme.txt
r2581737 r2870559 5 5 Requires at least: 5.0 6 6 Tested up to: 5.8 7 Requires PHP: 7. 08 Stable tag: 1. 0.07 Requires PHP: 7.2 8 Stable tag: 1.1.1 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 76 76 == Upgrade Notice == 77 77 78 = 1. 0 =78 = 1.1.1 = bug fixed and now compatible with WP 6.1
Note: See TracChangeset
for help on using the changeset viewer.