[wordpress插件] CC-ScriptsCC脚本

wordpress 插件 文章 2020-03-19 16:40 520 0 全屏看文

AI助手支持GPT4.0

评分
0
描述

The CC-Scripts plugin gives Admin users the ability to add custom JavaScript code to every page on WordPress website in the head/footer and/or directly after the opening body html tag.

CC-Scripts插件使Admin用户能够将自定义JavaScript代码添加到WordPress网站上的页眉/页脚和/或直接在主体html标签之后的每个页面。

Additionally, you can minify scripts using JSMin php library and/or displaying it selectively using dependencies.

此外,您可以使用JSMin php库缩小脚本,和/或使用依赖项有选择地显示脚本。

The best part is that you can do this from the Admin panel, perfect for those who don’t have the programming skills needed to manually add custom JavaScript code to template files.

最好的部分是您可以从管理控制台执行此操作,非常适合那些不具备将手动JavaScript代码手动添加到模板文件所需的编程技能的人。

安装步骤

From your WordPress Dashboard

从您的WordPress仪表板中

    1. Go to ‘Plugins > Add New’
    2. 转到“插件>添加新内容”

    3. Search for ‘CC-Scripts’
    4. 搜索“ CC脚本”

    5. Activate the plugin from the Plugin section in your WordPress Dashboard.
    6. 从WordPress信息中心的“插件”部分激活插件。

    From WordPress.org

    来自WordPress.org

      1. Download ‘CC-Scripts’.
      2. 下载“ CC脚本”。

      3. Upload the ‘cc-scripts’ directory to your ‘/wp-content/plugins/’ directory using your favorite method (ftp, sftp, scp, etc…)
      4. 使用您喜欢的方法(ftp,sftp,scp等)将“ cc-scripts”目录上传到您的“ / wp-content / plugins /”目录中

      5. Activate the plugin from the Plugin section in your WordPress Dashboard.
      6. 从WordPress信息中心的“插件”部分激活插件。

      Once Activated

      一旦激活

      Visit ‘Settings > Scripts’, add your scripts into head and/or body fields and chose the method of inclusion.

      访问“设置>脚本”,将您的脚本添加到头和/或身体字段中,然后选择包含方法。

      Please note

      请注意

        • wp_head action is the preferred location for firing scripts in the head section.
        • wp_head操作是在头部触发脚本的首选位置。

        • wp_body action is the preferred location for firing scripts in the body section.
        • wp_body操作是在正文部分触发脚本的首选位置。

        • wp_footer action is the preferred location for firing scripts in the footer section.
        • wp_footer操作是在页脚部分中触发脚本的首选位置。

        • Use output buffering if you don’t have access to the source code of your theme and/or you don’t know if the functions above are included in your theme.
        • 如果您无权访问主题的源代码和/或不知道以上功能是否包含在主题中,请使用输出缓冲。

        Multisite

        多站点

        The plugin can be activated and used for just about any use case.

        可以激活该插件并将其用于几乎所有用例。

          • Activate at site level to load the plugin on that site only.
          • 在站点级别激活以仅在该站点上加载插件。

          • Activate at network level for full integration with all sites in your network (this is the most common type of multisite installation).
          • 在网络级别激活以与网络中的所有站点完全集成(这是多站点安装的最常见类型)。

下载地址
https://downloads.wordpress.org/plugin/cc-scripts.zip
-EOF-

AI助手支持GPT4.0