[wordpress插件] Advanced Custom Fields – Code Area Field高级自定义字段-代码区字段

wordpress 插件 文章 2020-02-07 03:20 632 0 全屏看文

AI助手支持GPT4.0

评分

82

82

描述

The ‘Code Area’ field allows you to add custom CSS, Javascript, HTML and PHP to an advanced custom field, whcih can be use anywhere in your wordpress template files.

“代码区域”字段允许您将自定义CSS,Javascript,HTML和PHP添加到高级自定义字段中,并且可以在您的wordpress模板文件中的任何位置使用。

The code area uses Code Mirror and has various themes to suit.

代码区域使用代码镜像,并具有各种适合的主题。

CSS

CSS

Type your css, no tags needed

输入您的CSS,不需要标签

Javascript

JavaScript

Type your Javascript, no tags needed

输入您的Javascript,不需要标签

PHP

PHP

Type your PHP, no tags needed (Note, you can not open and close php tags anywhere in your code)

键入您的PHP,不需要标签(请注意,您无法在代码中的任何位置打开和关闭php标签)

Output all types of code in the usual fashion the_field(‘code_area_field’);

以通常的方式输出所有类型的代码the_field(‘code_area_field’);

Compatible with both ACF V3 & V4

与ACF V3和V4兼容

安装步骤

This add-on can be treated as both a WP plugin and a theme include.

此附加组件可以被视为WP插件和主题包含。

Install as Plugin

安装为插件

Copy the ‘acf-code_area’ folder into your plugins folder

将“ acf-code_area”文件夹复制到您的插件文件夹中

Activate the plugin via the Plugins admin page

通过插件管理页面激活插件

Include within theme

包含在主题中

Copy the ‘acf-code_area’ folder into your theme folder (can use sub folders).

将“ acf-code_area”文件夹复制到您的主题文件夹中(可以使用子文件夹)。

You can place the folder anywhere inside the ‘wp-content’ directory

您可以将文件夹放置在“ wp-content”目录内的任何位置

Edit your functions.php file and add the code below (Make sure the path is correct to include the acf-cf7.php file)

编辑您的functions.php文件并添加以下代码(确保路径正确以包含acf-cf7.php文件)

add_action('acfegister_fields', 'my_register_fields');

  add_action('acf / register_fields','my_register_fields');

function my_register_fields()

函数my_register_fields()

{    

{    

include_once('acf_code_area-field/acf_code_area-v3.php');

include_once('acf_code_area-field / acf_code_area-v3.php');

}

}

下载地址

https://downloads.wordpress.org/plugin/advanced-custom-fields-code-area-field.1.0.1.zip

https://downloads.wordpress.org/plugin/advanced-custom-fields-code-area-field.1.0.1.zip

-EOF-

AI助手支持GPT4.0


国内超级便宜服务器

摸鱼人热门新闻聚合

钻级赞助商 我要加入

开发者在线工具

第三方支付技术请加QQ群

相关文章
[wordpress插件] Admin Bar Wrap Fix管理员栏换行修复
[wordpress插件] Comment Author count评论作者人数
[wordpress插件] Plugin Name: Buddypress profile view from admin插件名称:来自管理员的Buddypress个人资料视图
[wordpress插件] Custom Meta Box自定义元框
[wordpress插件] CNZZ&51LA for WordPressWordPress的CNZZ&51LA
随便看看
微信公众号免300认证教程 5061
小程序已经上线,作为管理员无法在小程序数据助手查看数据? 4377
小程序广告组件通过审核,但是小程序内没有显示广告? 4351
企业微信通讯录账号被管理员误/恶意删除,怎么办? 8373
问题? 7488
如何快速搭建抽奖助手小程序(无需代码知识) 5164
许涛 大哥在吗, 要解冻小程序的时候提示信息主体不一致, 能帮忙看下吗? 6226
小程序搜一搜全称搜索不显示 麻烦解决一下!谢谢 5736
我的小程序广告收款主体是个体工商户,每个月邮寄两次发票很是麻烦,我年底的时候打包邮寄一次可以么? 5307
如何解决渲染层网络错误Failed to load media? 16658