Changeset 2579014
- Timestamp:
- 08/05/2021 11:27:19 PM (5 years ago)
- File:
-
- 1 edited
-
cm-multisite-lite/trunk/index.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cm-multisite-lite/trunk/index.php
r2579009 r2579014 6 6 Author: CodingMall.com 7 7 Author URI: https://codingmall.com/wordpress/ 8 Version: 1.0. 08 Version: 1.0.1 9 9 License: GPLv2 (or later) 10 10 Text Domain: cm-ms-lite … … 26 26 static $dom =''; 27 27 static $mDom=''; 28 static $aid =''; 28 static $aid =0; 29 static $isMain=false; 29 30 30 31 static function initVars(){ 31 32 self::$dom = @$_SERVER['HTTP_HOST']; 32 33 self::$mDom = parse_url(get_option('siteurl'),PHP_URL_HOST); 34 35 if (self::$dom==self::$mDom) cm__msl_fe_global::$isMain=true; 33 36 34 37 self::$aid = self::getAid(self::$dom); … … 56 59 57 60 add_filter( "get_next_post_where", function($where, $in_same_term, $excluded_terms, $taxonomy, $post){ 58 $where .= " AND p.post_author='".cm__msl_fe_global::$aid."'"; 59 return $where; 61 if (cm__msl_fe_global::$isMain) return $where; 62 63 $where .= " AND p.post_author='".cm__msl_fe_global::$aid."'"; 64 return $where; 60 65 }, 10, 5); 61 66 62 67 add_filter( "get_previous_post_where", function($where, $in_same_term, $excluded_terms, $taxonomy, $post){ 63 $where .= " AND p.post_author='".cm__msl_fe_global::$aid."'"; 64 return $where; 68 if (cm__msl_fe_global::$isMain) return $where; 69 70 $where .= " AND p.post_author='".cm__msl_fe_global::$aid."'"; 71 return $where; 65 72 }, 10, 5); 66 73
Note: See TracChangeset
for help on using the changeset viewer.