Skip to content

Commit

Permalink
Merge pull request #34 from codersaiful/1.0.2.1
Browse files Browse the repository at this point in the history
1.0.2.1
  • Loading branch information
codersaiful authored Mar 2, 2021
2 parents bbe0ff9 + 13c69f2 commit da7102b
Show file tree
Hide file tree
Showing 12 changed files with 576 additions and 262 deletions.
22 changes: 22 additions & 0 deletions admin/admin-handle.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,17 @@ public static function get_submenu(){
'position' => 2,
],

[
'parent_slug' => self::$menu_slug,//$parent_slug,
'page_title' => __( 'Settings for UltraAddons', 'ultraaddons' ),
'menu_title' => __( 'Settings', 'ultraaddons' ),
'capability' => self::$capability,
'menu_slug' => 'ultraaddons-elementor-settings',
'function' => [__CLASS__, 'settings_page'],
'position' => 9992,
],


];

self::$sub_menu = apply_filters( 'ultraaddons/admin/sub_menu', self::$sub_menu );
Expand Down Expand Up @@ -246,6 +257,17 @@ public static function header_footer_page() {
include_once self::$footer_file;
}

/**
* Opening Header Footer for User.
*/
public static function settings_page() {
include_once self::$header_file;

include ULTRA_ADDONS_DIR . 'admin/pages/settings.php';

include_once self::$footer_file;
}


}
Admin_Handle::init();
4 changes: 2 additions & 2 deletions admin/pages/header-footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@
<div class="ultraaddons-field-container field-container-size">
<label class="field-label field-label-header-choose"><?php echo esc_html__( 'Container Size', 'ultraaddons' ); ?></label>
<select class="ultraddons-select" name="wrapper">
<option value="box" selected="<?php echo $wrapper == 'box' ? 'selected' : ''; ?>"><?php echo esc_html__( 'Box', 'ultraaddons' ); ?></option>
<option value="flued" selected="<?php echo $wrapper == 'Flued' ? 'selected' : ''; ?>"><?php echo esc_html__( 'Flued', 'ultraaddons' ); ?></option>
<option value="box" <?php echo $wrapper == 'box' ? 'selected' : ''; ?>><?php echo esc_html__( 'Box', 'ultraaddons' ); ?></option>
<option value="flued" <?php echo $wrapper == 'flued' ? 'selected' : ''; ?>><?php echo esc_html__( 'Flued', 'ultraaddons' ); ?></option>

</select>
<div class="ua-form-message">
Expand Down
68 changes: 68 additions & 0 deletions admin/pages/settings.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<?php

use UltraAddons\Core\Settings;

defined( 'ABSPATH' ) || die();

/**
* Controlling Form Submission
*/
$form_datas = filter_input_array(INPUT_POST);

do_action( 'ultraaddons_save_data', $form_datas, 'settings' );

$key = Settings::$key;

if( $form_datas && $key ){
update_option( $key, $form_datas );
}
$current_data = Settings::get_data();


$category_slug = Settings::get_widget_category();
?>

<div class="ultraaddons-section ua-option-wrapper">
<div class="ua-section-inside">
<div class="ua-header">
<h1 class="ua-page-title"><?php echo esc_html__( 'Settings', 'ultraaddons' ); ?></h1>
</div>

<div class="ua-sectioon-content">
<div class="ua-content-inside">

<form class="ua-header-footer-form" action="" method="post">
<div class="ua-form-wrappper">





<div class="ultraaddons-field-container field-container-category">
<label class="field-label field-label-header-choose"><?php echo esc_html__( 'Widget Showing in', 'ultraaddons' ); ?></label>
<select class="ultraddons-select" name="widget_in">
<option value="" ><?php echo esc_html__( 'Only UltraAddons', 'ultraaddons' ); ?></option>
<option value="basic" <?php echo $category_slug == 'basic' ? 'selected' : ''; ?>><?php echo esc_html__( 'Basic', 'ultraaddons' ); ?></option>
<option value="general" <?php echo $category_slug == 'general' ? 'selected' : ''; ?>><?php echo esc_html__( 'General', 'ultraaddons' ); ?></option>

</select>
<div class="ua-form-message">
<p>
Widget shows in <b>Addons - UltraAddons</b> Category of Elementor(in Elementor Edit Screen). If you want to show UltraAddons Widget
in Basic or General category, Choose and Save Change.
</p>
</div>
</div>



