diff -r 490d5cc509ed -r cf61fcea0001 wp/wp-content/plugins/option-tree/ot-loader.php --- a/wp/wp-content/plugins/option-tree/ot-loader.php Tue Jun 09 11:14:17 2015 +0000 +++ b/wp/wp-content/plugins/option-tree/ot-loader.php Mon Oct 14 17:39:30 2019 +0200 @@ -3,10 +3,11 @@ * Plugin Name: OptionTree * Plugin URI: https://github.com/valendesigns/option-tree/ * Description: Theme Options UI Builder for WordPress. A simple way to create & save Theme Options and Meta Boxes for free or premium themes. - * Version: 2.5.5 + * Version: 2.6.0 * Author: Derek Herman * Author URI: http://valendesigns.com * License: GPLv3 + * Text Domain: option-tree */ /** @@ -90,12 +91,14 @@ if ( apply_filters( 'ot_child_theme_mode', false ) == true ) { - $path = ltrim( end( @explode( get_stylesheet(), str_replace( '\\', '/', dirname( __FILE__ ) ) ) ), '/' ); + $path = @explode( get_stylesheet(), str_replace( '\\', '/', dirname( __FILE__ ) ) ); + $path = ltrim( end( $path ), '/' ); define( 'OT_LANG_DIR', trailingslashit( trailingslashit( get_stylesheet_directory() ) . $path ) . trailingslashit( 'languages' ) . 'theme-mode' ); } else { - - $path = ltrim( end( @explode( get_template(), str_replace( '\\', '/', dirname( __FILE__ ) ) ) ), '/' ); + + $path = @explode( get_template(), str_replace( '\\', '/', dirname( __FILE__ ) ) ); + $path = ltrim( end( $path ), '/' ); define( 'OT_LANG_DIR', trailingslashit( trailingslashit( get_template_directory() ) . $path ) . trailingslashit( 'languages' ) . 'theme-mode' ); } @@ -178,7 +181,7 @@ /** * Current Version number. */ - define( 'OT_VERSION', '2.5.5' ); + define( 'OT_VERSION', '2.6.0' ); /** * For developers: Theme mode. @@ -396,6 +399,9 @@ /* Registers the Settings page */ if ( OT_SHOW_PAGES == true ) { add_action( 'init', 'ot_register_settings_page' ); + + /* global CSS */ + add_action( 'admin_head', array( $this, 'global_admin_css' ) ); } } @@ -486,9 +492,6 @@ /* create media post */ add_action( 'admin_init', 'ot_create_media_post', 8 ); - - /* global CSS */ - add_action( 'admin_head', array( $this, 'global_admin_css' ) ); /* Google Fonts front-end CSS */ add_action( 'wp_enqueue_scripts', 'ot_load_google_fonts_css', 1 ); @@ -583,8 +586,7 @@ font-weight: normal; font-style: normal; } - #adminmenu #toplevel_page_ot-settings .menu-icon-generic div.wp-menu-image:before, - #option-tree-header #option-tree-logo a:before { + #adminmenu #toplevel_page_ot-settings .menu-icon-generic div.wp-menu-image:before { font: normal ' . $fontsize . '/1 "option-tree-font" !important; speak: none; padding: 6px 0; @@ -597,14 +599,8 @@ -moz-transition: all .1s ease-in-out; transition: all .1s ease-in-out; } - #adminmenu #toplevel_page_ot-settings .menu-icon-generic div.wp-menu-image:before, - #option-tree-header #option-tree-logo a:before { + #adminmenu #toplevel_page_ot-settings .menu-icon-generic div.wp-menu-image:before { content: "\e785"; - } - #option-tree-header #option-tree-logo a:before { - font-size: 20px !important; - height: 24px; - padding: 2px 0; }' . $wp_38minus . ' '; @@ -662,6 +658,7 @@ * AJAX utility function for adding a new list item. */ public function add_list_item() { + check_ajax_referer( 'option_tree', 'nonce' ); ot_list_item_view( $_REQUEST['name'], $_REQUEST['count'], array(), $_REQUEST['post_id'], $_REQUEST['get_option'], unserialize( ot_decode( $_REQUEST['settings'] ) ), $_REQUEST['type'] ); die(); } @@ -670,6 +667,7 @@ * AJAX utility function for adding a new social link. */ public function add_social_links() { + check_ajax_referer( 'option_tree', 'nonce' ); ot_social_links_view( $_REQUEST['name'], $_REQUEST['count'], array(), $_REQUEST['post_id'], $_REQUEST['get_option'], unserialize( ot_decode( $_REQUEST['settings'] ) ), $_REQUEST['type'] ); die(); }