GithubHelp home page GithubHelp logo

siteorigin / so-widgets-bundle Goto Github PK

View Code? Open in Web Editor NEW
94.0 12.0 67.0 19.34 MB

The SiteOrigin Widgets Bundle gives you all the elements you need to build modern, responsive, and engaging website pages. Using the Widgets Bundle, you can quickly and effortlessly add buttons, sliders, heroes, maps, images, carousels, features, icons, and so much more.

Home Page: https://siteorigin.com/widgets-bundle/

CSS 0.92% PHP 59.94% JavaScript 31.61% Less 7.54%
wordpress page-builder siteorigin-widgets-bundle widgets widgets-bundle block-editor

so-widgets-bundle's Introduction

SiteOrigin Widgets Bundle

Welcome to the development page for the SiteOrigin widgets bundle. We created this bundle primarily for you to use with your Page Builder pages.

Contributing

We welcome issue reports and pull requests. If you're familiar with how the widget bundle works, you can even submit entire widgets.

Support

You can get support for the widgets bundle on the SiteOrigin support forums.

so-widgets-bundle's People

Contributors

aequitascs avatar alexgstapleton avatar andypotanin avatar azghanvi avatar bbceg avatar bgallagh3r avatar bobbymarko avatar braamgenis avatar brandomeniconi avatar dl4ner avatar ellipsis753 avatar gregpriday avatar ictbeheer avatar jambox avatar joelataccelm avatar kevintaron avatar leeps avatar live-mesh avatar marcelweder avatar misplon avatar mschadegg avatar olidac avatar pedro-mendonca avatar pobrsan avatar pravdomil avatar reefnetalex avatar ridgekuhn avatar rlamarche avatar roryg avatar smashbrando avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

so-widgets-bundle's Issues

PHP notices when not selecting any styling option in Service Box widget

Creating a new Service Box widget and saving it without editing any styling option produces these PHP notice warnings on the frontend:

Notice: Undefined index: square_shape_bg_color in wp-content\plugins\addon-so-widgets-bundle\extra-widgets\service-box\service-box.php on line 249

Notice: Undefined index: square_shape_padding in wp-content\plugins\addon-so-widgets-bundle\extra-widgets\service-box\service-box.php on line 250

The code that produces that errors is the following:

function get_less_variables( $instance ) {
    return array(
        'background_color' => $instance['styling']['bg_color'],
        'icon_color' => $instance['styling']['icon_color'],
        'title_color' => $instance['styling']['title_color'],
        'content_color' => $instance['styling']['content_color'],
        'box_padding' => $instance['styling']['box_padding'].'px',
        'box_border' => $instance['styling']['box_border'],
        'box_border_width' => $instance['styling']['box_border_width'].'px',
        'box_border_color' => $instance['styling']['border_color'],
        'square_shape_bg_color' => $instance['styling']['square_shape_bg_color'],
        'square_shape_padding' => $instance['styling']['square_shape_padding'].'px',
    );
}

TinyMCE widget as a field

Again sorry for all the issues. Please just ignore if you are busy.

I need a wysiwyg field as part of one of my custom widgets. I know there isn't a built in field as we leverage Black Studio's widget in Page Builder. So my next move was to try and use it as a subwidget in a field but it goes fatal.

Here is what I tried:

            'editor' => array(
                'type' => 'widget',
                'label' => __( 'Black Studio Widget', 'text-domain' ),
                'class' => 'WP_Widget_Black_Studio_TinyMCE',
                'hide' => true
            )

Thanks again!

Image Widget: Add alignment options

We've heard from a few users who need to align an image. Our current suggestion is to just use the SiteOrigin Editor widget, but it would be much better to have this as an option in the Image Widget.

TinyMCE removing iframe element

Hey, in the new TinyMCE field type the <iframe> tag gets removed. The Black Studio TinyMCE plugin that is used in the Visual Editor element (part of PB bundle) did not remove it.

Is this intentional? Is there a way I can allow the usage of all HTML elements?

