Plugin Directory

Changeset 1135372


Ignore:
Timestamp:
04/15/2015 10:56:10 AM (11 years ago)
Author:
woorockets
Message:

Update version 1.1.0

Location:
wr-megamenu/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wr-megamenu/trunk/assets/woorockets/css/form_design.css

    r1134429 r1135372  
    248248    -moz-box-shadow:    0 -1px 0 0 #fff inset;
    249249    box-shadow:         0 -1px 0 0 #fff inset;
     250    height: auto;
     251}
     252.wr-dialog .ui-dialog-titlebar > .ui-dialog-title {
     253    line-height: 18px;
     254}
     255.wr-dialog .ui-dialog-titlebar > .ui-dialog-titlebar-close:before {
     256    content: '';
     257}
     258.wr-dialog .select2-container .select2-search-choice-close {
     259    display: none;
     260}
     261.wr-dialog .select2-container .select2-arrow {
     262    margin-right: 0;
     263}
     264.wr-dialog .select2-container {
     265    display: inline-block !important;
    250266}
    251267.wr-placeholder{
  • wr-megamenu/trunk/includes/core/backend.php

    r1134429 r1135372  
    2424        add_action( 'wp_update_nav_menu_item',    array( &$this, 'save_nav_menu_item' ), 100, 3 );
    2525        add_filter( 'wp_setup_nav_menu_item',     array( &$this, 'setup_nav_item' ) );
    26         add_action( 'admin_enqueue_scripts',      array( $this, 'remove_style_script' ), 9999 );
    2726        // hook saving post
    2827        add_action( 'save_post', array( &$this, 'save_default_profile' ) );
     
    861860    }
    862861
    863     /**
    864      * Remove the file styles and scripts not under Wr MegaMenu
    865      */
    866     function remove_style_script(){
    867         global $wp_scripts, $wp_styles, $post_type;
    868         $post_type_get = ( isset( $_GET[ 'post_type' ] ) ) ? $_GET[ 'post_type' ]: '';
    869         if ( is_admin() && ( $post_type == 'wr_megamenu_profile' ) || ( $post_type_get == 'wr_megamenu_profile' ) ) {
    870 
    871             $wp_scripts_remove = (array) $wp_scripts;
    872             $wp_styles_remove = (array) $wp_styles;
    873 
    874             $url_theme = get_site_url() . '/wp-content/themes';
    875             $url_plugin = get_site_url() . '/wp-content/plugins';
    876             $url_plugin_mm = get_site_url() . '/wp-content/plugins/wr-megamenu';
    877 
    878             // Remove scripts
    879             if( isset( $wp_scripts_remove[ 'registered' ] ) && $wp_scripts_remove[ 'registered' ] ) {
    880                 foreach( $wp_scripts_remove[ 'registered' ] as $key => $val ) {
    881                     $val = (array) $val;
    882                     $have_mm = strpos( $val[ 'src' ], $url_plugin_mm );
    883                     if( $have_mm === FALSE ) {
    884                         $have_theme = strpos( $val[ 'src' ], $url_theme );
    885                         $have_plugin = strpos( $val[ 'src' ], $url_plugin );
    886                         if( $have_theme === 0 || $have_plugin === 0 ) {
    887                             wp_deregister_script( $key );
    888                             wp_dequeue_script( $key );
    889                         }
    890                     }
    891                 }
    892             }
    893 
    894             // Remove styles
    895             if( isset( $wp_styles_remove[ 'registered' ] ) && $wp_styles_remove[ 'registered' ] ) {
    896                 foreach( $wp_styles_remove[ 'registered' ] as $key => $val ) {
    897                     $val = (array) $val;
    898                     $have_mm = strpos( $val[ 'src' ], $url_plugin_mm );
    899                     if( $have_mm === FALSE ) {
    900                         $have_theme = strpos( $val[ 'src' ], $url_theme );
    901                         $have_plugin = strpos( $val[ 'src' ], $url_plugin );
    902                         if( $have_theme === 0 || $have_plugin === 0 ) {
    903                             wp_deregister_style( $key );
    904                             wp_dequeue_style( $key );
    905                         }
    906                     }
    907                 }
    908             }
    909        
    910         }
    911     }
    912 
    913862}
Note: See TracChangeset for help on using the changeset viewer.