• Resolved peoy

    (@peoy)


    # […] /wp-content/plugins/wp-dbmanager# find . -type f -exec grep css {} \;
    * NEW: Added database-admin-css.css For WP-DBManager Admin CSS Styles

    there is no database-admin-css.css file in the distribution, and no reference to where to put it.. that text comes from the readme.txt file (changelog).
    Is it possible to get back this functionality that might have been present in an earlier version ?

    = Version 2.40 (12-12-2008) =
    * NEW: Works For WordPress 2.7 Only
    * NEW: Load Admin JS And CSS Only In WP-DBManager Admin Pages
    * NEW: Added database-admin-css.css For WP-DBManager Admin CSS Styles
    * NEW: Uses admin_url(), plugins_url() And site_url()

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Lester Chan

    (@gamerz)

    It is no longer applicable since it has been 9 years and that is for WP 2.x

    Thread Starter peoy

    (@peoy)

    I have reimplemented it in my installation now so… everyone is free to use ..
    wp-dbmanager.php
    (added after dbmanager_textdomain() function):

    function wp_dbmanager_admin_style($hook) {
        $dbm_base = dirname(plugin_basename(__FILE__)) . "/";
        $subhook = substr($hook,0,strlen($dbm_base));
        if(substr($hook,0,strlen($dbm_base)) !=  $dbm_base ) return;
        wp_enqueue_style( 'wp_dbmanager_admin_css', plugins_url('database-admin-css.css', __FILE__) );
    }
    add_action( 'admin_enqueue_scripts', 'wp_dbmanager_admin_style' );
    • This reply was modified 8 years ago by peoy.
    Plugin Author Lester Chan

    (@gamerz)

    @peoy, maybe you should as well check if the css file exist first.

    Thread Starter peoy

    (@peoy)

    a quick fix that needed a quick update ??

    function wp_dbmanager_admin_style($hook) {
        $dbm_base = dirname(plugin_basename(__FILE__)) . "/";
        $subhook = substr($hook,0,strlen($dbm_base));
        if (substr($hook,0,strlen($dbm_base)) !=  $dbm_base ) return;
        if (file_exists(plugin_dir_path(__FILE__) . 'database-admin-css.css'))
          wp_enqueue_style( 'wp_dbmanager_admin_css', plugins_url('database-admin-css.css', __FILE__) );
    }
    add_action( 'admin_enqueue_scripts', 'wp_dbmanager_admin_style' );
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘wp-dbmanager admin stylesheet ?’ is closed to new replies.