// 插入内容到文章中 add_filter('the_content', 'cci_insert_content'); function cci_insert_content($content) { if (is_single()) { $options = get_option('cci_options'); // 获取当前时间 $current_time = current_time('Y-m-d H:i:s'); // 获取绝对时间 $start_time = isset($options['cci_start_time']) ? $options['cci_start_time'] : ''; $end_time = isset($options['cci_end_time']) ? $options['cci_end_time'] : ''; // 获取相对时间 $relative_time_value = isset($options['cci_relative_time']) ? (int)$options['cci_relative_time'] : 0; $relative_time_unit = isset($options['cci_relative_time_unit']) ? $options['cci_relative_time_unit'] : 'days'; // 计算相对时间的生效时间 $effective_start_time = new DateTime($current_time); if ($relative_time_value > 0) { switch ($relative_time_unit) { case 'minutes': $effective_start_time->modify("+$relative_time_value minutes"); break; case 'hours': $effective_start_time->modify("+$relative_time_value hours"); break; case 'days': $effective_start_time->modify("+$relative_time_value days"); break; case 'weeks': $effective_start_time->modify("+$relative_time_value weeks"); break; case 'months': $effective_start_time->modify("+$relative_time_value months"); break; } $start_time = $effective_start_time->format('Y-m-d H:i:s'); } // 输出调试信息 error_log("当前时间: $current_time"); error_log("生效时间: $start_time"); error_log("结束时间: $end_time"); // 检查时间有效性 if ($current_time < $start_time || ($end_time !== '' && $current_time > $end_time)) { error_log("时间不在有效范围内。"); return $content; // 如果时间不在范围内,直接返回内容 } // 在文章顶部插入内容(如果启用) if (isset($options['top_content_enabled']) && $options['top_content_enabled']) { $content = $options['cci_top_content'] . $content; } // 在指定段落后插入中部内容 if (isset($options['cci_ad_after_paragraph']) && intval($options['cci_ad_after_paragraph']) > 0) { $ad_after_paragraph = intval($options['cci_ad_after_paragraph']); $paragraphs = explode('

', $content); if (count($paragraphs) > $ad_after_paragraph) { array_splice($paragraphs, $ad_after_paragraph, 0, [$options['cci_middle_content']]); $content = implode('

', $paragraphs); } } // 检查内部推荐文章的时间限制 $recommended_posts = cci_insert_recommended_posts($options); if (!empty($recommended_posts)) { $content .= $recommended_posts; } else { error_log("没有找到推荐文章。"); } // 检查外部推荐文章的时间 if ($current_time >= $options['cci_external_start_time'] && $current_time <= $options['cci_external_end_time']) { $content .= cci_insert_external_links($options); } // 在底部插入内容(如果启用) if (isset($options['bottom_content_enabled']) && $options['bottom_content_enabled']) { $content .= $options['cci_bottom_content']; } } return $content; } // 内部推荐文章插入逻辑 function cci_insert_recommended_posts($options) { $current_post_id = get_the_ID(); $post_ids = isset($options['cci_recommend_post_ids']) ? $options['cci_recommend_post_ids'] : ''; $post_ids_array = array_unique(array_map('trim', explode(',', $post_ids))); // 输出推荐文章 ID error_log("推荐文章 ID: " . implode(', ', $post_ids_array)); // 从推荐文章ID中排除当前文章ID $post_ids_array = array_diff($post_ids_array, [$current_post_id]); if (!empty($post_ids_array)) { $recommended_posts = new WP_Query([ 'post__in' => $post_ids_array, 'orderby' => 'post__in', 'posts_per_page' => -1, ]); if ($recommended_posts->have_posts()) { $title_font_size = isset($options['cci_title_font_size']) ? esc_attr($options['cci_title_font_size']) : '16px'; $title_color = isset($options['cci_title_color']) ? esc_attr($options['cci_title_color']) : '#000000'; $output = '

' . esc_html($options['cci_recommend_title']) . '

'; wp_reset_postdata(); return $output; } else { error_log("推荐文章查询没有结果。"); } } else { error_log("内部推荐文章 ID 为空或无效。"); } return ''; } 2017 年全国硕士研究生入学统一考试英语(一)真题 | 南大南师苏大考研资料辅导

2017 年全国硕士研究生入学统一考试英语(一)真题

Section I Use of English

Directions:

Read the following text. Choose the best word (s) for each numbered blank and mark A, B, C or D on the ANSWER

SHEET. (10 points)

Could a hug a day keep the doctor away? The answer may be a resounding “yes!” 1 helping you feel close and 2

to people you care about, it turns out that hugs can bring a 3 of health benefits to your body and mind. Believe it or

not, a warm embrace might even help you 4 getting sick this winter.

In a recent study 5 over 400 healthy adults, researchers from Carnegie Mellon University in Pennsylvania

examined the effects of perceived social support and the receipt of hugs 6 the participants’ susceptibility to

developing the common cold after being 7 to the virus. People who perceived greater social support were less likely

to come 8 with a cold, and the researchers 9 that the stress-reducing effects of hugging 10 about 32 percent of that

beneficial effect. 11 among those who got a cold, the ones who felt greater social support and received more frequent

hugs had less severe 12 .

“Hugging protects people who are under stress from the 13 risk for colds that’s usually 14 with stress,” notes

Sheldon Cohen, a professor of psychology at Carnegie. Hugging “is a marker of intimacy and helps 15 the feeling

that others are there to help 16 difficulty.”

Some experts 17 the stress-reducing , health-related benefits of hugging to the release of oxytocin, often called

“the bonding hormone” 18 it promotes attachment in relationships, including that between mother and their newborn

babies. Oxytocin is made primarily in the central lower part of the brain, and some of it is released into the

bloodstream. But some of it 19 in the brain, where it 20 mood, behavior and physiology.

1.[A] Unlike

[B] Besides

[C] Throughout [D] Despite

2.[A] equal

[B] restricted

[C] connected

[D] inferior

本文来自投稿,不代表南大南师苏大考研资料辅导立场,如若转载,请注明出处:https://www.kbky.net/1017

中间广告

相关推荐

发表回复

登录后才能评论
💬