I know that providing shortcodes for embedding media such as Google Maps and videos is better, but I think that some users may want to just copy/paste an embed code.

Programatically enable custom widgets

Is there a way to programatically enable my custom widgets rather than visiting the /wp-admin/plugins.php?page=so-widgets-plugins screen and enabling them there? I'm adding these to a WordPress multisite instance and would prefer to enable them globally.

Translate the widgets

Hy,

Using the plugin these last days, I have developed some additional widgets on its own plugin. Then test the translations and does not work with widgets. With other plugin files works, but with the extra widgets (e.g. '../path/widgets-extras') not.

This would be a bug? Any suggestion?

Thanks.

Custom Widget Image

How can I add an image for my custom widget? I want to replace the blue "default.png" placeholder image under "Plugins > SiteOrigin Widgets" with my own image.
I tried to copy+paste "/assets/banner.svg" within my custom widget folder, it picks it up, but somehow produces a wrong URL. I was hoping this would be possible within my custom widget class using $widget_options. Any advice is very much appreciated. Couldn't find anything in the docs.

[Feature Request] Add option to disable theming of button widget

I'm trying to customize the template of the Button widget by adding custom styles to the HTML output. The widget has an option that gives user the ability to choose a theme to be applied to the button in the frontend, however, there seems no way to disable it. I tried to workaround the problem by using some creative ideas, but I always end in the same code. The function below can return false to prevent adding stylesheets to the frontend, but in this case the empty function returns true if false or null is passed.

function get_style_name($instance) {
    if(empty($instance['design']['theme'])) return 'atom';
    return $instance['design']['theme'];
}

I tried to use the siteorigin_widgets_instance_sow-button filter to edit the $instance variable but even if I could set the theme to false it's useless. There seems not to be any way to workaround this, except by creating a custom widget that extends or clones somehow the original and customize it to fit my needs. Could a "No option" theme be added in the core? Or at least it would be great if the code below could be edited to skip the first if statement if the value is not an array. Even better, if there is no theme value set it should just return false. This gives developers the ability to just unset the theme option and prevent the CSS to be enqueued.

One more thing: as a user I can add an ID to the button, but not a class. The widget class is unfortunately applied to a wrapper div. A new text field for the button CSS class would be cool.

Features Widget: Add orientation option

Add the ability to specify orientation for the features.

For example

  • vertical: icon above the feature title and text.
  • horizontal: icon to the left of feature title and text.

If feeling crazy adventurous, maybe even have 4 layout options.

Adding hooks to custom widget

Hi

I have made a bundle of custom widgets that i want to make customizable using filter and action hooks.

Im adding filters to the arrays where i define the fields. This way i can add custom fields for each theme that uses the plugin.
I also add action hooks to the frontend so i can insert the data from theme specific fields.

I have gotten the hooks to work but as soon as i add another instance of the widget i get a php error.

Im guessing that the issue is related to instancing of the widget but im not sure how to fix it. Im not sure weather this is a so-widget specific problem but i thought maby someone in here had run into the problem.

Link to widget (only the accordion widget has hooks at this point):
https://github.com/Jursdotme/secondthought-pagebuilder-bundle/tree/master/secondthought-widgets/secondthought-accordion-widget

Hero Widget: Add a height setting

Allow users to specify a height for the Hero widget. Would need to be adaptive somehow for mobile. Will especially help users using multiple frames with varying image heights.

widget field not working

I am trying to add a custom widget and want to add a layout module in a repeater field. I am getting this error when trying to use the example code (or any variation of it) from the docs:

Fatal error: Class 'SiteOrigin_Widget_Button_Widget' not found in /Users/Rasmus/Desktop/toro/wp-content/plugins/so-widgets-bundle/base/siteorigin-widget.class.php on line 923

It fails even if this is the only field in the widget or if i change the button widget to any other widget.

Empty sections break widget interface

Very much an edge case. During development I had a section without any sub fields. Just having this widget enabled broke the widgets interface. My guess is that the section is generating some malformed HTML when there are no sub fields.

It's obviously not going to come up often, but ideally we should gracefully handle this.

