Skip to content

Commit

Permalink
small code maintenance
Browse files Browse the repository at this point in the history
  • Loading branch information
bueltge committed Jul 19, 2019
1 parent 9bdfbde commit 54105ec
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 13 deletions.
12 changes: 7 additions & 5 deletions WpAdminStyle.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php /** @noinspection HtmlUnknownTarget */
/**
* Plugin Name: WordPress Admin Style
* Plugin URI: https://github.com/bueltge/wordpress-admin-style
Expand All @@ -7,11 +7,11 @@
* Domain Path: /languages
* Description: Shows the WordPress admin styles on one page to help you to develop WordPress compliant.
* Author: Frank Bültge
* Version: 1.5.3
* Version: 1.5.4
* Licence: GPLv2+
* License URI: ./LICENSE
* License URI: ./LICENSE
* Author URI: https://bueltge.de
* Last Change: 2019-07-17
* Last Change: 2019-07-19
*/

! defined( 'ABSPATH' ) && exit;
Expand Down Expand Up @@ -103,6 +103,7 @@ protected function load_classes() {

// Load required classes.
foreach ( glob( __DIR__ . '/inc/*.php' ) as $path ) {
/** @noinspection PhpIncludeInspection */
require_once $path;
}
}
Expand Down Expand Up @@ -219,6 +220,7 @@ public function get_style_examples() {
$patterns = $this->patterns_dir . '/' . $file;

echo '<section class="pattern" id="' . esc_attr( $anker ) . '">';
/** @noinspection PhpIncludeInspection */
include_once $patterns;
echo '<details class="primer" style="display: inline-block; width: 100%;">';
echo '<summary title="Show markup and usage">&#8226;&#8226;&#8226; '
Expand Down Expand Up @@ -263,7 +265,7 @@ public function get_mini_menu() {

<div class="inside">

<table class="widefat" cellspacing="0">
<table class="widefat">
<?php
$class = '';
foreach ( $patterns as $pattern ) {
Expand Down
6 changes: 3 additions & 3 deletions inc/WpAdminDashicons.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
// avoid direct calls to this file, because now WP core and framework has been used.
! defined( 'ABSPATH' ) and exit;
! defined( 'ABSPATH' ) && exit;

add_action(
'init',
Expand All @@ -24,7 +24,7 @@ class WpAdminDashicons {
*/
public static function get_instance() {

NULL === self::$instance and self::$instance = new self;
NULL === self::$instance && self::$instance = new self;

return self::$instance;
}
Expand Down Expand Up @@ -84,7 +84,7 @@ public function get_dashicon_demo() {
<h2 id="iconpicker">Iconpicker for Dashicons</h2>
<div>
<label for="dashicons_picker_icon"><?php _e( 'Icon' ); ?></label>
<input class="regular-text" type="text" id="dashicons_picker_icon" name="dashicons_picker_settings[icon]" value="<?php if( isset( $options['icon'] ) ) { echo esc_attr( $options['icon'] ); } ?>"/>
<input class="regular-text" type="text" id="dashicons_picker_icon" name="dashicons_picker_settings[icon]" value=""/>
<input type="button" data-target="#dashicons_picker_icon" class="button dashicons-picker" value="pick" />
</div>

Expand Down
7 changes: 4 additions & 3 deletions inc/WpAdminGenericons.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
// avoid direct calls to this file, because now WP core and framework has been used.
! defined( 'ABSPATH' ) and exit;
! defined( 'ABSPATH' ) && exit;

add_action(
'init',
Expand All @@ -24,7 +24,7 @@ class WpAdminGenericons {
*/
public static function get_instance() {

NULL === self::$instance and self::$instance = new self;
NULL === self::$instance && self::$instance = new self;

return self::$instance;
}
Expand Down Expand Up @@ -388,6 +388,7 @@ public function register_scripts() {
plugin_dir_url( __FILE__ ) . '../css/genericons-demo.css',
'genericons'
);
wp_enqueue_style( array( 'genericons', 'genericons-demo' ) );
wp_enqueue_style( 'genericons' );
wp_enqueue_style( 'genericons-demo' );
}
} // end class
4 changes: 2 additions & 2 deletions inc/WpAdminJqueryUi.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

// avoid direct calls to this file, because now WP core and framework has been used.
! defined( 'ABSPATH' ) and exit;
! defined( 'ABSPATH' ) && exit;

add_action(
'init',
Expand Down Expand Up @@ -72,7 +72,7 @@ public function get_jquery_ui_demo() {
<h2><span><?php _e( 'MiniMenu', 'WpAdminStyle' ); ?></span></h2>
<div class="inside">

<table class="widefat" cellspacing="0">
<table class="widefat">
<tr>
<td class="row-title"><a href="#accordion"><?php _e( 'Accordion', 'WpAdminStyle' ); ?></a></td>
</tr>
Expand Down

0 comments on commit 54105ec

Please sign in to comment.