enqueue admin stylesheet
This commit is contained in:
parent
9b3a95741f
commit
429f52c75b
3 changed files with 27 additions and 2 deletions
10
admin/css/lbry-admin.css
Normal file
10
admin/css/lbry-admin.css
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
/**
|
||||||
|
* Stylesheet for the admin options page
|
||||||
|
* @package LBRYPress
|
||||||
|
*/
|
||||||
|
|
||||||
|
.wallet-icon-lbc {
|
||||||
|
height: 1.8em;
|
||||||
|
margin-right: .5em;
|
||||||
|
margin-bottom: -.5em;
|
||||||
|
}
|
|
@ -33,6 +33,21 @@ class LBRY_Admin
|
||||||
array($this, 'options_page_html'),
|
array($this, 'options_page_html'),
|
||||||
plugin_dir_url(LBRY_PLUGIN_FILE) . '/admin/images/lbry-logo.svg'
|
plugin_dir_url(LBRY_PLUGIN_FILE) . '/admin/images/lbry-logo.svg'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Admin stylesheet enqueue
|
||||||
|
function load_admin_stylesheet( $hook ) {
|
||||||
|
|
||||||
|
if ( ( $_GET['page'] == 'lbrypress' ) ) {
|
||||||
|
wp_enqueue_style(
|
||||||
|
'lbry-admin',
|
||||||
|
plugins_url( '/admin/css/lbry-admin.css', LBRY_PLUGIN_FILE ),
|
||||||
|
array(),
|
||||||
|
LBRY_VERSION,
|
||||||
|
'all'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
add_action( 'admin_enqueue_scripts', 'load_admin_stylesheet' );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -16,7 +16,7 @@ $channel_list = $LBRY->daemon->channel_list();
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<h1><?php esc_html_e( get_admin_page_title(), 'lbrypress' ); ?></h1>
|
<h1><?php esc_html_e( get_admin_page_title(), 'lbrypress' ); ?></h1>
|
||||||
|
|
||||||
<h2 title="<?php echo esc_attr( number_format( $total_balance, 3, '.', ',' ) ); ?> Wallet Total Balance"><img src="<?php echo esc_url( plugin_dir_url( LBRY_PLUGIN_FILE ) . 'admin/images/lbc.png' ) ?>" class="icon icon-lbc wallet-icon-lbc" style="height: 1.8em; margin-right: .5em; margin-bottom: -.5em;"><code><?php esc_html_e( number_format( $available_balance, 3, '.', ',' ) ); ?></code> Wallet Available Balance</h2>
|
<h2 title="<?php echo esc_attr( number_format( $total_balance, 3, '.', ',' ) ); ?> Wallet Total Balance"><img src="<?php echo esc_url( plugin_dir_url( LBRY_PLUGIN_FILE ) . 'admin/images/lbc.png' ) ?>" class="icon icon-lbc wallet-icon-lbc"><code><?php esc_html_e( number_format( $available_balance, 3, '.', ',' ) ); ?></code> Wallet Available Balance</h2>
|
||||||
<nav class="nav-tab-wrapper">
|
<nav class="nav-tab-wrapper">
|
||||||
<a href="<?php echo esc_url( admin_url( 'options.php?page=lbrypress&tab=general' ) ); ?>" class="nav-tab <?php echo $lbry_active_tab == 'general' || '' ? 'nav-tab-active' : ''; ?>"><?php esc_html_e( 'Settings' ); ?></a>
|
<a href="<?php echo esc_url( admin_url( 'options.php?page=lbrypress&tab=general' ) ); ?>" class="nav-tab <?php echo $lbry_active_tab == 'general' || '' ? 'nav-tab-active' : ''; ?>"><?php esc_html_e( 'Settings' ); ?></a>
|
||||||
<a href="<?php echo esc_url( admin_url( 'admin.php?page=lbrypress&tab=channels' ) ); ?>" class="nav-tab <?php echo $lbry_active_tab == 'channels' ? 'nav-tab-active' : ''; ?>"><?php esc_html_e( 'Channels' ); ?></a>
|
<a href="<?php echo esc_url( admin_url( 'admin.php?page=lbrypress&tab=channels' ) ); ?>" class="nav-tab <?php echo $lbry_active_tab == 'channels' ? 'nav-tab-active' : ''; ?>"><?php esc_html_e( 'Channels' ); ?></a>
|
||||||
|
@ -34,7 +34,7 @@ $channel_list = $LBRY->daemon->channel_list();
|
||||||
do_settings_sections( LBRY_ADMIN_PAGE );
|
do_settings_sections( LBRY_ADMIN_PAGE );
|
||||||
submit_button();
|
submit_button();
|
||||||
} elseif ( $lbry_active_tab == 'channels' ) {
|
} elseif ( $lbry_active_tab == 'channels' ) {
|
||||||
/// include_once( 'partials/channel-page.php' );
|
// include_once( 'partials/channel-page.php' );
|
||||||
} elseif ( $lbry_active_tab == 'speech' ) {
|
} elseif ( $lbry_active_tab == 'speech' ) {
|
||||||
settings_fields( LBRY_SPEECH_SETTINGS );
|
settings_fields( LBRY_SPEECH_SETTINGS );
|
||||||
do_settings_sections( 'lbrypress-speech' );
|
do_settings_sections( 'lbrypress-speech' );
|
||||||
|
|
Loading…
Add table
Reference in a new issue