Skip to content
Browse files

Ditch the inline CSS

  • Loading branch information...
1 parent c8bb2e5 commit 243ac4b3a970e8164c9a4296260b03185462ce89 @Viper007Bond Viper007Bond committed Apr 20, 2012
Showing with 17 additions and 7 deletions.
  1. +10 −0 developer.css
  2. +7 −7 developer.php
View
10 developer.css
@@ -1,3 +1,13 @@
.a8c-developer-dialog {
margin: 25px;
+}
+
+.a8c-developer-active {
+ font-weight: bold;
+ color: green;
+}
+
+.a8c-developer-notactive {
+ font-weight: bold;
+ color: maroon;
}
View
14 developer.php
@@ -411,14 +411,14 @@ public function settings_section_plugins() {
// TODO: Check user caps, only show status (not links) if user can't do anything about it
public function settings_field_plugin( $args ) {
if ( $args['active'] ) {
- echo '<span style="font-weight:bold;color:green;">' . esc_html__( 'ACTIVE', 'a8c-developer' ) . '</span>';
+ echo '<span class="a8c-developer-active">' . esc_html__( 'ACTIVE', 'a8c-developer' ) . '</span>';
} else {
if ( $this->is_recommended_plugin_installed( $args['slug'] ) ) {
$path = $this->get_path_for_recommended_plugin( $args['slug'] );
- echo '<a style="font-weight:bold;color:darkred;" href="' . esc_url( wp_nonce_url( admin_url( 'plugins.php?action=activate&plugin=' . $path ), 'activate-plugin_' . $path ) ) . '" title="' . esc_attr__( 'Click here to activate', 'a8c-developer' ) . '">' . esc_html__( 'INACTIVE', 'a8c-developer' ) . '</a>';
+ echo '<a class="a8c-developer-notactive" href="' . esc_url( wp_nonce_url( admin_url( 'plugins.php?action=activate&plugin=' . $path ), 'activate-plugin_' . $path ) ) . '" title="' . esc_attr__( 'Click here to activate', 'a8c-developer' ) . '">' . esc_html__( 'INACTIVE', 'a8c-developer' ) . '</a>';
} else {
// Needs to be installed
- echo '<a style="font-weight:bold;color:darkred;" href="' . esc_url( wp_nonce_url( admin_url( 'update.php?action=install-plugin&plugin=' . $args['slug'] ), 'install-plugin_' . $args['slug'] ) ) . '" title="' . esc_attr__( 'Click here to install', 'a8c-developer' ) . '">' . esc_html__( 'NOT INSTALLED', 'a8c-developer' ) . '</a>';
+ echo '<a class="a8c-developer-notactive" href="' . esc_url( wp_nonce_url( admin_url( 'update.php?action=install-plugin&plugin=' . $args['slug'] ), 'install-plugin_' . $args['slug'] ) ) . '" title="' . esc_attr__( 'Click here to install', 'a8c-developer' ) . '">' . esc_html__( 'NOT INSTALLED', 'a8c-developer' ) . '</a>';
}
}
}
@@ -430,9 +430,9 @@ public function settings_section_constants() {
// TODO: Make this not shitty
public function settings_field_constant( $args ) {
if ( defined( $args['constant'] ) && constant( $args['constant'] ) ) {
- echo '<span style="font-weight:bold;color:green;">' . esc_html__( 'SET', 'a8c-developer' ) . '</span>';
+ echo '<span class="a8c-developer-active">' . esc_html__( 'SET', 'a8c-developer' ) . '</span>';
} else {
- echo '<span style="font-weight:bold;color:darkred;">' . esc_html__( 'NOT SET', 'a8c-developer' ) . '</span>';
+ echo '<span class="a8c-developer-notactive">' . esc_html__( 'NOT SET', 'a8c-developer' ) . '</span>';
}
if ( ! empty( $args['description'] ) )
@@ -446,9 +446,9 @@ public function settings_section_settings() {
public function settings_field_setting_permalink_structure() {
if ( get_option( 'permalink_structure' ) ) {
- echo '<span style="font-weight:bold;color:green;">' . esc_html__( 'ENABLED', 'a8c-developer' ) . '</span>';
+ echo '<span class="a8c-developer-active">' . esc_html__( 'ENABLED', 'a8c-developer' ) . '</span>';
} else {
- echo '<a style="font-weight:bold;color:darkred;" href="' . admin_url( 'options-permalink.php' ) . '">' . esc_html__( 'DISABLED', 'a8c-developer' ) . '</a> ' . __( '<a href="http://codex.wordpress.org/Using_Permalinks" target="_blank">Need help?</a>', 'a8c-developer' );
+ echo '<a class="a8c-developer-notactive" href="' . admin_url( 'options-permalink.php' ) . '">' . esc_html__( 'DISABLED', 'a8c-developer' ) . '</a> ' . __( '<a href="http://codex.wordpress.org/Using_Permalinks" target="_blank">Need help?</a>', 'a8c-developer' );
}
}

0 comments on commit 243ac4b

Please sign in to comment.
Something went wrong with that request. Please try again.