</div> <!-- /.ua-form-wrappper -->
<div class="ua-widget-footer">
<button class="primary button button-primary ua-primary ua-no-update" type="submit"><?php echo esc_html__( 'Save Change', 'ultraaddons' ); ?></button>
</div>
</form>

</div>
</div>
</div>
</div>
12 changes: 6 additions & 6 deletions assets/css/widgets.css
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ body:not(.elementor-page) .ultraaddons-container{
/*******************************
* Common of All Widgets
********************************/
.ultraaddons-element .hidden_text,
.ultraaddons-element .hidden_message,
.ultraaddons-element .hidden{
.ua-element .hidden_text,
.ua-element .hidden_message,
.ua-element .hidden{
display: none;
}
.elementor-element-edit-mode.ultraaddons-element .hidden_text,
.elementor-element-edit-mode.ultraaddons-element .hidden_message,
.elementor-element-edit-mode.ultraaddons-element .hidden{
.elementor-element-edit-mode.ua-element .hidden_text,
.elementor-element-edit-mode.ua-element .hidden_message,
.elementor-element-edit-mode.ua-element .hidden{
display: block !important;
color: #D00;
}
16 changes: 8 additions & 8 deletions assets/css/widgets/button.css
Original file line number Diff line number Diff line change
Expand Up @@ -62,36 +62,36 @@
.ultraaddons-button-wrapper.left {
text-align: left;
}
.ultraaddons-element.ua-element-button .ultraaddons-button-wrapper {
.ua-element.ua-element-button .ultraaddons-button-wrapper {
display: flex;
column-gap: 20px;
}

.ultraaddons-element.ua-element-button .ultraaddons-button {
.ua-element.ua-element-button .ultraaddons-button {
display: flex;
justify-content: center;
}
.ultraaddons-element.ua-element-button .ultraaddons-button .ultraaddons-button-icon.align-left {
.ua-element.ua-element-button .ultraaddons-button .ultraaddons-button-icon.align-left {
order: 5;
margin-right: 10px;
}
.ultraaddons-element.ua-element-button .ultraaddons-button .ultraaddons-button-text {
.ua-element.ua-element-button .ultraaddons-button .ultraaddons-button-text {
order: 10;
}

.ultraaddons-element.ua-element-button .ultraaddons-button .ultraaddons-button-icon.align-right {
.ua-element.ua-element-button .ultraaddons-button .ultraaddons-button-icon.align-right {
order: 20;
margin-left: 10px;
}

.ultraaddons-element.ua-element-button .ultraaddons-button-wrapper.center {
.ua-element.ua-element-button .ultraaddons-button-wrapper.center {
justify-content: center;
}

.ultraaddons-element.ua-element-button .ultraaddons-button-wrapper.left{
.ua-element.ua-element-button .ultraaddons-button-wrapper.left{
justify-content: flex-start;
}

.ultraaddons-element.ua-element-button .ultraaddons-button-wrapper.right{
.ua-element.ua-element-button .ultraaddons-button-wrapper.right{
justify-content: flex-end;
}
58 changes: 29 additions & 29 deletions assets/css/widgets/cart.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.ua-ultraaddons-cart .ultraaddons-cart-wrapper ul.site-elementor-cart {
.ua-element-cart .ultraaddons-cart-wrapper ul.site-elementor-cart {
display: flex;
align-items: center;
justify-content: flex-end;
Expand All @@ -7,42 +7,42 @@
padding: 0;
margin: 0;
}
.ua-ultraaddons-cart .ultraaddons-cart-wrapper ul.site-elementor-cart > li.minicart-content-wrapper {
.ua-element-cart .ultraaddons-cart-wrapper ul.site-elementor-cart > li.minicart-content-wrapper {
display: none;
position: absolute;
z-index: 210;
width: 400px;
top: 100%;
}

.ua-ultraaddons-cart .ultraaddons-cart-wrapper ul.site-elementor-cart li.minicart-content-wrapper .widget_shopping_cart {
.ua-element-cart .ultraaddons-cart-wrapper ul.site-elementor-cart li.minicart-content-wrapper .widget_shopping_cart {
background: white;
border: 0;
padding: 25px;
box-shadow: 0 5px 40px 0 rgb(10 10 25 / 10%);
margin-top: 40px;
}
.ua-ultraaddons-cart .widget_shopping_cart h2.widgettitle {
.ua-element-cart .widget_shopping_cart h2.widgettitle {
margin: 0 !important;
}
.ua-ultraaddons-cart .widget_shopping_cart_content ul.woocommerce-mini-cart.cart_list {
.ua-element-cart .widget_shopping_cart_content ul.woocommerce-mini-cart.cart_list {
margin: 0;
padding: 0;
list-style: none;
}
.ua-ultraaddons-cart .widget_shopping_cart_content ul.woocommerce-mini-cart li.woocommerce-mini-cart-item.mini_cart_item a>img,
.ua-ultraaddons-cart .widget_shopping_cart_content ul.product_list_widget li a>img {
.ua-element-cart .widget_shopping_cart_content ul.woocommerce-mini-cart li.woocommerce-mini-cart-item.mini_cart_item a>img,
.ua-element-cart .widget_shopping_cart_content ul.product_list_widget li a>img {
left: 0;
top: -10px;
}
.ua-ultraaddons-cart .widget_shopping_cart_content ul.woocommerce-mini-cart li.woocommerce-mini-cart-item.mini_cart_item {
.ua-element-cart .widget_shopping_cart_content ul.woocommerce-mini-cart li.woocommerce-mini-cart-item.mini_cart_item {
display: flex;
align-items: flex-start;
padding: 20px 0;
position: relative;
border-bottom: 1px solid #d7d7d77d;
}
.ua-ultraaddons-cart .widget_shopping_cart_content ul.woocommerce-mini-cart li.woocommerce-mini-cart-item.mini_cart_item span.quantity {
.ua-element-cart .widget_shopping_cart_content ul.woocommerce-mini-cart li.woocommerce-mini-cart-item.mini_cart_item span.quantity {
right: 0;
position: absolute;
}
Expand Down Expand Up @@ -70,17 +70,17 @@
padding: 3px 12px;
color: white;
}
.ua-ultraaddons-cart .ultraaddons-cart-wrapper ul.site-elementor-cart:hover > li.minicart-content-wrapper,
.ua-element-cart .ultraaddons-cart-wrapper ul.site-elementor-cart:hover > li.minicart-content-wrapper,
.elementor-element.elementor-element-edit-mode.see-hover-in-admin-yes .ultraaddons-cart-wrapper ul.site-elementor-cart > li.minicart-content-wrapper,
.elementor-element.expand-always-yes .ultraaddons-cart-wrapper ul.site-elementor-cart > li.minicart-content-wrapper,
/*.elementor-element.see-hover-in-admin-yes .ultraaddons-cart-wrapper ul.site-elementor-cart > li.minicart-content-wrapper,*/
.ua-ultraaddons-cart .ultraaddons-cart-wrapper ul.site-elementor-cart:focus > li.minicart-content-wrapper {
.ua-element-cart .ultraaddons-cart-wrapper ul.site-elementor-cart:focus > li.minicart-content-wrapper {
display: block;
}
.elementor-element.elementor-element-edit-mode.see-hover-in-admin-yes li.minicart-content-wrapper{}
.elementor-element.expand-always-yes li.minicart-content-wrapper{}

.ua-ultraaddons-cart .widget_shopping_cart_content ul.woocommerce-mini-cart li.woocommerce-mini-cart-item.mini_cart_item a {
.ua-element-cart .widget_shopping_cart_content ul.woocommerce-mini-cart li.woocommerce-mini-cart-item.mini_cart_item a {
font-size: 16px;
line-height: 22px;
font-weight: 600;
Expand All @@ -91,8 +91,8 @@
text-decoration: none;
outline: none;
}
.ua-ultraaddons-cart .widget_shopping_cart_content ul.woocommerce-mini-cart li.woocommerce-mini-cart-item.mini_cart_item a.remove,
.ua-ultraaddons-cart .widget_shopping_cart_content ul.product_list_widget li a.remove {
.ua-element-cart .widget_shopping_cart_content ul.woocommerce-mini-cart li.woocommerce-mini-cart-item.mini_cart_item a.remove,
.ua-element-cart .widget_shopping_cart_content ul.product_list_widget li a.remove {
font-weight: 300;
color: #0fc392;
z-index: 2;
Expand All @@ -105,7 +105,7 @@
height: 100%;

}
.ua-ultraaddons-cart .widget_shopping_cart_content ul.woocommerce-mini-cart li.woocommerce-mini-cart-item.mini_cart_item a:not(.remove) {
.ua-element-cart .widget_shopping_cart_content ul.woocommerce-mini-cart li.woocommerce-mini-cart-item.mini_cart_item a:not(.remove) {
display: flex;
padding-left: 0px;
position: relative;
Expand All @@ -115,36 +115,36 @@
/* justify-content: flex-start; */
text-align: left;
}
.ua-ultraaddons-cart .widget_shopping_cart_content ul.woocommerce-mini-cart li.woocommerce-mini-cart-item.mini_cart_item a>img,
.ua-ultraaddons-cart .widget_shopping_cart_content ul.product_list_widget li a>img {
.ua-element-cart .widget_shopping_cart_content ul.woocommerce-mini-cart li.woocommerce-mini-cart-item.mini_cart_item a>img,
.ua-element-cart .widget_shopping_cart_content ul.product_list_widget li a>img {
max-width: 60px;
height: auto;
float: left;
margin-right: 10px;
}
.ua-ultraaddons-cart .widget_shopping_cart_content .woocommerce-mini-cart__total.total strong,
.ua-ultraaddons-cart .widget_shopping_cart_content span.woocommerce-Price-amount.amount {
.ua-element-cart .widget_shopping_cart_content .woocommerce-mini-cart__total.total strong,
.ua-element-cart .widget_shopping_cart_content span.woocommerce-Price-amount.amount {
font-weight: 600;
}
.ua-ultraaddons-cart .widget_shopping_cart_content span.woocommerce-Price-amount.amount {
.ua-element-cart .widget_shopping_cart_content span.woocommerce-Price-amount.amount {
background-color: transparent;
}
.ua-ultraaddons-cart .widget_shopping_cart_content ul.product_list_widget li a.remove:before{
.ua-element-cart .widget_shopping_cart_content ul.product_list_widget li a.remove:before{
display: none;
}
.ua-ultraaddons-cart .widget_shopping_cart_content ul.woocommerce-mini-cart li.woocommerce-mini-cart-item.mini_cart_item a.remove, .ua-ultraaddons-cart .widget_shopping_cart_content ul.product_list_widget li a.remove {
.ua-element-cart .widget_shopping_cart_content ul.woocommerce-mini-cart li.woocommerce-mini-cart-item.mini_cart_item a.remove, .ua-element-cart .widget_shopping_cart_content ul.product_list_widget li a.remove {
position: relative;
width: 20px;
text-indent: unset;
}
.ua-ultraaddons-cart .widget_shopping_cart_content p.woocommerce-mini-cart__total.total {
.ua-element-cart .widget_shopping_cart_content p.woocommerce-mini-cart__total.total {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
margin: 15px 0;
}
.ua-ultraaddons-cart .widget_shopping_cart_content .woocommerce-mini-cart__buttons.buttons a {
.ua-element-cart .widget_shopping_cart_content .woocommerce-mini-cart__buttons.buttons a {
display: block;
width: 100%;
text-align: center;
Expand All @@ -161,19 +161,19 @@
text-decoration: none;
outline: none;
}
.ua-ultraaddons-cart .widget_shopping_cart_content .woocommerce-mini-cart__buttons.buttons a:hover {
.ua-element-cart .widget_shopping_cart_content .woocommerce-mini-cart__buttons.buttons a:hover {
border-color: #0fc392;
background: transparent;
color: #0fc392;
}
.elementor-align-left.ua-ultraaddons-cart .ultraaddons-cart-wrapper ul.site-elementor-cart {
.elementor-align-left.ua-element-cart .ultraaddons-cart-wrapper ul.site-elementor-cart {
justify-content: flex-start;
margin: 0;
}
.elementor-align-left.ua-ultraaddons-cart .ultraaddons-cart-wrapper ul.site-elementor-cart li.cart-text-li {
.elementor-align-left.ua-element-cart .ultraaddons-cart-wrapper ul.site-elementor-cart li.cart-text-li {
padding-left: 0;
}
.elementor-align-center.ua-ultraaddons-cart .ultraaddons-cart-wrapper ul.site-elementor-cart {
.elementor-align-center.ua-element-cart .ultraaddons-cart-wrapper ul.site-elementor-cart {
justify-content: center;
margin: 0;
}
Expand All @@ -187,7 +187,7 @@
.cart-title-align-right h2.widgettitle {
text-align: right;
}
.ua-ultraaddons-cart .ultraaddons-cart-wrapper .hide-content-yes{
.ua-element-cart .ultraaddons-cart-wrapper .hide-content-yes{
display: none !important;
}
.ultraaddons-cart-wrapper span.count {
Expand Down
Loading

0 comments on commit da7102b

Please sign in to comment.