0%

常用标签汇总;如果对你有用收藏,注意部分标签是需要在function中添加代码的;
如果你使用调用未生效可以联系我提供function文件

阅读全文 »

wp-config

wp-config.php

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
//禁止更新

define('AUTOMATIC_UPDATER_DISABLED', true);

// SSL

$_SERVER['HTTPS'] = 'on';
define('FORCE_SSL_LOGIN', true);
define('FORCE_SSL_ADMIN', true);
// 禁止编辑主题和升级安装
define('DISALLOW_FILE_EDIT', true);
define('DISALLOW_FILE_MODS', true);

// 版本数
define( 'WP_POST_REVISIONS', 5 );
// 回收站有效期
define( 'EMPTY_TRASH_DAYS', 7 );

//屏蔽所有错误
ini_set("display_errors","Off");
ini_set("error_reporting", E_ALL );
define("WP_DEBUG", false);
define("WP_DEBUG_DISPLAY", false);


functions文件中

1
2
3
4
5
6
7
add_filter('pre_site_transient_update_core',    function($a){return null;}); // 关闭核心提示
add_filter('pre_site_transient_update_plugins', function($a){return null;}); // 关闭插件提示
add_filter('pre_site_transient_update_themes', function($a){return null;}); // 关闭主题提示
remove_action('admin_init', '_maybe_update_core'); // 禁止 WordPress 检查更新
remove_action('admin_init', '_maybe_update_plugins'); // 禁止 WordPress 更新插件
remove_action('admin_init', '_maybe_update_themes'); // 禁止 WordPress 更新主题

阅读全文 »

内容模块自定义段

高级调用法(别名)

1
{$ci->module['field']['pinpai']['name']}

常规调法

1
{$pinpai}

poscms 列表调用附表

1
2
3
4
5
6
7
8
9
10
{php $table= SITE_ID.'_'.MOD_DIR.'_data_0';}
{module catid=$catid join=$table on=id order=updatetime page=1 pagesize=12}
<li>
<a href="{$t.url}" title="{$t.title}">
<div class="pro_img"><img src="{if $t.thumb}{dr_get_file($t.thumb)}{else}<?php echo dr_get_content_img($t.content)[0]; ?>}{/if}" alt="{$t.title}"></div>
<p>{$t.title}</p>
<span></span>
</a>
</li>
{/module}

##面包屑导航

1
2
3
4
5
6
7

<li><a href="{SITE_URL}">首页</a> > </li>
{if defined('IS_SHARE') && !IS_SHARE}
<li><a href="{MODULE_URL}">{MODULE_NAME}</a> > </li>
{/if}
{dr_catpos($catid, '', 1, '<li><a href="{url}">{name}</a> > </li>'.PHP_EOL)}

分页

分页代码

1
2
3
<div class="pagination">
{$pages}
</div>

分页css

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
.pagination {
text-align: center;
display: flex;
flex-wrap: nowrap;
justify-content: center;
background: #fff;
color: #919191;
padding: 10px 0;
}

.pagination li a {
color: #919191;
display: inline-block;
border: 1px solid #d3d3d3;
min-width: 32px;
padding-left: 5px;
padding-right: 5px;
margin: 0 3px;
}

.pagination li.page-active a {
background: #000;
color: #fff;
}