Skip to content

Commit

Permalink
Merge pull request #212 from abaicus/development
Browse files Browse the repository at this point in the history
Added a new Analytics Module
  • Loading branch information
abaicus authored Mar 2, 2018
2 parents 6f6c7c9 + f07c50a commit ce8c0f3
Show file tree
Hide file tree
Showing 11 changed files with 534 additions and 16 deletions.
2 changes: 1 addition & 1 deletion core/app/class-orbit-fox-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ public function page_modules_render() {
$options_fields = '';
if ( ! empty( $module_options ) ) {
foreach ( $module_options as $option ) {
$options_fields .= $rdh->render_option( $option );
$options_fields .= $rdh->render_option( $option, $module );
}

$panels .= $rdh->get_partial(
Expand Down
2 changes: 2 additions & 0 deletions core/app/class-orbit-fox-global-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public static function instance() {
array(
'social-sharing',
'uptime-monitor',
'google-analytics',
'companion-legacy',
'elementor-widgets',
'template-directory',
Expand All @@ -81,6 +82,7 @@ public static function instance() {
*
* @since 1.0.0
* @access public
*
* @param string $name The name of the module from $modules array.
* @param Orbit_Fox_Module_Abstract $module The module object.
*/
Expand Down
9 changes: 8 additions & 1 deletion core/app/helpers/class-orbit-fox-render-helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -334,10 +334,12 @@ private function field_toggle( $option = array() ) {
*
* @since 1.0.0
* @access public
* @param array $option The option from the module.
* @param array $option The option from the module..
*
* @return mixed
*/
public function render_option( $option = array() ) {

$option = $this->sanitize_option( $option );
switch ( $option['type'] ) {
case 'text':
Expand All @@ -360,11 +362,16 @@ public function render_option( $option = array() ) {
break;
case 'toggle':
return $this->field_toggle( $option );
break;
case 'custom':
return apply_filters( 'obfx_custom_control_' . $option['id'], '' );

break;
default:
return __( 'No option found for provided type', 'themeisle-companion' );
break;
}

}


Expand Down
70 changes: 67 additions & 3 deletions core/assets/css/orbit-fox-admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* Extends Spectre.css Library
*/
/*
Version: 2.4.1
Version: 2.4.2
*/

/* Document
Expand Down Expand Up @@ -707,6 +707,60 @@ html {
border-left-color: #fff;
}

.obfx-wrapper .btn.btn-success {
background: #32b643;
border-color: #2faa3f;
color: #fff
}

.obfx-wrapper .btn.btn-success:focus {
box-shadow: 0 0 0 .1rem rgba(50,182,67,.2)
}

.obfx-wrapper .btn.btn-success:focus,.obfx-wrapper .btn.btn-success:hover {
background: #30ae40;
border-color: #2da23c;
color: #fff
}

.obfx-wrapper .btn.btn-success.active,.obfx-wrapper .btn.btn-success:active {
background: #2a9a39;
border-color: #278e34;
color: #fff
}

.obfx-wrapper .btn.btn-success.loading::after {
border-bottom-color: #fff;
border-left-color: #fff
}

.obfx-wrapper .btn.btn-error {
background: #e85600;
border-color: #d95000;
color: #fff
}

.obfx-wrapper .btn.btn-error:focus {
box-shadow: 0 0 0 .1rem rgba(232,86,0,.2)
}

.obfx-wrapper .btn.btn-error:focus,.obfx-wrapper .btn.btn-error:hover {
background: #de5200;
border-color: #cf4d00;
color: #fff
}

.obfx-wrapper .btn.btn-error.active,.obfx-wrapper .btn.btn-error:active {
background: #c44900;
border-color: #b54300;
color: #fff
}

.obfx-wrapper .btn.btn-error.loading::after {
border-bottom-color: #fff;
border-left-color: #fff
}

.obfx-wrapper .btn.btn-link {
border-color: transparent;
color: #5764c6;
Expand Down Expand Up @@ -3590,8 +3644,8 @@ html {
.obfx-wrapper .panel.options {
overflow: hidden;
height: 75px;
-webkit-transition: height 1s;
transition: height 1s;
-webkit-transition: height .3s;
transition: height .3s;
}

/** TEMPORARY FIX FOR SOCIAL SHARING STYLE **/
Expand Down Expand Up @@ -3624,6 +3678,16 @@ html {
border-bottom: 1px solid #eee;
}

.obfx-google {
max-width: 20px;
overflow: hidden;
width:16px;
top: -2px;
position: relative;
margin-right: 5px;
font-size: 25px;
}

@media ( max-width: 600px ) {
#obfx-mod-social-sharing .obfx-row .form-label {
margin-bottom: 20px;
Expand Down
2 changes: 1 addition & 1 deletion core/assets/js/orbit-fox-admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ var obfx_admin = function ( $ ) {
);

$( '.obfx-module-form' ).on(
'submit', function ( e ) {
'submit reset', function ( e ) {
e.preventDefault();
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion core/includes/class-orbit-fox.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function __construct() {

$this->plugin_name = 'orbit-fox';

$this->version = '2.4.1';
$this->version = '2.4.2';

$this->load_dependencies();
$this->set_locale();
Expand Down
Loading

0 comments on commit ce8c0f3

Please sign in to comment.