2626// Don't duplicate me!
2727if ( !class_exists ( 'ReduxFramework ' ) ) {
2828
29- define ('REDUX_VERSION ' , '3.0.3 ' );
29+ define ('REDUX_VERSION ' , '3.0.4 ' );
3030
3131 // Windows-proof constants: replace backward by forward slashes
3232 // Thanks to: https://github.com/peterbouwmeester
@@ -115,8 +115,7 @@ public function __construct( $sections = array(), $args = array(), $extra_tabs =
115115 $ defaults ['show_import_export ' ] = true ;
116116 $ defaults ['dev_mode ' ] = false ;
117117 $ defaults ['system_info ' ] = false ;
118- $ defaults ['admin_stylesheet ' ] = 'standard ' ;
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> ' ;
118+ $ 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> ' ;
120119 $ defaults ['help_tabs ' ] = array ();
121120 $ defaults ['help_sidebar ' ] = '' ; // __( '', 'redux-framework' );
122121 $ defaults ['database ' ] = '' ; // possible: options, theme_mods, theme_mods_expanded, transient
@@ -153,6 +152,9 @@ public function __construct( $sections = array(), $args = array(), $extra_tabs =
153152
154153 $ this ->extra_tabs = $ extra_tabs ;
155154
155+ // Options page
156+ add_action ( 'admin_menu ' , array ( &$ this , '_internationalization ' ) );
157+
156158 // Set option with defaults
157159 add_action ( 'init ' , array ( &$ this , '_set_default_options ' ) );
158160
@@ -173,6 +175,10 @@ public function __construct( $sections = array(), $args = array(), $extra_tabs =
173175
174176 }
175177
178+ public function _internationalization () {
179+ load_plugin_textdomain ('redux-framework ' , false , basename ( dirname ( __FILE__ ) ) . '/languages ' );
180+ }
181+
176182 public function get_instance () {
177183 return $ this ->instance ;
178184 }
@@ -736,9 +742,9 @@ public function _enqueue_output() {
736742 public function _enqueue () {
737743 global $ wp_styles ;
738744
739- wp_enqueue_script ('jquery ' );
740- wp_enqueue_script ('jquery-ui-core ' );
741-
745+ wp_enqueue_script ('jquery ' );
746+ wp_enqueue_script ('jquery-ui-core ' );
747+ add_thickbox ();
742748
743749 wp_register_style (
744750 'redux-css ' ,
@@ -785,11 +791,7 @@ public function _enqueue() {
785791
786792 wp_enqueue_style ( 'redux-lte-ie8 ' );
787793
788- if ( $ this ->args ['admin_stylesheet ' ] == 'standard ' ) {
789- wp_enqueue_style ( 'redux-css ' );
790- } elseif ( $ this ->args ['admin_stylesheet ' ] == 'custom ' ) {
791- wp_enqueue_style ( 'redux-custom-css ' );
792- }
794+ wp_enqueue_style ( 'redux-css ' );
793795
794796 wp_enqueue_style ( 'redux-elusive-icon ' );
795797 wp_enqueue_style ( 'redux-elusive-icon-ie7 ' );
@@ -1059,11 +1061,15 @@ public function _register_setting() {
10591061 if ( isset ( $ field ['title ' ] ) && isset ( $ field ['type ' ] ) && $ field ['type ' ] !== "info " && $ field ['type ' ] !== "group " ) {
10601062 $ 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 ' ] : '' ;
10611063 if (!empty ($ field ['title ' ])) {
1062- $ th = $ field ['title ' ] . $ default_mark ;
1064+ $ th = $ field ['title ' ] . $ default_mark. "" ;
10631065 }
1066+
10641067 if ( isset ( $ field ['subtitle ' ] ) ) {
10651068 $ th .= '<span class="description"> ' . $ field ['subtitle ' ] . '</span> ' ;
10661069 }
1070+
1071+
1072+
10671073 }
10681074 if (!isset ($ field ['id ' ])) {
10691075 print_r ($ field );
@@ -1128,6 +1134,11 @@ public function _register_setting() {
11281134 }
11291135 $ this ->sections [$ k ]['fields ' ][$ fieldk ] = $ field ;
11301136
1137+ if ( isset ( $ this ->args ['display_source ' ] ) ) {
1138+ $ th .= '<div id=" ' .$ field ['id ' ].'-settings" style="display:none;"><pre> ' .var_export ($ this ->sections [$ k ]['fields ' ][$ fieldk ], true ).'</pre></div> ' ;
1139+ $ th .= '<br /><a href="#TB_inline?width=600&height=800&inlineId= ' .$ field ['id ' ].'-settings" class="thickbox"><small>View Source</small></a> ' ;
1140+ }
1141+
11311142 add_settings_field ( $ fieldk . '_field ' , $ th , array ( &$ this , '_field_input ' ), $ this ->args ['opt_name ' ] . $ k . '_section_group ' , $ this ->args ['opt_name ' ] . $ k . '_section ' , $ field ); // checkbox
11321143 }
11331144 }
@@ -1427,7 +1438,7 @@ public function _options_page_html() {
14271438 echo '<div id="info_bar"> ' ;
14281439 echo '<a href="javascript:void(0);" id="expand_options"> ' . __ ( 'Expand ' , 'redux-framework ' ) . '</a> ' ;
14291440 echo '<div class="redux-action_bar"> ' ;
1430- submit_button ( '' , 'primary ' , 'redux_save ' , false );
1441+ submit_button ( __ ( ' Save Changes ' , ' redux-framework ' ) , 'primary ' , 'redux_save ' , false );
14311442 echo ' ' ;
14321443 submit_button ( __ ( 'Reset to Defaults ' , 'redux-framework ' ), 'secondary ' , $ this ->args ['opt_name ' ] . '[defaults] ' , false );
14331444 echo '</div> ' ;
@@ -1684,7 +1695,7 @@ public function _options_page_html() {
16841695 }
16851696
16861697 echo '<div class="redux-action_bar"> ' ;
1687- submit_button ( '' , 'primary ' , 'redux_save ' , false );
1698+ submit_button ( __ ( ' Save Changes ' , ' redux-framework ' ) , 'primary ' , 'redux_save ' , false );
16881699 echo ' ' ;
16891700 submit_button ( __ ( 'Reset to Defaults ' , 'redux-framework ' ), 'secondary ' , $ this ->args ['opt_name ' ] . '[defaults] ' , false );
16901701 echo '</div> ' ;
0 commit comments