9q13nh 发表于 2024-10-4 16:36:52

PHP开源软件框架WordPress | 校园信息平台的搜索功能实现(附视频)

<img src="https://mmbiz.qpic.cn/mmbiz_jpg/LLZEwkd9YqretC68CoFDmZia1Bgb1AHnmkzuxfMiaRtQ02cjHnTVHczRRKWxXCiaTibUZhWjVJ52XVnmDSnv3ZRv7Q/640?wx_fmt=jpeg&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" style="width: 50%; margin-bottom: 20px;">
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">校园信息平台,是一款基于学校信息数据的内容管理系统,<span style="color: black;">能够</span>对学校信息数据进行<span style="color: black;">归类</span>管理,并为用户<span style="color: black;">供给</span>信息<span style="color: black;">查找</span>,信息发布等服务。</p>

    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">本例采用PHP开源软件WordPress进行二次<span style="color: black;">研发</span>来实现项目<span style="color: black;">需要</span>。WordPress本身<span style="color: black;">便是</span>一个博客管理系统,非常适合<span style="color: black;">做为</span>内容管理平台<span style="color: black;">运用</span>。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">本例中的信息搜索的运行效果,如图所示。</p><img src="https://mmbiz.qpic.cn/mmbiz_png/LLZEwkd9YqretC68CoFDmZia1Bgb1AHnmdmwESDN2nrqibkWbc7o9fzTAkJK8NCgBb8OE9ZneAHibLMTrqep28Yww/640?wx_fmt=png&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" style="width: 50%; margin-bottom: 20px;">
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">■&nbsp;</span><span style="color: black;">图8.4 信息搜索</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">01</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">搜索功能</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">在wordpress中,搜索功能是<span style="color: black;">经过</span>调用get_search_form()函数来实现的。打开主题的header模板,在其导航菜单的左侧添加搜索表单代码,如下所示。</p>
    <span style="color: black;">&lt;<span style="color: black;">div</span>&nbsp;<span style="color: black;">class</span>=<span style="color: black;">"search-form-wrap"</span>&gt;</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">…</p><span style="color: black;">&lt;?php</span>get_search_form();<span style="color: black;">?&gt;</span><span style="color: black;">&lt;/<span style="color: black;">div</span>&gt;</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">倘若</span>主题中<span style="color: black;">无</span>定义搜索表单模板searchform.php文件,则get_search_form()函数会<span style="color: black;">表示</span>wordpress默认的搜索框,其样式<span style="color: black;">常常</span><span style="color: black;">不可</span>满足项目的整体<span style="color: black;">需求</span>,<span style="color: black;">因此</span>,<span style="color: black;">实质</span><span style="color: black;">研发</span>过程常常需要自定义搜索表单模板文件。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">本项目搜索表单模板文件如<span style="color: black;">以上</span>8.3.5小节所示,其页面效果如图8.19所示;搜索结果<span style="color: black;">运用</span>默认的index.php模板,而不单独定义search.php文件,其页面效果如图8.4所示。</p><img src="https://mmbiz.qpic.cn/mmbiz_jpg/LLZEwkd9YqretC68CoFDmZia1Bgb1AHnmx6vlXoJV9znHJJtlZVh6IYn4eicMS3sTRsdasg4Z32FU7qmviamE1gLw/640?wx_fmt=jpeg&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" style="width: 50%; margin-bottom: 20px;">
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">■&nbsp;</span>图8.19 主导航菜单折叠<span style="color: black;">表示</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">02</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">内容<span style="color: black;">表示</span></strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">页面中内容的<span style="color: black;">表示</span><span style="color: black;">运用</span>单独的子模板来实现,其文件为content.php。代码如下:</p>
    &lt;article id=<span style="color: black;">"post-&lt;?php the_ID(); ?&gt;"</span>&nbsp;&lt;?php post_class(<span style="color: black;"> post-content</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">); ?&gt;&gt;</p><span style="color: black;">&lt;<span style="color: black;">header</span>&nbsp;<span style="color: black;">class</span>=<span style="color: black;">"entry-header"</span>&nbsp;<span style="color: black;">itemprop</span>=<span style="color: black;">"mainEntityOfPage"</span>&gt;</span><span style="color: black;">&lt;?php</span>&nbsp;the_title(sprintf(<span style="color: black;">&lt;h2 class="entry-title p-name" itemprop="name headline"&gt;&lt;a href="%s" rel="bookmark" class="u-url url" itemprop="url"&gt;</span>, esc_url(get_permalink())), <span style="color: black;">&lt;/a&gt;&lt;/h2&gt;</span>);<span style="color: black;">?&gt;</span><span style="color: black;">&lt;/<span style="color: black;">header</span>&gt;</span><span style="color: black;">if</span>(in_array(get_post_format(), array(<span style="color: black;">aside</span>,<span style="color: black;">standard</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">,))) {?&gt;</p><span style="color: black;">&lt;<span style="color: black;">div</span>&nbsp;<span style="color: black;">class</span>=<span style="color: black;">"entry-summary p-summary"</span>&nbsp;<span style="color: black;">itemprop</span>=<span style="color: black;">"description"</span>&gt;</span><span style="color: black;">&lt;?php</span>&nbsp;the_excerpt(); <span style="color: black;">?&gt;</span><span style="color: black;">&lt;/<span style="color: black;">div</span>&gt;</span>&lt;?php }<span style="color: black;">else</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">{?&gt;</p><span style="color: black;">&lt;<span style="color: black;">div</span>&nbsp;<span style="color: black;">class</span>=<span style="color: black;">"entry-content e-content"</span>&nbsp;<span style="color: black;">itemprop</span>=<span style="color: black;">"description articleBody"</span>&gt;</span><span style="color: black;">&lt;?php</span>the_content(sprintf(__(<span style="color: black;">Continue Reading %s</span>, <span style="color: black;">wm</span>), the_title(<span style="color: black;">&lt;span class="screen-reader-text"&gt;</span>, <span style="color: black;">&lt;/span&gt;</span>, <span style="color: black;">false</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">)));</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">wp_link_pages(</p><span style="color: black;">array</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">(</p><span style="color: black;">before</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&gt; <span style="color: black;">&lt;div class="page-links"&gt;&lt;span class="page-links-title"&gt;</span>.__(<span style="color: black;">Pages:</span>, <span style="color: black;">wm</span>) . <span style="color: black;">&lt;/span&gt;</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">,</p><span style="color: black;">after</span>=&gt;<span style="color: black;">&lt;/div&gt;</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">,</p><span style="color: black;">link_before</span>&nbsp;=&gt; <span style="color: black;">&lt;span&gt;</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">,</p><span style="color: black;">link_after</span>&nbsp;&nbsp;=&gt; <span style="color: black;">&lt;/span&gt;</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">,</p><span style="color: black;">pagelink</span>&nbsp;&nbsp;&nbsp;&nbsp;=&gt; <span style="color: black;">&lt;span class="screen-reader-text"&gt;</span>. __(<span style="color: black;">Page:</span>, <span style="color: black;">wm</span>) . <span style="color: black;"> &lt;/span&gt;%</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">,</p><span style="color: black;">separator</span>&nbsp;&nbsp;&nbsp;=&gt; <span style="color: black;">&lt;span class="screen-reader-text"&gt;, &lt;/span&gt;</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">,</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">) </p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">);</p><span style="color: black;">?&gt;</span><span style="color: black;">&lt;<span style="color: black;">div</span>&nbsp;<span style="color: black;">class</span>=<span style="color: black;">"clear"</span>&gt;</span><span style="color: black;">&lt;/<span style="color: black;">div</span>&gt;</span><span style="color: black;">&lt;/<span style="color: black;">div</span>&gt;</span><span style="color: black;">&lt;<span style="color: black;">div</span>&nbsp;<span style="color: black;">class</span>=<span style="color: black;">"entry-meta"</span>&gt;</span><span style="color: black;">&lt;?php</span>&nbsp;wm_entry_meta(); <span style="color: black;">?&gt;</span><span style="color: black;">&lt;/<span style="color: black;">div</span>&gt;</span>&lt;<span style="color: black;">/article&gt;</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">其页面效果如图8.19所示。信息内容下面的发布日期、作者等辅助信息,由自定义函数 wm_entry_meta() 生成。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">wm_entry_meta()函数存放在主题的functions.php文件中,其代码如下:</p>

    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">function wm_entry_meta()</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">{</p>echo <span style="color: black;">&lt;<span style="color: black;">ul</span>&gt;</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">;</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">// 判断信息<span style="color: black;">是不是</span>置顶</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">if (is_sticky() &amp;&amp; is_home() &amp;&amp; ! is_paged() ) {</p>echo <span style="color: black;">&lt;<span style="color: black;">li</span>&nbsp;<span style="color: black;">class</span>=<span style="color: black;">"sticky-post"</span>&gt;</span><span style="color: black;">&lt;<span style="color: black;">i</span>&nbsp;<span style="color: black;">class</span>=<span style="color: black;">"fa fa-bookmark"</span>&gt;</span><span style="color: black;">&lt;/<span style="color: black;">i</span>&gt;</span>.esc_html__(Topping, wm).<span style="color: black;">&lt;/<span style="color: black;">li</span>&gt;</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">;</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">}</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">// 发布时间</p>echo <span style="color: black;">&lt;<span style="color: black;">li</span>&nbsp;<span style="color: black;">class</span>=<span style="color: black;">"posted-on"</span>&gt;</span><span style="color: black;">&lt;<span style="color: black;">i</span>&nbsp;<span style="color: black;">class</span>=<span style="color: black;">"fa fa-calendar"</span>&gt;</span><span style="color: black;">&lt;/<span style="color: black;">i</span>&gt;</span><span style="color: black;">&lt;<span style="color: black;">span</span>&nbsp;<span style="color: black;">class</span>=<span style="color: black;">"screen-reader-text"</span>&gt;</span>.esc_html__(Posted on:, wordstar).<span style="color: black;">&lt;/<span style="color: black;">span</span>&gt;</span><span style="color: black;">&lt;<span style="color: black;">a</span>&nbsp;<span style="color: black;">href</span>=<span style="color: black;">".esc_url(get_permalink())."</span>&nbsp;<span style="color: black;">rel</span>=<span style="color: black;">"bookmark"</span>&gt;</span><span style="color: black;">&lt;<span style="color: black;">time</span>&nbsp;<span style="color: black;">class</span>=<span style="color: black;">"entry-date published dt-published"</span>&nbsp;<span style="color: black;">itemprop</span>=<span style="color: black;">"datePublished"</span>&nbsp;<span style="color: black;">datetime</span>=<span style="color: black;">".esc_attr(get_the_date(c))."</span>&gt;</span>.get_the_date().<span style="color: black;">&lt;/<span style="color: black;">time</span>&gt;</span><span style="color: black;">&lt;<span style="color: black;">time</span>&nbsp;<span style="color: black;">class</span>=<span style="color: black;">"entry-date updated dt-updated screen-reader-text"</span>&nbsp;<span style="color: black;">itemprop</span>=<span style="color: black;">"dateModified"</span>&nbsp;<span style="color: black;">datetime</span>=<span style="color: black;">".esc_attr(get_the_modified_date(c))."</span>&gt;</span>. esc_html(get_the_modified_date()).<span style="color: black;">&lt;/<span style="color: black;">time</span>&gt;</span><span style="color: black;">&lt;/<span style="color: black;">a</span>&gt;</span><span style="color: black;">&lt;/<span style="color: black;">li</span>&gt;</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">;</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">// 发布者</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">if(!is_single()){</p>echo <span style="color: black;">&lt;<span style="color: black;">li</span>&nbsp;<span style="color: black;">class</span>=<span style="color: black;">"byline author p-author vcard hcard h-card"</span>&nbsp;<span style="color: black;">itemprop</span>=<span style="color: black;">"author "</span>&nbsp;<span style="color: black;">itemscope</span>&nbsp;<span style="color: black;">itemtype</span>=<span style="color: black;">"http://schema.org/Person"</span>&gt;</span><span style="color: black;">&lt;<span style="color: black;">i</span>&nbsp;<span style="color: black;">class</span>=<span style="color: black;">"fa fa-user"</span>&gt;</span><span style="color: black;">&lt;/<span style="color: black;">i</span>&gt;</span><span style="color: black;">&lt;<span style="color: black;">span</span>&nbsp;<span style="color: black;">class</span>=<span style="color: black;">"screen-reader-text"</span>&gt;</span>. esc_html__(Author:, wordstar).<span style="color: black;">&lt;/<span style="color: black;">span</span>&gt;</span><span style="color: black;">&lt;<span style="color: black;">span</span>&nbsp;<span style="color: black;">class</span>=<span style="color: black;">"screen-reader-text"</span>&gt;</span>.get_avatar( get_the_author_meta( ID ), 40 ).<span style="color: black;">&lt;/<span style="color: black;">span</span>&gt;</span><span style="color: black;">&lt;<span style="color: black;">a</span>&nbsp;<span style="color: black;">class</span>=<span style="color: black;">"url u-url"</span>&nbsp;<span style="color: black;">href</span>=<span style="color: black;">".esc_url(get_author_posts_url(get_the_author_meta(ID)))."</span>&nbsp;<span style="color: black;">rel</span>=<span style="color: black;">"author"</span>&nbsp;<span style="color: black;">itemprop</span>=<span style="color: black;">"url"</span>&nbsp;&gt;</span><span style="color: black;">&lt;<span style="color: black;">span</span>&nbsp;&nbsp;<span style="color: black;">class</span>=<span style="color: black;">" fn p-name"</span>&nbsp;<span style="color: black;">itemprop</span>=<span style="color: black;">"name"</span>&gt;</span>.esc_html(get_the_author()).<span style="color: black;">&lt;/<span style="color: black;">span</span>&gt;</span><span style="color: black;">&lt;/<span style="color: black;">a</span>&gt;</span><span style="color: black;">&lt;/<span style="color: black;">li</span>&gt;</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">;</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">}</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">// 信息类型</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">if (($categories_list = get_the_category_list(, )) &amp;&amp; wm_categorized_blog() ) {</p>echo <span style="color: black;">&lt;<span style="color: black;">li</span>&nbsp;<span style="color: black;">class</span>=<span style="color: black;">"cat-links"</span>&gt;</span><span style="color: black;">&lt;<span style="color: black;">i</span>&nbsp;<span style="color: black;">class</span>=<span style="color: black;">"fa fa-folder-open"</span>&gt;</span><span style="color: black;">&lt;/<span style="color: black;">i</span>&gt;</span><span style="color: black;">&lt;<span style="color: black;">span</span>&nbsp;<span style="color: black;">class</span>=<span style="color: black;">"screen-reader-text"</span>&gt;</span>. esc_html__(Categories:, wm).<span style="color: black;">&lt;/<span style="color: black;">span</span>&gt;</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">.ent2ncr($categories_list).</p><span style="color: black;">&lt;/<span style="color: black;">li</span>&gt;</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">;</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">}</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">// 信息标签</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">if ($tags_list = get_the_tag_list(, , )) {</p>echo <span style="color: black;">&lt;<span style="color: black;">li</span>&nbsp;<span style="color: black;">class</span>=<span style="color: black;">"tag-links"</span>&gt;</span><span style="color: black;">&lt;<span style="color: black;">i</span>&nbsp;<span style="color: black;">class</span>=<span style="color: black;">"fa fa-tags"</span>&gt;</span><span style="color: black;">&lt;/<span style="color: black;">i</span>&gt;</span><span style="color: black;">&lt;<span style="color: black;">span</span>&nbsp;<span style="color: black;">class</span>=<span style="color: black;">"screen-reader-text"</span>&gt;</span>. esc_html__(Tags:, wm).<span style="color: black;">&lt;/<span style="color: black;">span</span>&gt;</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">.ent2ncr($tags_list).</p><span style="color: black;">&lt;/<span style="color: black;">li</span>&gt;</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">;</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">}</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">// 留言</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">if (! is_single() &amp;&amp; ! post_password_required() &amp;&amp; ( comments_open() || get_comments_number() ) ) {</p>echo <span style="color: black;">&lt;<span style="color: black;">li</span>&nbsp;<span style="color: black;">class</span>=<span style="color: black;">"comment"</span>&gt;</span><span style="color: black;">&lt;<span style="color: black;">i</span>&nbsp;<span style="color: black;">class</span>=<span style="color: black;">"fa fa-comments"</span>&gt;</span><span style="color: black;">&lt;/<span style="color: black;">i</span>&gt;</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">;</p>comments_popup_link(__(Leave a comment, wm).<span style="color: black;">&lt;<span style="color: black;">span</span>&nbsp;<span style="color: black;">class</span>=<span style="color: black;">"screen-reader-text"</span>&gt;</span>:&amp;nbsp;.get_the_title().<span style="color: black;">&lt;/<span style="color: black;">span</span>&gt;</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">);</p>echo <span style="color: black;">&lt;/<span style="color: black;">li</span>&gt;</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">;</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">}</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">// 编辑链接</p>edit_post_link(__(编辑Edit, wm), <span style="color: black;">&lt;<span style="color: black;">li</span>&nbsp;<span style="color: black;">class</span>=<span style="color: black;">"edit-link"</span>&gt;</span><span style="color: black;">&lt;<span style="color: black;">i</span>&nbsp;<span style="color: black;">class</span>=<span style="color: black;">"fa fa-pencil"</span>&gt;</span><span style="color: black;">&lt;/<span style="color: black;">i</span>&gt;</span>, <span style="color: black;">&lt;/<span style="color: black;">li</span>&gt;</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">);</p>echo <span style="color: black;">&lt;<span style="color: black;">div</span>&nbsp;<span style="color: black;">class</span>=<span style="color: black;">"clear"</span>&gt;</span><span style="color: black;">&lt;/<span style="color: black;">div</span>&gt;</span><span style="color: black;">&lt;/<span style="color: black;">ul</span>&gt;</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">;</p>}<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">以上</span>代码中<span style="color: black;">运用</span>了<span style="color: black;">非常多</span>WordPress函数,<span style="color: black;">因为</span>篇幅的限制<span style="color: black;">这儿</span><span style="color: black;">再也不</span><span style="color: black;">仔细</span>解释它们的用法。<span style="color: black;">另一</span>,代码中还<span style="color: black;">运用</span>了自定义函数wm_categorized_blog(),该函数用于<span style="color: black;">表示</span>内容的<span style="color: black;">归类</span>类型,其代码请参见教材源码。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">03</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">视频讲解</strong></p><span style="color: black;">
      <div style="color: black; text-align: left; margin-bottom: 10px;">
            <div style="color: black; text-align: left; margin-bottom: 10px;">
                <div style="color: black; text-align: left; margin-bottom: 10px;">
                  <div style="color: black; text-align: left; margin-bottom: 10px;">
                        <div style="color: black; text-align: left; margin-bottom: 10px;">
                            <div style="color: black; text-align: left; margin-bottom: 10px;">关闭</div>
                            <div style="color: black; text-align: left; margin-bottom: 10px;"><strong style="color: blue;">观看<span style="color: black;">更加多</span></strong></div>
                            <div style="color: black; text-align: left; margin-bottom: 10px;"><span style="color: black;">更加多</span></div>
                        </div>
                  </div>
                </div>
            </div>
            <div style="color: black; text-align: left; margin-bottom: 10px;">
                <div style="color: black; text-align: left; margin-bottom: 10px;">
                  <div style="color: black; text-align: left; margin-bottom: 10px;">
                        <div style="color: black; text-align: left; margin-bottom: 10px;">
                            <div style="color: black; text-align: left; margin-bottom: 10px;">退出全屏</div>
                        </div>
                  </div>
                </div>
            </div>
            <div style="color: black; text-align: left; margin-bottom: 10px;">
                <div style="color: black; text-align: left; margin-bottom: 10px;">
                  <div style="color: black; text-align: left; margin-bottom: 10px;">
                        <div style="color: black; text-align: left; margin-bottom: 10px;">
                            <div style="color: black; text-align: left; margin-bottom: 10px;">
                              <div style="color: black; text-align: left; margin-bottom: 10px;">
                                    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">视频加载失败,请刷新页面再试</p><a style="color: black;"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAqCAMAAADhynmdAAAAQlBMVEUAAACcnJycnJycnJyoqKicnJycnJycnJycnJycnJyfn5+cnJydnZ2enp6kpKSdnZ2cnJyenp6cnJycnJycnJybm5t8KrXMAAAAFXRSTlMAyeb3CNp3tJRvHIEtJhBgqztWRJ+p5TqGAAABCklEQVQ4y5WTi27DIAxFAUMhgTzX8/+/urB2pdKI0x0pSoRuruyLbf7gF3PBaDE6X44LyY0D1SJQsfd9PpMM/CJx60v8SmV1HMSi1lKyA1n0jnwWSO08l04uJbxpBmTrpDtbGB6fmxC6Tc4BHv9aZDJdJsHW9w43Jez9x8T5M4l31WZsJn2bsYY+nUum2lQkGIVANPZ4FCLWOJImSTgjZE2SkU9crmu57mj9JBc93Qzj9R1d3HSG5bN5MRsnUzcGKK8Ns02z+Da7rYQE4bUE2PG1C6kVnkCyf0pwX8/jwbyxCLhcHpKTFkvkwK3pRmXtRrVFoTGYLvN+t0EUl0qrRaF1pFBz0anp/ptvNB4SY1XDAVMAAAAASUVORK5CYII=" style="width: 50%; margin-bottom: 20px;">刷</a>新
                              </div><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADkAAAA5CAMAAAC7xnO3AAAAY1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+aRQ2gAAAAIXRSTlMAOx20pMJbzBQNTDGTh2ohLCZmeUF2hEmXCFdxUquef4yHE17nAAACnklEQVRIx9WW2xqiIBSFRc1AUATJU1a+/1MOm0NYKvnNXM260ZLftRcbqCQinOLI0yiY/iXKuUZPjx5Fk+6RhF1yHiVF0wC6IZfr9fqIkpRqdNyQ9AoiUU8g+YZ8Xn96YmNKvkhkLMskKgEo/yJzaxkXeZsGsjeWKEIFU/FBZgA+D5yEwGtTgR0J18lYUvdcLZ1YkUjLf+a0saYYSG/J3Hury+WSkTCjCETtF6Mvd8QGJMZSWIfsAlKhWGRl5zQ1ZNBDgy/zzvvFavWUK7SyTRs+rsiUZS/4LHIHyo8VgBx7vDkKx2WhPS7dD1Q6cNlu2dTa0gMys4bz/vJR6ph8ADgcVcSVUkfnhzJTc6gRj8fbCOHk30UI2KC+V4gKjskJQqC5frFHli0kafogFIfFkAXVCSqdAFVR8pmtVCWiXCtaarbWpGtQAYx7sjf2GCbfjFRQpH7lTLucveSMBE7+Z6VqViT2/PVs0d7hPk9TUcTaUuVaT8k/f/v6SXOgyG7InZaSvM8vj/309LrbvpSAORDH2/kWGyHhm/u5AYUc8qdFBRRrsV749bRv6I5x1OY50GZUUxQz9aGplAXZcOQ1DL3vwsTyvHQ2YWgjZV2rDTmxYRjUuoBvcQDr7QRLBiiNzJ4BawG3FLtTmEMGBigTRyC2oIKht1vbwLWrKmXKBZal+yApDGhm4q5JCVdNdrZeQBe8B44WnE2NGmxrR1bCvMugHdkhSwMWI9wjIGeosnPlJmNrst6PQrpeFkBSyAmkdD016DYqAVC6HHcNtnCPgazcuytAd5IqB/qYtq4bkP7vnEaL3W4KH9/HhKBAKl8XFUlMIWYIek4hZgh6UtjHBLVA4pPkCKRf9jOQ5Kwp1UvPDyb3qkPJaRG8Ln7f8Q8Bki/Kj5IYnQAAAABJRU5ErkJggg==" style="width: 50%; margin-bottom: 20px;">
                            </div>
                        </div>
                  </div>
                </div>
            </div>
      </div>
      <div style="color: black; text-align: left; margin-bottom: 10px;">
            <div style="color: black; text-align: left; margin-bottom: 10px;"> <a style="color: black;"> 视频详情 </a> </div>
      </div>
    </span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">04</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">参考书籍</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">《</span>PHP项目案例<span style="color: black;">研发</span>从入门到实战-微课视频版》</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">ISBN:9787302570974</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">作者:马石安、魏文平</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">定价:79.80元</p><img src="https://mmbiz.qpic.cn/mmbiz_jpg/LLZEwkd9YqretC68CoFDmZia1Bgb1AHnmicjO0CrNVf4QibRLmhvbDriap4O7uK5TlhficicLphlEq3quT9tEtzic6xXg/640?wx_fmt=jpeg&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" style="width: 50%; margin-bottom: 20px;"><img src="https://mmbiz.qpic.cn/mmbiz_jpg/LLZEwkd9YqretC68CoFDmZia1Bgb1AHnmZU8JryphZGlCjxqMCWRCtfMCTNAwSsFA8LyIkicUEic57A2GSMhMv51g/640?wx_fmt=jpeg&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" style="width: 50%; margin-bottom: 20px;">
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">05</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">精彩<span style="color: black;">举荐</span></strong></p><a style="color: black;">PHP项目案例<span style="color: black;">研发</span> | WordPress开源软件安装及应用</a><a style="color: black;">网络安全技术 | 勒索软件的特征和防范</a><a style="color: black;">网络安全技术 | 身份认证的革命——生物特征身份</a>认证<a style="color: black;">通关操作系统 | 进程的概念(附视频限免)</a><a style="color: black;">人工智能实践: 基于T-S 模型的模糊推理(附源码)</a><a style="color: black;">Python自然语言处理|语料清洗(附视频)</a><a style="color: black;">Python编程|实现基于字典的通讯录</a><a style="color: black;">CCF CSP-J/S<span style="color: black;">第1</span>轮认证考纲详解</a><a style="color: black;">Python 韩信点兵思政案例(含优惠码)</a><a style="color: black;"><span style="color: black;">设备</span>学习案例︱人脸识别和人脸检测(附视</a>频)<a style="color: black;">Python ︱爬取天气预报信息(附视频)</a><a style="color: black;">《<span style="color: black;">设备</span>学习》实验<span style="color: black;">指点</span>书(附实验参考+代码)</a><a style="color: black;">Python爬虫综合实战 │ 创建云起书院爬虫(附代码)</a><a style="color: black;">Python爬虫实战 │ Email提醒(附代码)</a><a style="color: black;">Python深度学习 │一文<span style="color: black;">把握</span>卷积神经网络</a>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://mmbiz.qpic.cn/mmbiz_png/LLZEwkd9YqqagLUOjCy0yWaMib5z07TVhSuDsxZOFeubJ93ZHJ5M3VlKxMKvQjG0FSQmX8AmVibeUNDHia21rpibcQ/640?wx_fmt=png&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="data:image/svg+xml,%3C%3Fxml version=1.0 encoding=UTF-8%3F%3E%3Csvg width=1px height=1px viewBox=0 0 1 1 version=1.1 xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink%3E%3Ctitle%3E%3C/title%3E%3Cg stroke=none stroke-width=1 fill=none fill-rule=evenodd fill-opacity=0%3E%3Cg transform=translate(-249.000000, -126.000000) fill=%23FFFFFF%3E%3Crect x=249 y=126 width=1 height=1%3E%3C/rect%3E%3C/g%3E%3C/g%3E%3C/svg%3E" style="width: 50%; margin-bottom: 20px;"></p>




m5k1umn 发表于 2024-10-7 03:08:21

你的见解真是独到,让我受益匪浅。

b1gc8v 发表于 2024-11-5 17:23:15

“NB”(牛×的缩写,表示叹为观止)‌
页: [1]
查看完整版本: PHP开源软件框架WordPress | 校园信息平台的搜索功能实现(附视频)