This is the full form PHP I'm using.

array(
    'title' => array(
        'type' => 'text',
        'label' => __('Title', 'siteorigin-widgets'),
        'default' => __('Contact Us', 'siteorigin-widgets'),
    ),

    'display_title' => array(
        'type' => 'checkbox',
        'label' => __('Display title', 'siteorigin-widgets'),
    ),
    'design' => array(
        'type' => 'section',
        'label' => __('Design', 'siteorigin-widgets'),
        'fields' => array(
            'labels' => array(
                'type' => 'section',
                'label' => __('Labels', 'siteorigin-widgets'),
                'fields' => array(

                )
            ),
            'inputs' => array(
                'type' => 'section',
                'label' => __('Input Fields', 'siteorigin-widgets'),
                'fields' => array(

                )
            ),
            'errors' => array(
                'type' => 'section',
                'label' => __('Error messages', 'siteorigin-widgets'),
                'fields' => array(

                )
            ),
        )
    )
)

This is the result

screen shot 2015-09-11 at 10 08 02 am

social media widget: add tripadvisor

Hey, it would be great to add Tripadvisor within the "Social Media" widget, and letting the user simply provide a link to his/her business or Tripadvisor. Very useful for anybody working in the touristic sector.

SO Editor seems to remove newlines in code formatting.

When editing code in the visual editor it seems to remove newlines. For example

<script language="JavaScript">
<!--
function JumpToIt(frm) {
    var newPage = frm.url.options[frm.url.selectedIndex].value
    if (newPage != "None") {
        location.href=newPage
    }
}
//-->
</script>

is output as

<script language="JavaScript"><!--function JumpToIt(frm) {    var newPage = frm.url.options[frm.url.selectedIndex].value    if (newPage != "None") {        location.href=newPage    }}//--></script>

Content disappears from Editor field when widget reordered

Congrats on the 1.3 rollout! I noticed a bug with the new Editor field-

  • Drag a SiteOrigin Editor widget into a region, add content to it.
  • Drag a second SiteOrigin Editor widget into the same region, add content to it.
  • Drag the second widget so it's above the first.

The content should disappear from the widget you just dragged.

Slider inside a repeater issue

When you put a slider input inside a repeater, it does not work properly. You either get the issue where all slider values are set to 0 and 1 additional repeater element is inserted after saving or the repeater item cannot get any new items - they disappear once the page is saved.

Also tested on a fresh WordPress site using your so-dev-examples (where I just move a slider inside a repeater) and the latest versions of Page Builder and Widgets Bundle.

Hopefully this is enough information to find what is causing the issue.

Load Widgets More Efficiently

At the moment, the classes and associated PHP files for each active widget is loaded on every page request. We've heard from a few users that this is causing quite a bit of overhead, especially when there are a lot of custom active widgets.

It would be ideal to use some sort of auto loading.

There are a few challenges to this though. A big one is how to property register widgets with siteorigin_widget_register.

This was suggested on our forums: https://siteorigin.com/thread/performance-widgets-are-loaded-on-every-page/

Issue on Google Map Widget

Hi, I had initially set map as draggable and scrollable but later i changed checked it off and had error. I fixed it by adding !empty in related variables. Might be somtehing you might take look at. Thanks

Assigning widgets to tab groups

No rush on this. I know you guys are busy working on the new docs. If you have time let me know. I have successfully registered the tab for my custom widgets bundle as follows:

function so_custom_widgets_tab($tabs){
    $tabs['custom_widgets'] = array(
        'title' => __('Custom Widgets', 'siteorigin-panels'),
        'filter' => array(
            'groups' => array('so-custom-widgets')
        )
    );

    return $tabs;
}

add_filter( 'siteorigin_panels_widget_dialog_tabs', 'so_custom_widgets_tab');

However, I have not been able to figure out how to get each of the sub widgets in my plugin to reside in this new tab. I am using the dev examples as the starting point where it runs through my widgets folder, but it doesn't seem you guys implemented that in the examples.

If you can guide me I would appreciate it!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.