18
+		else :
19
+			the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
20
+		endif;
21
+
22
+		if ( 'post' === get_post_type() ) :
23
+			?>
24
+			<div class="entry-meta">
25
+				<?php
26
+				whitesports_posted_on();
27
+				whitesports_posted_by();
28
+				?>
29
+			</div><!-- .entry-meta -->
30
+		<?php endif; ?>
31
+	</header><!-- .entry-header -->
32
+	<div class="entry-content">
33
+		<?php
34
+		the_content(
35
+			sprintf(
36
+				wp_kses(
37
+					/* translators: %s: Name of current post. Only visible to screen readers */
38
+					__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'whitesports' ),
39
+					array(
40
+						'span' => array(
41
+							'class' => array(),
42
+						),
43
+					)
44
+				),
45
+				wp_kses_post( get_the_title() )
46
+			)
47
+		);
48
+
49
+		wp_link_pages(
50
+			array(
51
+				'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'whitesports' ),
52
+				'after'  => '</div>',
53
+			)
54
+		);
55
+		?>
56
+	</div><!-- .entry-content -->
57
+
58
+</article><!-- #post-<?php the_ID(); ?> -->
59
+<hr>
60
+<p  class='text-center h2'>
61
+บทความที่เกี่ยวข้อง</p><br>
62
+<div class='row'>
63
+<?php
64
+
65
+$related = get_posts( array( 'category__in' => wp_get_post_categories($post->ID), 'numberposts' => 4, 'post__not_in' => array($post->ID) ) );
66
+if( $related ) foreach( $related as $post ) {
67
+setup_postdata($post); ?>
68
+        <div class='col-md-3'>
69
+<?php 
70
+the_post_thumbnail( 'medium' );    ?>
71
+        <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a>
72
+        </div>
73
+<?php }
74
+wp_reset_postdata(); ?>
75
+</div>
76
+<hr>

+ 2 - 2
app/wp-content/themes/whitesports/template-parts/content-search.php

@@ -9,7 +9,7 @@
9 9
 
10 10
 ?>
11 11
 
12
-<article id="post-<?php the_ID(); ?>" class="col-md-3" style='margin-bottom:1.5em'>
12
+<article id="post-<?php the_ID(); ?>" class="col-md-4 article-item" style='margin-bottom:1.5em'>
13 13
 	<?php whitesports_post_thumbnail(); ?>
14 14
 		<?php if ( 'post' === get_post_type() ) : ?>
15 15
 		<div class="entry-meta">
@@ -19,5 +19,5 @@
19 19
 		</div><!-- .entry-meta -->
20 20
 		<?php endif; ?>
21 21
 
