Title: Fundamento
Author: w3dev
Published: <strong>2022 年 3 月 28 日</strong>
Last modified: 2024 年 10 月 28 日

---

搜索插件

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://ps.w.org/fundamento/assets/icon-256x256.jpg?rev=2700890)

# Fundamento

 作者：[w3dev](https://profiles.wordpress.org/w3dev/)

[下载](https://downloads.wordpress.org/plugin/fundamento.zip)

 * [详情](https://cn.wordpress.org/plugins/fundamento/#description)
 * [评价](https://cn.wordpress.org/plugins/fundamento/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/fundamento/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/fundamento/#developers)

 [支持](https://wordpress.org/support/plugin/fundamento/)

## 描述

Have you ever wanted to alter the way Elementor renders one of its widgets on your
website?

Fundamento provides an easier way to achieve this by allowing you to inject extra
CSS classes into Elementor’s widgets.

### Usage

Tell Elementor that you have a new skin available by utilizing the following code
in your `functions.php` file:

 1. Add an action to initialize Fundamento, then add a call to Fundamento’s `register_skin()`
    function:
 2.     ```
        if(is_plugin_active('fundamento/fundamento.php')) {
            function fundamento_init() {
                // create a new Fundamento instance
                $f = \Fundamento\Plugin::instance(); 
    
                // register a new skin
                $f->register_skin([
                    'name'       => 'Red',                                                      // The name of your new skin, as it will appear in Elementor
                    'element'    => 'button',                                                      // The elementor element you are skinning
                    'is_default' => true,                                                          // optional - should this skin be set by default on all elements of this type
                    'css'        => get_stylesheet_directory_uri() . '/skins/button/red.css',   // optional - have Fundamento enqueue an extra css file
                    'js'         => get_stylesheet_directory_uri() . '/skins/button/red.js',    // optional - have Fundamento enqueue an extra js file
                ]);
            }
            add_action('elementor/init', 'fundamento_init');
        }
        ```
    
 3. Add the selector to your css file:
 4.     ```
        /* Class will always be .skin-{element}-{name} */
        /* Name is transformed to lowercase and spaces are replaced with "-" */
        .skin-button-red {
            background: #f00;
        }
        ```
    

Tell Elementor that you have a new padding preset by utilizing the following code
in your `functions.php` file:

 1. Add an action to initialize Fundamento, then add a call to Fundamento’s `register_padding()`
    function:
 2.     ```
        if(is_plugin_active('fundamento/fundamento.php')) {
            function fundamento_init() {
                // create a new Fundamento instance
                $f = \Fundamento\Plugin::instance(); 
    
                // register a new skin
                $f->register_padding([
                    'name'       => 'Standard',                                                    // The name of your padding preset, as it will appear in Elementor
                    'element'    => 'section',                                                     // The elementor element you are skinning
                    'padding'    => '30px',                                                        // The value and unit of the amount of padding this preset should apply
                    'is_default' => true,                                                          // optional - should this skin be set by default on all elements of this type
                ]);
            }
            add_action('elementor/init', 'fundamento_init');
        }
        ```
    

## 安装

 1. Upload the `fundamento` folder to your `plugins` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. Add the Fundamento function call to your WordPress theme’s `functions.php` file
 4. Select a widget on your Elementor-enabled page and choose the custom skin you created
    
    or
 5. Select a widget on your Elementor-enabled page and choose the padding preset you
    created

## 评价

![](https://secure.gravatar.com/avatar/5fe523052807a3bfc3e3db76f78cc7c78a772bba7b3a9ff5e46a2a5e170e6892?
s=60&d=retro&r=g)

### 󠀁[Use it every day on every site.](https://wordpress.org/support/topic/use-it-every-day-on-every-site/)󠁿

 [Isaac](https://profiles.wordpress.org/torchsmith/) 2023 年 6 月 1 日

Have used it every single day since it was released. Easily one of the best development
tools when working with Elementor + custom css.

![](https://secure.gravatar.com/avatar/d3f1110eb3e0f1f8c0ebc9cd933256b4e84d52b006d67e9ab3f7f86a4f994613?
s=60&d=retro&r=g)

### 󠀁[What can I say](https://wordpress.org/support/topic/what-can-i-say-11/)󠁿

 [w3dev](https://profiles.wordpress.org/w3dev/) 2022 年 5 月 19 日

We made it, and we think it’s awesome. Give it a try!

 [ 阅读所有2条评价 ](https://wordpress.org/support/plugin/fundamento/reviews/)

## 贡献者及开发者

「Fundamento」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ w3dev ](https://profiles.wordpress.org/w3dev/)
 *   [ Isaac ](https://profiles.wordpress.org/torchsmith/)

[帮助将「Fundamento」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/fundamento)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/fundamento/)，查看[SVN仓库](https://plugins.svn.wordpress.org/fundamento/)，
或通过[RSS](https://plugins.trac.wordpress.org/log/fundamento/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/fundamento/)。

## 更新日志

#### 1.1.10

 * Updated version alignment/support.

#### 1.1.9

 * Add padding-top/bottom/left/right for inline and block padding on Elementor 3.16
   +.

#### 1.1.8

 * Fixed bug where classes were not always being added to frontend in Elementor 
   v3.14+.

#### 1.1.7

 * Moved container padding presets to a custom controls section

#### 1.1.6

 * Tested in updated WP / Elementor environments

#### 1.1.5

 * Update padding-control.php to work with section/container templates

#### 1.1.4

 * Update readme.txt

#### 1.1.3

 * Added improved, responsive padding controls

#### 1.1.2

 * Fix behavior of `Default` padding preset

#### 1.1.1

 * Fix selector for padding presets on `column` element
 * Change `None (default)` for column padding preset to `10px` to match Elementor’s
   default column padding

#### 1.1.0

 * Add register_padding function
 * Fix “Undefined index: skin_options” bug

#### 1.0.5

 * Optimize how classes are being added to elements
 * Fix sections/columns not getting classes applied to them

#### 1.0.4

 * Add WP Admin notice if not registering skins in the right hook

#### 1.0.3

 * Enqueue all skin styles and scripts into page editor

#### 1.0.2

 * Fix plugin so it can add skins dropdown to any element

#### 1.0.1

 * Added is_default option.
 * Prevent Fundamento from double-enqueuing the same css/js file for an element.

#### 1.0

 * Our initial release.

## 额外信息

 *  版本 **1.1.10**
 *  最后更新：**2 年前**
 *  活跃安装数量 **80+**
 *  WordPress 版本 ** 5.2 或更高版本 **
 *  已测试的最高版本为 **6.7.5**
 *  PHP 版本 ** 7.4 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/fundamento/)
 * 标签
 * [elementor](https://cn.wordpress.org/plugins/tags/elementor/)[globals](https://cn.wordpress.org/plugins/tags/globals/)
   [skin](https://cn.wordpress.org/plugins/tags/skin/)[template](https://cn.wordpress.org/plugins/tags/template/)
 *  [高级视图](https://cn.wordpress.org/plugins/fundamento/advanced/)

## 评级

 5 星（最高 5 星）。

 *  [  2 条 5 星评价     ](https://wordpress.org/support/plugin/fundamento/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/fundamento/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/fundamento/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/fundamento/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/fundamento/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/fundamento/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/fundamento/reviews/)

## 贡献者

 *   [ w3dev ](https://profiles.wordpress.org/w3dev/)
 *   [ Isaac ](https://profiles.wordpress.org/torchsmith/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/fundamento/)