Permalink
Browse files

Mindless refactoring.

Actually, it’s so the inline docs read as actual inline docs.
  • Loading branch information...
mgsisk committed Dec 3, 2013
1 parent 98026e8 commit 17b15347487518cf49ed56ae5903477cf5e341d5
Showing with 1,222 additions and 620 deletions.
  1. +33 −24 -/php/admin.php
  2. +12 −6 -/php/commerce.php
  3. +134 −67 -/php/config.php
  4. +98 −49 -/php/help.php
  5. +34 −17 -/php/legacy.php
  6. +34 −17 -/php/media.php
  7. +32 −16 -/php/pages.php
  8. +55 −28 -/php/posts.php
  9. +76 −38 -/php/shortcodes.php
  10. +372 −186 -/php/tags.php
  11. +48 −24 -/php/taxonomy.php
  12. +44 −22 -/php/transcripts.php
  13. +12 −6 -/php/upgrade.php
  14. +10 −5 -/php/users.php
  15. +140 −70 -/php/widgets.php
  16. +88 −45 webcomic.php
View
@@ -1,15 +1,18 @@
<?php
-/** Contains the WebcomicAdmin class.
+/**
+ * Contains the WebcomicAdmin class.
*
* @package Webcomic
*/
-/** Handle general administrative tasks.
+/**
+ * Handle general administrative tasks.
*
* @package Webcomic
*/
class WebcomicAdmin extends Webcomic {
- /** Register hooks and istantiate the administrative classes.
+ /**
+ * Register hooks and istantiate the administrative classes.
*
* @uses Webcomic::$dir
* @uses Webcomic::$config
@@ -67,7 +70,8 @@ public function __construct() {
}
}
- /** Activation hook.
+ /**
+ * Activation hook.
*
* If no configuration exists or a legacy configuration is detected
* we load the default configuration (saving legacy configurations
@@ -288,7 +292,8 @@ public function activate() {
flush_rewrite_rules();
}
- /** Deactivation hook.
+ /**
+ * Deactivation hook.
*
* Flushes rewrite rules and purges Webcomic Network data when
* deactivated. If the uninstall option has been set we also need to
@@ -420,7 +425,8 @@ public function deactivate() {
flush_rewrite_rules();
}
- /** Handle dynamic requests and remove taxonomy submenus.
+ /**
+ * Handle dynamic requests and remove taxonomy submenus.
*
* Dynamic request must have a 'webcomic_admin_ajax' value that is a
* valid callback in the form of a static class method, like
@@ -444,7 +450,8 @@ public function admin_init() {
}
}
- /** Add contextual help and change the post type icon.
+ /**
+ * Add contextual help.
*
* @uses Webcomic::$dir
* @uses Webcomic::$url
@@ -458,16 +465,11 @@ public function admin_head() {
require_once self::$dir . '-/php/help.php';
new WebcomicHelp( $screen );
-
- if ( preg_match( '/^(edit-)?webcomic_(transcript|language)$/', $screen->id ) ) {
- echo '<style>#icon-edit{background:url("', self::$url, '-/img/transcript.png")}</style>';
- } elseif ( 'admin_page_webcomic-term-sort' === $screen->id or preg_match( '/^(edit-)?webcomic\d+(_storyline|_character)?$/', $screen->id ) ) {
- echo '<style>#icon-edit{background:url("', self::$url, '-/img/webcomic.png")}</style>';
- }
}
}
- /** Render administrative notifications and the thank you message.
+ /**
+ * Render administrative notifications and the thank you message.
*
* @uses Webcomic::$config
* @uses Webcomic::$version
@@ -495,7 +497,8 @@ public function admin_notices() {
}
}
- /** Add administrative dashboard widgets.
+ /**
+ * Add administrative dashboard widgets.
*
* @uses WebcomicAdmin::widget_showcase()
* @hook wp_dhasboard_setup
@@ -504,7 +507,8 @@ public function wp_dashboard_setup() {
wp_add_dashboard_widget( 'webcomic-showcase', __( 'Webcomic Showcase', 'webcomic' ), array( $this, 'widget_showcase' ), array( $this, 'widget_showcase_config' ) );
}
- /** Enqueue custom styles for thank you message.
+ /**
+ * Enqueue custom styles for thank you message.
*
* @uses Webcomic::$url
* @uses Webcomic::$config
@@ -514,8 +518,6 @@ public function admin_enqueue_scripts() {
$screen = get_current_screen();
if ( 'dashboard' === $screen->id and self::$config[ 'api' ] ) {
- wp_register_style( 'webcomic-google-font', 'http://fonts.googleapis.com/css?family=Maven+Pro' );
-
wp_enqueue_style( 'webcomic-showcase', self::$url . '-/css/admin-showcase.css', array( 'webcomic-google-font' ) );
wp_enqueue_script( 'webcomic-showcase', self::$url . '-/js/admin-showcase.js' );
@@ -528,7 +530,8 @@ public function admin_enqueue_scripts() {
}
}
- /** Add donate link and uninstallation reminder.
+ /**
+ * Add donate link and uninstallation reminder.
*
* @param array $meta Array of metadata.
* @param array $file Plugin basename.
@@ -554,7 +557,8 @@ public function plugin_row_meta( $meta, $file, $data ) {
return $meta;
}
- /** Add quick links to the general settings page and official support.
+ /**
+ * Add quick links to the general settings page and official support.
*
* @param array $actions Array of actions.
* @param array $file Plugin basename.
@@ -572,7 +576,8 @@ public function plugin_action_links( $actions, $file, $data, $context ) {
return $actions;
}
- /** Save collection data as posts, categories, and tags.
+ /**
+ * Save collection data as posts, categories, and tags.
*
* @param string $collection ID of the collection to save.
*/
@@ -632,7 +637,8 @@ public static function save_collection( $collection ) {
}
}
- /** Render the Webcomic Showcase dashboard widget.
+ /**
+ * Render the Webcomic Showcase dashboard widget.
*
* @uses Webcomic::$config
* @uses Webcomic::api_request()
@@ -682,7 +688,9 @@ public function widget_showcase() {
}
}
- /** Render the Webcomic Showcase dashboard widget configuration form. */
+ /**
+ * Render the Webcomic Showcase dashboard widget configuration form.
+ */
public function widget_showcase_config() {
$options = get_option( 'dashboard_widget_options' );
@@ -762,7 +770,8 @@ public function widget_showcase_config() {
<?php
}
- /** Save administrative notifications.
+ /**
+ * Save administrative notifications.
*
* @param string $message The message to display.
* @param string $type The type of message, one of 'notice' or 'error'.
View
@@ -1,15 +1,18 @@
<?php
-/** Contains the WebcomicCommerce class.
+/**
+ * Contains the WebcomicCommerce class.
*
* @package Webcomic
*/
-/** Handle the IPN log tool.
+/**
+ * Handle the IPN log tool.
*
* @package Webcomic
*/
class WebcomicCommerce extends Webcomic {
- /** Register hooks.
+ /**
+ * Register hooks.
*
* @uses WebcomicCommerce::admin_init()
* @uses WebcomicCommerce::admin_menu()
@@ -19,7 +22,8 @@ public function __construct() {
add_action( 'admin_menu', array( $this, 'admin_menu' ) );
}
- /** Empty the current ipn log file.
+ /**
+ * Empty the current ipn log file.
*
* @uses Webcomic::$dir
* @hook admin_init
@@ -32,7 +36,8 @@ public function admin_init() {
}
}
- /** Register submenu page for ipn log viewer.
+ /**
+ * Register submenu page for ipn log viewer.
*
* @uses WebcomicCommerce::page()
* @hook admin_menu
@@ -41,7 +46,8 @@ public function admin_menu() {
add_submenu_page( 'tools.php', __( 'Webcomic Commerce', 'webcomic' ), __( 'Webcomic Commerce', 'webcomic' ), 'manage_options', 'webcomic-commerce', array( $this, 'page' ) );
}
- /** Render the commerce tool page. */
+ /**
+ * Render the commerce tool page. */
public function page() {
$transactions = get_posts( array( 'post_type' => 'webcomic_commerce', 'numberposts' => -1, 'post_status' => 'any' ) );
?>
Oops, something went wrong.

0 comments on commit 17b1534

Please sign in to comment.