Skip to content

Commit 10037b5

Browse files
author
Ghost1227
committed
Bring embedded sources up to date
1 parent 906c92b commit 10037b5

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

framework.php

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
*
1717
* @package ReduxFramework
1818
* @author Daniel J Griffiths (Ghost1227)
19-
* @author Dovy Paukstys
20-
* @version 3.0.0
19+
* @author Dovy Paukstys (dovy)
20+
* @version 3.0.1
2121
*/
2222

2323
// Exit if accessed directly
@@ -26,7 +26,7 @@
2626
// Don't duplicate me!
2727
if( !class_exists( 'ReduxFramework' ) ) {
2828

29-
define('REDUX_VERSION', '3.0.0');
29+
define('REDUX_VERSION', '3.0.1');
3030

3131
// Windows-proof constants: replace backward by forward slashes
3232
// Thanks to: https://github.com/peterbouwmeester
@@ -116,9 +116,9 @@ public function __construct( $sections = array(), $args = array(), $extra_tabs =
116116
$defaults['dev_mode'] = false;
117117
$defaults['system_info'] = false;
118118
$defaults['admin_stylesheet'] = 'standard';
119-
$defaults['footer_credit'] = __( '<span id="footer-thankyou">Options panel created using <a href="' . $this->framework_url . '" target="_blank">Redux Framework</a> v' . $this->framework_version . '</span>', 'redux-framework' );
119+
$defaults['footer_credit'] = '<span id="footer-thankyou">' . __( 'Options panel created using', 'redux-framework') . '<a href="' . $this->framework_url . '" target="_blank">' . __('Redux Framework', 'redux-framework') . '</a> v' . $this->framework_version . '</span>';
120120
$defaults['help_tabs'] = array();
121-
$defaults['help_sidebar'] = __( '', 'redux-framework' );
121+
$defaults['help_sidebar'] = ''; // __( '', 'redux-framework' );
122122
$defaults['database'] = ''; // possible: options, theme_mods, theme_mods_expanded, transient
123123
$defaults['customizer'] = true; // setting to true forces get_theme_mod_expanded
124124
$defaults['global_variable'] = '';
@@ -618,6 +618,9 @@ function _options_page() {
618618
if ( !isset( $section['title'] ) )
619619
continue;
620620

621+
if ( isset( $section['submenu'] ) && $section['submenu'] == false )
622+
continue;
623+
621624
add_submenu_page(
622625
$this->args['page_slug'],
623626
$section['title'],
@@ -1055,11 +1058,7 @@ public function _register_setting() {
10551058
if( isset( $field['title'] ) && isset( $field['type'] ) && $field['type'] !== "info" ) {
10561059
$default_mark = ( !empty($field['default']) && isset($this->options[$field['id']]) && $this->options[$field['id']] == $field['default'] && !empty( $this->args['default_mark'] ) && isset( $field['default'] ) ) ? $this->args['default_mark'] : '';
10571060
if (!empty($field['title'])) {
1058-
if ( $field['type'] == 'text' ) {
1059-
$th = '<label for="'. $field['id'] .'-'. $field['type'] .'">'. $field['title'] . $default_mark .'</label>';
1060-
} else {
1061-
$th = $field['title'] . $default_mark;
1062-
}
1061+
$th = $field['title'] . $default_mark;
10631062
}
10641063
if( isset( $field['subtitle'] ) ) {
10651064
$th .= '<span class="description">' . $field['subtitle'] . '</span>';
@@ -1438,15 +1437,15 @@ public function _options_page_html() {
14381437
// Warning bar
14391438
if( isset( $_GET['settings-updated'] ) && $_GET['settings-updated'] == 'true' && $saved == '1' ) {
14401439
if( isset( $this->options['REDUX_imported'] ) && $this->options['REDUX_imported'] === 1 ) {
1441-
echo '<div id="redux-imported">' . apply_filters( 'redux-imported-text-' . $this->args['opt_name'], '' . __( '<strong>Settings Imported!</strong>', 'redux-framework' ) ) . '</div>';
1440+
echo '<div id="redux-imported">' . apply_filters( 'redux-imported-text-' . $this->args['opt_name'], '<strong>' . __( 'Settings Imported!', 'redux-framework' ) ) . '</strong></div>';
14421441
} else {
1443-
echo '<div id="redux-save">' . apply_filters( 'redux-saved-text-' . $this->args['opt_name'], __( '<strong>Settings Saved!</strong>', 'redux-framework' ) ) . '</div>';
1442+
echo '<div id="redux-save">' . apply_filters( 'redux-saved-text-' . $this->args['opt_name'], '<strong>'.__( 'Settings Saved!', 'redux-framework' ) ) . '</strong></div>';
14441443
}
14451444
}
14461445

1447-
echo '<div id="redux-save-warn">' . apply_filters( 'redux-changed-text-' . $this->args['opt_name'], __( '<strong>Settings have changed, you should save them!</strong>', 'redux-framework' ) ) . '</div>';
1448-
echo '<div id="redux-field-errors">' . __( '<strong><span></span> error(s) were found!</strong>', 'redux-framework' ) . '</div>';
1449-
echo '<div id="redux-field-warnings">' . __( '<strong><span></span> warning(s) were found!</strong>', 'redux-framework' ) . '</div>';
1446+
echo '<div id="redux-save-warn">' . apply_filters( 'redux-changed-text-' . $this->args['opt_name'], '<strong>'.__( 'Settings have changed, you should save them!', 'redux-framework' ) ) . '</strong></div>';
1447+
echo '<div id="redux-field-errors"><strong><span></span> ' . __( 'error(s) were found!', 'redux-framework' ) . '</strong></div>';
1448+
echo '<div id="redux-field-warnings"><strong><span></span> ' . __( 'warning(s) were found!', 'redux-framework' ) . '</strong></div>';
14501449

14511450
echo '</div>';
14521451

0 commit comments

Comments
 (0)