22
-	<?php the_title( sprintf( '<strong><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></strong>' ); ?>
22
+	<?php the_title( sprintf( '<strong><a href="%s" rel="bookmark" class="text">', esc_url( get_permalink() ) ), '</a></strong>' ); ?>
23 23
 </article><!-- #post-<?php the_ID(); ?> -->

+ 1 - 1
app/wp-content/themes/whitesports/template-parts/content.php

@@ -62,7 +62,7 @@
62 62
 <div class='row'>
63 63
 <?php
64 64
 
65
-$related = get_posts( array( 'category__in' => wp_get_post_categories($post->ID), 'numberposts' => 5, 'post__not_in' => array($post->ID) ) );
65
+$related = get_posts( array( 'category__in' => wp_get_post_categories($post->ID), 'numberposts' => 4, 'post__not_in' => array($post->ID) ) );
66 66
 if( $related ) foreach( $related as $post ) {
67 67
 setup_postdata($post); ?>
68 68
         <div class='col-md-3'>

二進制
app/wp-content/uploads/2021/11/00-100x100.jpg


二進制
app/wp-content/uploads/2021/11/00-150x150.jpg


二進制
app/wp-content/uploads/2021/11/00-300x169.jpg


二進制
app/wp-content/uploads/2021/11/00-300x300.jpg


二進制
app/wp-content/uploads/2021/11/00-600x338.jpg


二進制
app/wp-content/uploads/2021/11/00-60x60.jpg


二進制
app/wp-content/uploads/2021/11/00-768x432.jpg


二進制
app/wp-content/uploads/2021/11/00.jpg


二進制
app/wp-content/uploads/2021/11/0000-100x100.jpg


二進制
app/wp-content/uploads/2021/11/0000-150x150.jpg


二進制
app/wp-content/uploads/2021/11/0000-300x169.jpg


二進制
app/wp-content/uploads/2021/11/0000-300x300.jpg


二進制
app/wp-content/uploads/2021/11/0000-600x338.jpg


二進制
app/wp-content/uploads/2021/11/0000-60x60.jpg


二進制
app/wp-content/uploads/2021/11/0000-768x432.jpg


二進制
app/wp-content/uploads/2021/11/0000.jpg


二進制
app/wp-content/uploads/2021/11/1-1-100x100.jpg


二進制
app/wp-content/uploads/2021/11/1-1-150x150.jpg


二進制
app/wp-content/uploads/2021/11/1-1-300x169.jpg


二進制
app/wp-content/uploads/2021/11/1-1-300x300.jpg


二進制
app/wp-content/uploads/2021/11/1-1-600x338.jpg


二進制
app/wp-content/uploads/2021/11/1-1-60x60.jpg


二進制
app/wp-content/uploads/2021/11/1-1-768x432.jpg


二進制
app/wp-content/uploads/2021/11/1-1.jpg


二進制
app/wp-content/uploads/2021/11/111-100x100.jpg


二進制
app/wp-content/uploads/2021/11/111-150x150.jpg


二進制
app/wp-content/uploads/2021/11/111-300x169.jpg


二進制
app/wp-content/uploads/2021/11/111-300x300.jpg


二進制
app/wp-content/uploads/2021/11/111-600x338.jpg


二進制
app/wp-content/uploads/2021/11/111-60x60.jpg


二進制
app/wp-content/uploads/2021/11/111-768x432.jpg


二進制
app/wp-content/uploads/2021/11/111.jpg


二進制
app/wp-content/uploads/2021/11/12-100x100.jpg


二進制
app/wp-content/uploads/2021/11/12-150x150.jpg


二進制
app/wp-content/uploads/2021/11/12-300x169.jpg


二進制
app/wp-content/uploads/2021/11/12-300x300.jpg


二進制
app/wp-content/uploads/2021/11/12-600x338.jpg


二進制
app/wp-content/uploads/2021/11/12-60x60.jpg


二進制
app/wp-content/uploads/2021/11/12-768x432.jpg


二進制
app/wp-content/uploads/2021/11/12.jpg


二進制
app/wp-content/uploads/2021/11/1212-100x100.jpg


二進制
app/wp-content/uploads/2021/11/1212-150x150.jpg


二進制
app/wp-content/uploads/2021/11/1212-300x169.jpg


二進制
app/wp-content/uploads/2021/11/1212-300x300.jpg


二進制
app/wp-content/uploads/2021/11/1212-600x338.jpg


二進制
app/wp-content/uploads/2021/11/1212-60x60.jpg


二進制
app/wp-content/uploads/2021/11/1212-768x432.jpg


二進制
app/wp-content/uploads/2021/11/1212.jpg


二進制
app/wp-content/uploads/2021/11/14-100x100.jpg


二進制
app/wp-content/uploads/2021/11/14-150x150.jpg


二進制
app/wp-content/uploads/2021/11/14-300x169.jpg


二進制
app/wp-content/uploads/2021/11/14-300x300.jpg


二進制
app/wp-content/uploads/2021/11/14-600x338.jpg


二進制
app/wp-content/uploads/2021/11/14-60x60.jpg


二進制
app/wp-content/uploads/2021/11/14-768x432.jpg


二進制
app/wp-content/uploads/2021/11/14.jpg


二進制
app/wp-content/uploads/2021/11/2-1-100x100.jpg


二進制
app/wp-content/uploads/2021/11/2-1-150x150.jpg


二進制
app/wp-content/uploads/2021/11/2-1-300x169.jpg


二進制
app/wp-content/uploads/2021/11/2-1-300x300.jpg


二進制
app/wp-content/uploads/2021/11/2-1-600x338.jpg


二進制
app/wp-content/uploads/2021/11/2-1-60x60.jpg


二進制
app/wp-content/uploads/2021/11/2-1-768x432.jpg


二進制
app/wp-content/uploads/2021/11/2-1.jpg


二進制
app/wp-content/uploads/2021/11/3-1-100x100.jpg


二進制
app/wp-content/uploads/2021/11/3-1-150x150.jpg


二進制
app/wp-content/uploads/2021/11/3-1-300x169.jpg


二進制
app/wp-content/uploads/2021/11/3-1-300x300.jpg


二進制
app/wp-content/uploads/2021/11/3-1-600x338.jpg


二進制
app/wp-content/uploads/2021/11/3-1-60x60.jpg


二進制
app/wp-content/uploads/2021/11/3-1-768x432.jpg


二進制
app/wp-content/uploads/2021/11/3-1.jpg


二進制
app/wp-content/uploads/2021/11/5-100x100.jpg


二進制
app/wp-content/uploads/2021/11/5-150x150.jpg


二進制
app/wp-content/uploads/2021/11/5-300x169.jpg


二進制
app/wp-content/uploads/2021/11/5-300x300.jpg


二進制
app/wp-content/uploads/2021/11/5-600x338.jpg


二進制
app/wp-content/uploads/2021/11/5-60x60.jpg


二進制
app/wp-content/uploads/2021/11/5-768x432.jpg


二進制
app/wp-content/uploads/2021/11/5.jpg


二進制
app/wp-content/uploads/2021/11/AD-1-100x100.jpg


二進制
app/wp-content/uploads/2021/11/AD-1-150x150.jpg


二進制
app/wp-content/uploads/2021/11/AD-1-300x169.jpg


二進制
app/wp-content/uploads/2021/11/AD-1-300x300.jpg


二進制
app/wp-content/uploads/2021/11/AD-1-600x338.jpg


二進制
app/wp-content/uploads/2021/11/AD-1-60x60.jpg


二進制
app/wp-content/uploads/2021/11/AD-1-768x432.jpg


二進制
app/wp-content/uploads/2021/11/AD-1.jpg


二進制
app/wp-content/uploads/2021/11/ADW-100x100.jpg


二進制
app/wp-content/uploads/2021/11/ADW-150x150.jpg


二進制
app/wp-content/uploads/2021/11/ADW-300x169.jpg


+ 0 - 0
app/wp-content/uploads/2021/11/ADW-300x300.jpg


部分文件因文件數量過多而無法顯示

tum/whitesports - Gogs: Simplico Git Service

Sin descripción

ms-settings.php 4.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. <?php
  2. /**
  3. * Used to set up and fix common variables and include
  4. * the Multisite procedural and class library.
  5. *
  6. * Allows for some configuration in wp-config.php (see ms-default-constants.php)
  7. *
  8. * @package WordPress
  9. * @subpackage Multisite
  10. * @since 3.0.0
  11. */
  12. /**
  13. * Objects representing the current network and current site.
  14. *
  15. * These may be populated through a custom `sunrise.php`. If not, then this
  16. * file will attempt to populate them based on the current request.
  17. *
  18. * @global WP_Network $current_site The current network.
  19. * @global object $current_blog The current site.
  20. * @global string $domain Deprecated. The domain of the site found on load.
  21. * Use `get_site()->domain` instead.
  22. * @global string $path Deprecated. The path of the site found on load.
  23. * Use `get_site()->path` instead.
  24. * @global int $site_id Deprecated. The ID of the network found on load.
  25. * Use `get_current_network_id()` instead.
  26. * @global bool $public Deprecated. Whether the site found on load is public.
  27. * Use `get_site()->public` instead.
  28. *
  29. * @since 3.0.0
  30. */
  31. global $current_site, $current_blog, $domain, $path, $site_id, $public;
  32. /** WP_Network class */
  33. require_once ABSPATH . WPINC . '/class-wp-network.php';
  34. /** WP_Site class */
  35. require_once ABSPATH . WPINC . '/class-wp-site.php';
  36. /** Multisite loader */
  37. require_once ABSPATH . WPINC . '/ms-load.php';
  38. /** Default Multisite constants */
  39. require_once ABSPATH . WPINC . '/ms-default-constants.php';
  40. if ( defined( 'SUNRISE' ) ) {
  41. include_once WP_CONTENT_DIR . '/sunrise.php';
  42. }
  43. /** Check for and define SUBDOMAIN_INSTALL and the deprecated VHOST constant. */
  44. ms_subdomain_constants();
  45. // This block will process a request if the current network or current site objects
  46. // have not been populated in the global scope through something like `sunrise.php`.
  47. if ( ! isset( $current_site ) || ! isset( $current_blog ) ) {
  48. $domain = strtolower( stripslashes( $_SERVER['HTTP_HOST'] ) );
  49. if ( ':80' === substr( $domain, -3 ) ) {
  50. $domain = substr( $domain, 0, -3 );
  51. $_SERVER['HTTP_HOST'] = substr( $_SERVER['HTTP_HOST'], 0, -3 );
  52. } elseif ( ':443' === substr( $domain, -4 ) ) {
  53. $domain = substr( $domain, 0, -4 );
  54. $_SERVER['HTTP_HOST'] = substr( $_SERVER['HTTP_HOST'], 0, -4 );
  55. }
  56. $path = stripslashes( $_SERVER['REQUEST_URI'] );
  57. if ( is_admin() ) {
  58. $path = preg_replace( '#(.*)/wp-admin/.*#', '$1/', $path );
  59. }
  60. list( $path ) = explode( '?', $path );
  61. $bootstrap_result = ms_load_current_site_and_network( $domain, $path, is_subdomain_install() );
  62. if ( true === $bootstrap_result ) {
  63. // `$current_blog` and `$current_site are now populated.
  64. } elseif ( false === $bootstrap_result ) {
  65. ms_not_installed( $domain, $path );
  66. } else {
  67. header( 'Location: ' . $bootstrap_result );
  68. exit;
  69. }
  70. unset( $bootstrap_result );
  71. $blog_id = $current_blog->blog_id;
  72. $public = $current_blog->public;
  73. if ( empty( $current_blog->site_id ) ) {
  74. // This dates to [MU134] and shouldn't be relevant anymore,
  75. // but it could be possible for arguments passed to insert_blog() etc.
  76. $current_blog->site_id = 1;
  77. }
  78. $site_id = $current_blog->site_id;
  79. wp_load_core_site_options( $site_id );
  80. }
  81. $wpdb->set_prefix( $table_prefix, false ); // $table_prefix can be set in sunrise.php.
  82. $wpdb->set_blog_id( $current_blog->blog_id, $current_blog->site_id );
  83. $table_prefix = $wpdb->get_blog_prefix();
  84. $_wp_switched_stack = array();
  85. $switched = false;
  86. // Need to init cache again after blog_id is set.
  87. wp_start_object_cache();
  88. if ( ! $current_site instanceof WP_Network ) {
  89. $current_site = new WP_Network( $current_site );
  90. }
  91. if ( ! $current_blog instanceof WP_Site ) {
  92. $current_blog = new WP_Site( $current_blog );
  93. }
  94. // Define upload directory constants.
  95. ms_upload_constants();
  96. /**
  97. * Fires after the current site and network have been detected and loaded
  98. * in multisite's bootstrap.
  99. *
  100. * @since 4.6.0
  101. */
  102. do_action( 'ms_loaded' );