Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Mindless refactoring.

Actually, it’s so the inline docs read as actual inline docs.
  • Loading branch information...
commit 17b15347487518cf49ed56ae5903477cf5e341d5 1 parent 98026e8
Michael Sisk authored
View
57 -/php/admin.php
@@ -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
18 -/php/commerce.php
@@ -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' ) );
?>
View
201 -/php/config.php
@@ -1,22 +1,26 @@
<?php
-/** Contains the WebcomicConfig class.
+/**
+ * Contains the WebcomicConfig class.
*
* @package Webcomic
*/
-/** Handle configuration tasks.
+/**
+ * Handle configuration tasks.
*
* @package Webcomic
*/
class WebcomicConfig extends Webcomic {
- /** Stores Webcomic Network data.
+ /**
+ * Stores Webcomic Network data.
* @var array
*/
private static $network = array(
'showcase' => array()
);
- /** Register hooks.
+ /**
+ * Register hooks.
*
* @uses WebcomicConfig::admin_init()
* @uses WebcomicConfig::save_sizes()
@@ -31,7 +35,8 @@ public function __construct() {
add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
}
- /** Regester settings via the Settings API.
+ /**
+ * Regester settings via the Settings API.
*
* Registers the 'webcomic' setting (an array that stores all of the
* plugin's configuration data), adds setting sections and fields for
@@ -170,7 +175,8 @@ public function admin_init() {
}
}
- /** Update size information when media options are saved.
+ /**
+ * Update size information when media options are saved.
*
* @uses Webcomic::$config
* @hook admin_init
@@ -211,7 +217,8 @@ public function save_sizes() {
}
}
- /** Register submenu settings pages.
+ /**
+ * Register submenu settings pages.
*
* @uses Webcomic::$config
* @uses WebcomicConfig::page()
@@ -226,7 +233,8 @@ public function admin_menu() {
}
}
- /** Validate the API key and load Network data.
+ /**
+ * Validate the API key and load Network data.
*
* @uses Webcomic::$config
* @uses Webcomic::api_request()
@@ -264,7 +272,8 @@ public function get_network() {
}
}
- /** Register and enqueue settings scripts.
+ /**
+ * Register and enqueue settings scripts.
*
* @uses Webcomic::$url
* @hook admin_enqueue_scripts
@@ -279,7 +288,8 @@ public function admin_enqueue_scripts() {
}
}
- /** Render the Network setting
+ /**
+ * Render the Network setting
*
* @uses Webcomic::$config
*/
@@ -289,7 +299,8 @@ public function network() {
<?php
}
- /** Render the Integrate setting.
+ /**
+ * Render the Integrate setting.
*
* @uses Webcomic::$config
*/
@@ -299,7 +310,8 @@ public function integrate() {
<?php
}
- /** Render the Navigate settings.
+ /**
+ * Render the Navigate settings.
*
* @uses Webcomic::$config
*/
@@ -311,7 +323,8 @@ public function navigate() {
<?php
}
- /** Render the Uninstall setting.
+ /**
+ * Render the Uninstall setting.
*
* @uses Webcomic::$config
*/
@@ -323,7 +336,8 @@ public function uninstall() {
<?php
}
- /** Render the Collections setting section.
+ /**
+ * Render the Collections setting section.
*
* @uses Webcomic::$config
*/
@@ -382,7 +396,8 @@ public function collections() {
<?php
}
- /** Render the Additional Sizes settings section.
+ /**
+ * Render the Additional Sizes settings section.
*
* @uses Webcomic::$config
*/
@@ -446,7 +461,8 @@ public function sizes() {
<?php
}
- /** Render the Network > Key setting.
+ /**
+ * Render the Network > Key setting.
*
* @uses Webcomic::$config
*/
@@ -466,7 +482,8 @@ public function network_key() {
}
}
- /** Render the Network > Showcase > Activate setting.
+ /**
+ * Render the Network > Showcase > Activate setting.
*
* @uses Webcomic::$config
*/
@@ -476,7 +493,8 @@ public function network_showcase() {
<?php
}
- /** Render the Network > Showcase > Name setting.
+ /**
+ * Render the Network > Showcase > Name setting.
*
* @uses WebcomicConfig::$network
*/
@@ -487,7 +505,8 @@ public function network_showcase_name() {
<?php
}
- /** Render the Network > Showcase > URL setting.
+ /**
+ * Render the Network > Showcase > URL setting.
*
* @uses WebcomicConfig::$network
*/
@@ -498,7 +517,8 @@ public function network_showcase_url() {
<?php
}
- /** Render the Network > Showcase > Creators setting.
+ /**
+ * Render the Network > Showcase > Creators setting.
*
* @uses WebcomicConfig::$network
*/
@@ -510,7 +530,8 @@ public function network_showcase_creators() {
<?php
}
- /** Render the Network > Showcase > Description setting.
+ /**
+ * Render the Network > Showcase > Description setting.
*
* @uses WebcomicConfig::$network
*/
@@ -521,7 +542,8 @@ public function network_showcase_description() {
<?php
}
- /** Render the Network > Showcase > Rating setting.
+ /**
+ * Render the Network > Showcase > Rating setting.
*
* @uses WebcomicConfig::$network
*/
@@ -543,7 +565,8 @@ public function network_showcase_rating() {
<?php
}
- /** Render the Network > Showcase > Rating setting.
+ /**
+ * Render the Network > Showcase > Rating setting.
*
* @uses WebcomicConfig::$network
*/
@@ -585,7 +608,8 @@ public function network_showcase_genre() {
<?php
}
- /** Render the Network > Showcase > Image setting.
+ /**
+ * Render the Network > Showcase > Image setting.
*
* @uses WebcomicConfig::$network
* @uses WebcomicConfig::ajax_showcase_image()
@@ -597,7 +621,8 @@ public function network_showcase_image() {
<?php
}
- /** Render the Network > Showcase > Testimonial setting.
+ /**
+ * Render the Network > Showcase > Testimonial setting.
*
* @uses WebcomicConfig::$network
*/
@@ -608,7 +633,8 @@ public function network_showcase_testimonial() {
<?php
}
- /** Render the Name setting.
+ /**
+ * Render the Name setting.
*
* @uses Webcomic::$config
*/
@@ -619,7 +645,8 @@ public function collection_name() {
<?php
}
- /** Render the Slug setting.
+ /**
+ * Render the Slug setting.
*
* @uses Webcomic::$config
*/
@@ -630,7 +657,8 @@ public function collection_slug() {
<?php
}
- /** Render the Description setting.
+ /**
+ * Render the Description setting.
*
* @uses Webcomic::$config
*/
@@ -641,7 +669,8 @@ public function collection_description() {
<?php
}
- /** Render the Cover setting.
+ /**
+ * Render the Cover setting.
*
* @uses Webcomic::$config
* @uses WebcomicConfig::ajax_collection_image()
@@ -653,7 +682,8 @@ public function collection_image() {
<?php
}
- /** Render the Theme setting.
+ /**
+ * Render the Theme setting.
*
* @uses Webcomic::$config
*/
@@ -671,7 +701,8 @@ public function collection_theme() {
<?php
}
- /** Render the Feeds setting.
+ /**
+ * Render the Feeds setting.
*
* @uses Webcomic::$config
*/
@@ -690,7 +721,8 @@ public function collection_feeds() {
<?php
}
- /** Render the Buffer setting.
+ /**
+ * Render the Buffer setting.
*
* @uses Webcomic::$config
*/
@@ -704,7 +736,8 @@ public function collection_buffer() {
);
}
- /** Render the Transcripts setting.
+ /**
+ * Render the Transcripts setting.
*
* @uses Webcomic::$config
*/
@@ -714,7 +747,8 @@ public function collection_transcripts_default() {
<?php
}
- /** Render the Transcripts setting.
+ /**
+ * Render the Transcripts setting.
*
* @uses Webcomic::$config
*/
@@ -727,7 +761,8 @@ public function collection_transcripts_permission() {
</select>' ), '</label>';
}
- /** Render the Transcripts setting.
+ /**
+ * Render the Transcripts setting.
*
* @uses Webcomic::$config
*/
@@ -740,7 +775,8 @@ public function collection_transcripts_notify() {
);
}
- /** Render the Transcripts > Languages setting.
+ /**
+ * Render the Transcripts > Languages setting.
*
* @uses Webcomic::$config
*/
@@ -763,7 +799,8 @@ public function collection_transcripts_languages() {
<?php
}
- /** Render the Commerce > Business Email setting.
+ /**
+ * Render the Commerce > Business Email setting.
*
* @uses Webcomic::$config
*/
@@ -775,7 +812,8 @@ public function collection_commerce_business() {
<?php
}
- /** Render the Commerce > Default webcomic settings setting.
+ /**
+ * Render the Commerce > Default webcomic settings setting.
*
* @uses Webcomic::$config
*/
@@ -786,7 +824,8 @@ public function collection_commerce_prints() {
<?php
}
- /** Render the Commerce > Sales setting.
+ /**
+ * Render the Commerce > Sales setting.
* @uses Webcomic::$config
*/
public function collection_commerce_sales() {
@@ -804,7 +843,8 @@ public function collection_commerce_sales() {
<?php
}
- /** Render the Commerce > Prices setting.
+ /**
+ * Render the Commerce > Prices setting.
*
* @uses Webcomic::$config
*/
@@ -827,7 +867,8 @@ public function collection_commerce_prices() {
<?php
}
- /** Render the Commerce > Shipping setting.
+ /**
+ * Render the Commerce > Shipping setting.
*
* @uses Webcomic::$config
*/
@@ -850,7 +891,8 @@ public function collection_commerce_shipping() {
<?php
}
- /** Render the Commerce > Donation setting.
+ /**
+ * Render the Commerce > Donation setting.
*
* @uses Webcomic::$config
*/
@@ -861,7 +903,8 @@ public function collection_commerce_donation() {
<?php
}
- /** Render the Commerce > Currencey setting.
+ /**
+ * Render the Commerce > Currencey setting.
*
* @uses Webcomic::$config
*/
@@ -906,7 +949,8 @@ public function collection_commerce_currency() {
<?php
}
- /** Render the Access > Age setting.
+ /**
+ * Render the Access > Age setting.
*
* @uses Webcomic::$config
*/
@@ -923,7 +967,8 @@ public function collection_access_age() {
<?php
}
- /** Render the Access > Role setting.
+ /**
+ * Render the Access > Role setting.
*
* @uses Webcomic::$config
*/
@@ -948,7 +993,8 @@ public function collection_access_roles() {
<?php
}
- /** Render the Posts > Content settings.
+ /**
+ * Render the Posts > Content settings.
*
* @uses Webcomic::$config
*/
@@ -961,7 +1007,8 @@ public function collection_supports_content() {
<?php
}
- /** Render the Posts > Discussion settings.
+ /**
+ * Render the Posts > Discussion settings.
*
* @uses Webcomic::$config
*/
@@ -972,7 +1019,8 @@ public function collection_supports_discussion() {
<?php
}
- /** Render the Posts > Miscellanea settings.
+ /**
+ * Render the Posts > Miscellanea settings.
*
* @uses Webcomic::$config
*/
@@ -984,7 +1032,8 @@ public function collection_supports_miscellanea() {
<?php
}
- /** Render the Posts > Taxonomies settings.
+ /**
+ * Render the Posts > Taxonomies settings.
*
* @uses Webcomic::$config
*/
@@ -1002,7 +1051,8 @@ public function collection_supports_taxonomies() {
}
}
- /** Render the Slug > Archive setting.
+ /**
+ * Render the Slug > Archive setting.
*
* @uses Webcomic::$config
*/
@@ -1015,7 +1065,8 @@ public function collection_slugs_archive() {
<?php
}
- /** Render the Slug > Webcomics setting.
+ /**
+ * Render the Slug > Webcomics setting.
*
* @uses Webcomic::$config
*/
@@ -1028,7 +1079,8 @@ public function collection_slugs_webcomic() {
<?php
}
- /** Render the Slugs > Storylines setting.
+ /**
+ * Render the Slugs > Storylines setting.
*
* @uses Webcomic::$config
*/
@@ -1041,7 +1093,8 @@ public function collection_slugs_storyline() {
<?php
}
- /** Render the Slugs > Characters setting.
+ /**
+ * Render the Slugs > Characters setting.
*
* @uses Webcomic::$config
*/
@@ -1054,7 +1107,8 @@ public function collection_slugs_character() {
<?php
}
- /** Render Twitter > Authorized Account
+ /**
+ * Render Twitter > Authorized Account
*
* @uses Webcomic::$config
* @uses WebcomicConfig::ajax_twitter_account()
@@ -1063,7 +1117,8 @@ public function collection_twitter_account() {
echo '<div id="webcomic_twitter_account">', self::ajax_twitter_account( self::$config[ 'collections' ][ $_GET[ 'post_type' ] ][ 'twitter' ][ 'consumer_key' ], self::$config[ 'collections' ][ $_GET[ 'post_type' ] ][ 'twitter' ][ 'consumer_secret' ], $_GET[ 'post_type' ] ), '</div>';
}
- /** Render Twitter > Consumer Key
+ /**
+ * Render Twitter > Consumer Key
*
* @uses Webcomic::$config
*/
@@ -1073,7 +1128,8 @@ public function collection_twitter_consumer_key() {
<?php
}
- /** Render Twitter > Consumer Secret
+ /**
+ * Render Twitter > Consumer Secret
*
* @uses Webcomic::$config
*/
@@ -1083,7 +1139,8 @@ public function collection_twitter_consumer_secret() {
<?php
}
- /** Render Twitter > Format
+ /**
+ * Render Twitter > Format
*
* @uses Webcomic::$config
*/
@@ -1093,7 +1150,8 @@ public function collection_twitter_format() {
<?php
}
- /** Render Twitter > Media
+ /**
+ * Render Twitter > Media
*
* @uses Webcomic::$config
*/
@@ -1103,7 +1161,8 @@ public function collection_twitter_media() {
<?php
}
- /** Save callback for the webcomic option.
+ /**
+ * Save callback for the webcomic option.
*
* If 'webcomic_general' is set we're working on the general
* settings page.
@@ -1408,7 +1467,8 @@ public function save( $options ) {
return ( isset( $_POST[ 'webcomic_general' ] ) or isset( $_POST[ 'webcomic_network' ] ) or isset( $_POST[ 'webcomic_collection' ] ) ) ? self::$config : $options;
}
- /** Render a settings page.
+ /**
+ * Render a settings page.
*
* @uses Webcomic::$config
* @uses Webcomic::$version
@@ -1440,7 +1500,8 @@ public function page() {
<?php
}
- /** Render the showcase page.
+ /**
+ * Render the showcase page.
*
* @uses Webcomic::$config
* @uses Webcomic::$version
@@ -1465,7 +1526,8 @@ public function page_network() {
<?php
}
- /** Generic settings section callback.
+ /**
+ * Generic settings section callback.
*
* Most sections don't include a description, but if permalinks are
* set to Default we need to warn users that the permalink URL's
@@ -1477,7 +1539,8 @@ public function section( $args ) {
}
}
- /** Handle showcase image updating.
+ /**
+ * Handle showcase image updating.
*
* @param integer $id ID of the selected image.
*/
@@ -1516,7 +1579,8 @@ public static function ajax_showcase_image( $id ) {
}
}
- /** Handle collection poster image updating.
+ /**
+ * Handle collection poster image updating.
*
* @param integer $id ID of the selected image.
*/
@@ -1532,7 +1596,8 @@ public static function ajax_collection_image( $id ) {
}
}
- /** Handle dynamic slug previews.
+ /**
+ * Handle dynamic slug previews.
*
* @param string $slug New slug.
* @param string $preview ID of the element theupdated slug will be loaded into for preview.
@@ -1560,7 +1625,8 @@ public static function ajax_slug_preview( $slug, $preview, $collection ) {
) );
}
- /** Handle dynamic commerce defaults.
+ /**
+ * Handle dynamic commerce defaults.
*
* @param string $email Email to validate.
*/
@@ -1568,7 +1634,8 @@ public static function ajax_commerce_defaults( $email ) {
echo json_encode( array( 'clear' => filter_var( $email, FILTER_VALIDATE_EMAIL ) ) );
}
- /** Handle dynamic Twitter authorization updates.
+ /**
+ * Handle dynamic Twitter authorization updates.
*
* @param string $consumer_key Twitter application consumer key.
* @param string $consumer_secret Twitter application consumer secret.
View
147 -/php/help.php
@@ -1,15 +1,18 @@
<?php
-/** Contains the WebcomicHelp class.
+/**
+ * Contains the WebcomicHelp class.
*
* @package Webcomic
*/
-/** Provide contextual assistance.
+/**
+ * Provide contextual assistance.
*
* @package Webcomic
*/
class WebcomicHelp extends Webcomic {
- /** Add contextual help information.
+ /**
+ * Add contextual help information.
*
* @param object $screen Current screen object.
* @uses WebcomicHelp::sidebar()
@@ -338,7 +341,8 @@ public function __construct( $screen ) {
}
}
- /** Return help sidebar.
+ /**
+ * Return help sidebar.
*
* @return string
*/
@@ -353,7 +357,8 @@ private function sidebar() {
<p><a href="support@webcomic.nu">' . __( 'Email Support', 'webcomic' ) . '</a></p>';
}
- /** Return Webcomic Showcase widget help.
+ /**
+ * Return Webcomic Showcase widget help.
*
* @return string
*/
@@ -362,7 +367,8 @@ private function dashboard_showcase() {
<p>' . sprintf( __( 'The <b>Webcomic Showcase</b> highlights other Webcomic-powered sites that have opted to share their information via the showcase. To view the showcase you must have a Webcomic Network API key, which requires <a href="%s">joining the Webcomic Network</a>. After you have joined the network you may optionally list your site in the showcase. You can configure how may and what kinds of sites appear in the showcase using the <b>Configure</b> link in the widget title.', 'webcomic' ), add_query_arg( array( 'page' => 'webcomic-network' ), admin_url( 'options.php' ) ) ) . '</p>';
}
- /** Return webcomic attacher overview help.
+ /**
+ * Return webcomic attacher overview help.
*
* @return string
*/
@@ -381,7 +387,8 @@ private function attacher_overview() {
<p>' . __( "When you're ready click <b>Attach Media</b> to attach selected media to their matched post.", 'webcomic' ) . '</p>';
}
- /** Return webcomic generator overview help.
+ /**
+ * Return webcomic generator overview help.
*
* @return string
*/
@@ -397,7 +404,8 @@ private function generator_overview() {
<p>' . __( 'Webcomics created by the generator will use the image filename for the webcomic title.', 'webcomic' ) . '</p>';
}
- /** Return term order overview help.
+ /**
+ * Return term order overview help.
*
* @return string
*/
@@ -405,7 +413,8 @@ private function term_order_overview() {
return '<p>' . __( 'From here you can change the sorting order of your terms. Drag and drop the terms on the right to change their order. When everything looks good click <b>Save Changes</b>.', 'webcomic' ) . '</p>';
}
- /** Return transcript overview help.
+ /**
+ * Return transcript overview help.
*
* @return string
*/
@@ -413,7 +422,8 @@ private function transcripts_overview() {
return '<p>' . __( 'This screen provides access to all of your webcomic transcripts. You can customize the display of this screen to suit your workflow.', 'webcomic' ) . '</p>';
}
- /** Return transcript screen help.
+ /**
+ * Return transcript screen help.
*
* @return string
*/
@@ -428,7 +438,8 @@ private function transcripts_screen() {
</ul>';
}
- /** Return transcript actions help.
+ /**
+ * Return transcript actions help.
*
* @return string
*/
@@ -442,7 +453,8 @@ private function transcripts_actions() {
</ul>';
}
- /** Return transcript bulk help.
+ /**
+ * Return transcript bulk help.
*
* @return string
*/
@@ -452,7 +464,8 @@ private function transcripts_bulk() {
<p>' . __( 'When using Bulk Edit, you can change the metadata (languages, author, etc.) for all selected transcripts at once. To remove a transcript from the grouping, just click the x next to its name in the Bulk Edit area that appears.', 'webcomic' ) . '</p>';
}
- /** Return transcript customize help.
+ /**
+ * Return transcript customize help.
*
* @return string
*/
@@ -460,7 +473,8 @@ private function edit_transcript_customize() {
return '<p>' . __( 'The title field and the big Transcript Editing Area are fixed in place, but you can reposition all the other boxes using drag and drop, and can minimize or expand them by clicking the title bar of each box. Use the Screen Options tab to unhide more boxes (Slug, Author, Revisions) or to choose a 1- or 2-column layout for this screen.', 'webcomic' ) . '</p>';
}
- /** Return transcript editor help.
+ /**
+ * Return transcript editor help.
*
* @return string
*/
@@ -468,7 +482,8 @@ private function edit_transcript_editor() {
return '<p>' . __( 'Enter the text for your transcript. There are two modes of editing: Visual and HTML. Choose the mode by clicking on the appropriate tab. Visual mode gives you a WYSIWYG editor. Click the last icon in the row to get a second row of controls. The HTML mode allows you to enter raw HTML along with your transcript text. You can insert media files by clicking the icons above the transcript editor and following the directions. You can go to the distraction-free writing screen via the Fullscreen icon in Visual mode (second to last in the top row) or the Fullscreen button in HTML mode (last in the row). Once there, you can make buttons visible by hovering over the top area. Exit Fullscreen back to the regular transcript editor.', 'webcomic' ) . '</p>';
}
- /** Return transcript publish help.
+ /**
+ * Return transcript publish help.
*
* @return string
*/
@@ -476,7 +491,8 @@ private function edit_transcript_publish() {
return '<p>' . __( 'You can set the terms of publishing your transcript in the Publish box. For Status, Visibility, and Publish (immediately), click on the Edit link to reveal more options. Visibility includes options for password-protecting a transcript. Publish (immediately) allows you to set a future or past date and time, so you can schedule a transcript to be published in the future or backdate a transcript.', 'webcomic' ) . '</p>';
}
- /** Return transcript parent help.
+ /**
+ * Return transcript parent help.
*
* @return string
*/
@@ -484,7 +500,8 @@ private function edit_transcript_parent() {
return '<p>' . __( 'You can set the webcomic your transcript is related to in the Parent Webcomic box. First select the collection the webcomic belgons to, then the webcomic in that collection your transcript is related to. Any attached imagery will be loaded so you can view the webcomic as you write your transcript.', 'webcomic' ) . '</p>';
}
- /** Return transcript authors help.
+ /**
+ * Return transcript authors help.
*
* @return string
*/
@@ -492,7 +509,8 @@ private function edit_transcript_authors() {
return '<p>' . __( 'Identified but unregistered users that submit or improve a transcript will be listed in the Transcript Authors box. These additional authors may be displayed alongside (or instead of) the registered author to provide appropriate transcription credit on your site. Authors may be removed by checking the box next to their name and saving the transcript. Additional authors may be added by clicking the <b>Add Author</b> button and filling in the authors name; email, url, IP address, and transcription date are optional.', 'webcomic' ) . '</p>';
}
- /** Return webcomic overview help.
+ /**
+ * Return webcomic overview help.
*
* @param object $screen Current screen object.
* @return string
@@ -502,7 +520,8 @@ private function webcomics_overview( $screen ) {
return '<p>' . sprintf( __( 'This screen provides access to all of your %s webcomics. You can customize the display of this screen to suit your workflow.', 'webcomic' ), self::$config[ 'collections' ][ $screen->post_type ][ 'name' ] ) . '</p>';
}
- /** Return webcomic screen help.
+ /**
+ * Return webcomic screen help.
*
* @return string
*/
@@ -517,7 +536,8 @@ private function webcomics_screen() {
</ul>';
}
- /** Return webcomic actions help.
+ /**
+ * Return webcomic actions help.
*
* @return string
*/
@@ -532,7 +552,8 @@ private function webcomics_actions() {
</ul>';
}
- /** Return webcomic bulk help.
+ /**
+ * Return webcomic bulk help.
*
* @return string
*/
@@ -542,7 +563,8 @@ private function webcomics_bulk() {
<p>' . __( 'When using Bulk Edit, you can change the metadata (storylines, author, etc.) for all selected webcomics at once. To remove a webcomic from the grouping, just click the x next to its name in the Bulk Edit area that appears.', 'webcomic' ) . '</p>';
}
- /** Return webcomic customize help.
+ /**
+ * Return webcomic customize help.
*
* @return string
*/
@@ -550,7 +572,8 @@ private function edit_webcomic_customize() {
return '<p>' . __( 'The title field and the big Webcomic Editing Area are fixed in place, but you can reposition all the other boxes using drag and drop, and can minimize or expand them by clicking the title bar of each box. Use the Screen Options tab to unhide more boxes (Excerpt, Send Trackbacks, Custom Fields, Discussion, Slug, Author) or to choose a 1- or 2-column layout for this screen.', 'webcomic' ) . '</p>';
}
- /** Return webcomic media help.
+ /**
+ * Return webcomic media help.
*
* @return string
*/
@@ -560,7 +583,8 @@ private function edit_webcomic_media() {
<p>' . __( "Once one or more images have been attached to a webcomic you can view them in the <b>Webcomic Media</b> tab in the media popup. From here you can rearrange the images to change the order Webcomic will display them in, regenerate the alternate image sizes (useful if you've updated the dimensions for your thumbnail, medium, or large images or added new alternate sizes), or detach them from the current webcomic.", 'webcomic' ) . '</p>';
}
- /** Return webcomic editor help.
+ /**
+ * Return webcomic editor help.
*
* @return string
*/
@@ -570,7 +594,8 @@ private function edit_webcomic_editor() {
<p>' . __( '<b>Post Editor</b> - Enter any accompanying text for your webcomic. There are two modes of editing: Visual and HTML. Choose the mode by clicking on the appropriate tab. Visual mode gives you a WYSIWYG editor. Click the last icon in the row to get a second row of controls. The HTML mode allows you to enter raw HTML along with your webcomic text. You can go to the distraction-free writing screen via the Fullscreen icon in Visual mode (second to last in the top row) or the Fullscreen button in HTML mode (last in the row). Once there, you can make buttons visible by hovering over the top area. Exit Fullscreen back to the regular webcomic editor.', 'webcomic' ) . '</p>';
}
- /** Return webcomic publish help.
+ /**
+ * Return webcomic publish help.
*
* @return string
*/
@@ -578,7 +603,8 @@ private function edit_webcomic_publish() {
return '<p>' . __( '<b>Publish</b> - You can set the terms of publishing your webcomic in the Publish box. For Status, Visibility, and Publish (immediately), click on the Edit link to reveal more options. Visibility includes options for password-protecting a webcomic. Publish (immediately) allows you to set a future or past date and time, so you can schedule a webcomic to be published in the future or backdate a webcomic.', 'webcomic' ) . '</p>';
}
- /** Return webcomic commerce help.
+ /**
+ * Return webcomic commerce help.
*
* @return string
*/
@@ -588,7 +614,8 @@ private function edit_webcomic_commerce() {
<p>' . __( 'The table in the commerce box displays the default prices and shipping for domestic, international, and original prints, as well as the total cost of each. You can adjust these prices by setting a premium or discount, and the total will adjust to show what the new price will be when you update the webcomic. Uncheck the <b>Original</b> print option if the original print (for traditional media webcomics) has been sold or is otherwise unavailable.', 'webcomic' ) . '</p>';
}
- /** Return webcomic transcripts help.
+ /**
+ * Return webcomic transcripts help.
*
* @return string
*/
@@ -598,7 +625,8 @@ private function edit_webcomic_transcripts() {
<p>' . __( 'The list in the transcripts box displays the transcripts submitted for this webcomic, along with the transcript status, who it was submitted by, when it was submitted, what languages it contains, and a preview of the transcript. Click a transcript title to edit that transcript.', 'webcomic' ) . '</p>';
}
- /** Return webcomic discussion help.
+ /**
+ * Return webcomic discussion help.
*
* @return string
*/
@@ -608,7 +636,8 @@ private function edit_webcomic_discussion() {
<p>' . __( '<b>Discussion</b> - You can turn comments and pings on or off, and if there are comments on the webcomic, you can see them here and moderate them.', 'webcomic' ) . '</p>';
}
- /** Return storyline overview help.
+ /**
+ * Return storyline overview help.
*
* @return string
*/
@@ -618,7 +647,8 @@ private function storylines_overview( $screen ) {
return '<p>' . sprintf( __( 'You can organize your webcomics into story arcs using <b>storylines</b>. Click <b>Sort %s</b> to reorganize storylines.', 'webcomic' ), $taxonomy->label ) . '</p>';
}
- /** Return storyline adding help.
+ /**
+ * Return storyline adding help.
*
* @return string
*/
@@ -635,7 +665,8 @@ private function storylines_adding() {
<p>' . __( 'You can change the display of this screen using the Screen Options tab to set how many items are displayed per screen and to display/hide columns in the table.', 'webcomic' ) . '</p>';
}
- /** Return characters overview help.
+ /**
+ * Return characters overview help.
*
* @return string
*/
@@ -643,7 +674,8 @@ private function characters_overview() {
return '<p>' . __( 'You can specify the characrters that appear in your webcomics using <b>characters</b>.', 'webcomic' ) . '</p>';
}
- /** Return characters adding help.
+ /**
+ * Return characters adding help.
*
* @return string
*/
@@ -659,7 +691,8 @@ private function characters_adding() {
<p>' . __( 'You can change the display of this screen using the Screen Options tab to set how many items are displayed per screen and to display/hide columns in the table.', 'webcomic' ) . '</p>';
}
- /** Return languages overview help.
+ /**
+ * Return languages overview help.
*
* @return string
*/
@@ -667,7 +700,8 @@ private function languages_overview() {
return '<p>' . __( 'You can specify the language used in your webcomic transcripts using <b>languages</b>.', 'webcomic' ) . '</p>';
}
- /** Return languages adding help.
+ /**
+ * Return languages adding help.
*
* @return string
*/
@@ -682,7 +716,8 @@ private function languages_adding() {
<p>' . __( 'You can change the display of this screen using the Screen Options tab to set how many items are displayed per screen and to display/hide columns in the table.', 'webcomic' ) . '</p>';
}
- /** Return collection general settings help.
+ /**
+ * Return collection general settings help.
*
* @return string
*/
@@ -700,7 +735,8 @@ private function collection_settings_general() {
</ul>';
}
- /** Return collection general settings help.
+ /**
+ * Return collection general settings help.
*
* @return string
*/
@@ -715,7 +751,8 @@ private function collection_settings_transcripts() {
</ul>';
}
- /** Return collection commerce settings help.
+ /**
+ * Return collection commerce settings help.
*
* @return string
*/
@@ -733,7 +770,8 @@ private function collection_settings_commerce() {
</ul>';
}
- /** Return collection access settings help.
+ /**
+ * Return collection access settings help.
*
* @return string
*/
@@ -746,7 +784,8 @@ private function collection_settings_access() {
</ul>';
}
- /** Return collection post settings help.
+ /**
+ * Return collection post settings help.
*
* @return string
*/
@@ -755,7 +794,8 @@ private function collection_settings_posts() {
<p>' . __( "These settings control some of the basic features of your webcomic posts. Disabling a feature will completely remove it's associated box from the Add New Webcomic and Edit Webcomic screens. When titles are disabled Webcomic will automatically set the title of new webcomics to their post ID. Featured images require an active theme with featured image support.", 'webcomic' ) . '</p>';
}
- /** Return collection permalink settings help.
+ /**
+ * Return collection permalink settings help.
*
* @param object $screen Current screen object.
* @return string
@@ -766,7 +806,8 @@ private function collection_settings_permalinks( $screen ) {
<p>' . sprintf( __( 'Be careful when modifying permalinks: incorrect settings may result in broken pages. <a href="%s" target="_blank">Read more about permalinks at the WordPress Codex &raquo;</a>', 'webcomic' ), '//codex.wordpress.org/Using_Permalinks' ) . '</p>';
}
- /** Return collection twitter settings help.
+ /**
+ * Return collection twitter settings help.
*
* @param object $screen Current screen object.
* @return string
@@ -796,7 +837,8 @@ private function collection_settings_twitter( $screen ) {
' . $cards;
}
- /** Return collection general settings help.
+ /**
+ * Return collection general settings help.
*
* @return string
*/
@@ -811,7 +853,8 @@ private function settings_general() {
</ul>';
}
- /** Return collection settings help.
+ /**
+ * Return collection settings help.
*
* @return string
*/
@@ -821,7 +864,8 @@ private function settings_collections() {
<p>' . __( 'To delete a collection, check the box next to it and select either <b>Delete Permanently</b> or <b>Delete and Save</b> from the Bulk Actions dropdown at the bottom of the list. If <b>Delete and Save</b> is selected the checked collections will have their webcomics and transcripts converted into posts, storylines converted into categories, and characters converted into tags before being deleted.', 'webcomic' ) . '</p>';
}
- /** Return general network settings help.
+ /**
+ * Return general network settings help.
*
* @return string
*/
@@ -831,7 +875,8 @@ private function network_overview() {
: '<p>' . sprintf( __( 'Your use of the Webcomic Network is governed by the <a href="%s">Webcomic Network Terms of Service</a>', 'webcomic' ), 'http://webcomic.nu/legal' ) . '</p>';
}
- /** Return general network settings help.
+ /**
+ * Return general network settings help.
*
* @return string
*/
@@ -851,7 +896,8 @@ private function network_settings_showcase() {
<p>' . __( "Some additional data is sent with your showcase entry, including the version of Webcomic you're using and information about your sites theme (name, url, author, and author url) and template (if you're using a child theme).", 'webcomic' ) . '</p>';
}
- /** Return additional sizes help.
+ /**
+ * Return additional sizes help.
*
* @return string
*/
@@ -866,7 +912,8 @@ private function media_sizes() {
<p>' . __( 'Sizes may be adjusted by editing the width, height, and crop of the size within the list and clicking <b>Save Changes</b>. Sizes my be deleted by checking the box next to one or more sizes name, selecting <b>Delete</b> from the Bulk Actions dropdown below the list, and clicking <b>Save Changes</b>. Sizes added outside of this section cannot be edited, but are listed for informational purposes.', 'webcomic' ) . '</p>';
}
- /** Return commerce overview help.
+ /**
+ * Return commerce overview help.
*
* @return string
*/
@@ -882,7 +929,8 @@ private function commerce_overview() {
<p>' . __( 'Webcomic records this data for informational purposes only, such as noting transaction errors (which will appear as bold red entries in the list). Similar information should be available through your PayPal account. You may remove all of the IPN data Webcomic has recorded by clicking <b>Empty Log</b> at the bottom of the list.', 'webcomic' ) . '</p>';
}
- /** Return upgrade webcomic help.
+ /**
+ * Return upgrade webcomic help.
*
* @return string
*/
@@ -897,7 +945,8 @@ private function legacy_overview() {
</ol>';
}
- /** Return additional page collection help.
+ /**
+ * Return additional page collection help.
*
* @return string
*/
View
51 -/php/legacy.php
@@ -1,20 +1,24 @@
<?php
-/** Contains the WebcomicLegacy class.
+/**
+ * Contains the WebcomicLegacy class.
*
* @package Webcomic
*/
-/** Upgrade legacy Webcomic installations.
+/**
+ * Upgrade legacy Webcomic installations.
*
* @package Webcomic
*/
class WebcomicLegacy extends Webcomic {
- /** Stores the maximum safe script execution time.
+ /**
+ * Stores the maximum safe script execution time.
* @var integer
*/
private $limit;
- /** Register action and filter hooks.
+ /**
+ * Register action and filter hooks.
*
* Also sets the maximum "safe" script execution time, defined here
* as the `max_execution_time` minus a 10% buffer.
@@ -37,7 +41,8 @@ public function __construct() {
add_action( 'list_term_exclusions', array( $this, 'list_term_exclusions' ), 10, 2 );
}
- /** Register legacy post types and taxonomies.
+ /**
+ * Register legacy post types and taxonomies.
*
* @uses Webcomic::$config
*/
@@ -70,7 +75,8 @@ public function init() {
}
}
- /** Disable or upgrade the plugin.
+ /**
+ * Disable or upgrade the plugin.
*
* @uses Webcomic::$dir
* @uses Webcomic::$config
@@ -120,7 +126,8 @@ public function admin_init() {
}
}
- /** Register submenu page for legacy upgrades.
+ /**
+ * Register submenu page for legacy upgrades.
*
* @uses WebcomicLegacy::page()
* @hook admin_menu
@@ -129,7 +136,8 @@ public function admin_menu() {
add_submenu_page( 'tools.php', sprintf( __( 'Upgrade to %s', 'webcomic' ), 'Webcomic ' . self::$version ), __( 'Upgrade Webcomic', 'webcomic' ), 'manage_options', 'webcomic-upgrader', array( $this, 'page' ) );
}
- /** Render upgrade tool notification.
+ /**
+ * Render upgrade tool notification.
*
* @return null
* @uses Webcomic::$config
@@ -151,7 +159,8 @@ public function admin_notices() {
}
}
- /** Enqueue custom styles for upgrade notice.
+ /**
+ * Enqueue custom styles for upgrade notice.
*
* @uses Webcomic::$url
* @uses Webcomic::$config
@@ -167,7 +176,8 @@ public function admin_enqueue_scripts() {
}
}
- /** Allow retrieving terms by term_group.
+ /**
+ * Allow retrieving terms by term_group.
*
* @param string $exclusions The WHERE clause used by get_terms.
* @param array $args The array of arguments passed to get_terms.
@@ -181,7 +191,8 @@ public function list_terms_exclusions( $exclusions, $args ) {
return $exclusions;
}
- /** Render the upgrade tool page.
+ /**
+ * Render the upgrade tool page.
*
* @uses Webcomic::$config
* @uses Webcomic::$version
@@ -237,7 +248,8 @@ public function page() {
<?php
}
- /** Upgrade Webcomic 1 installations.
+ /**
+ * Upgrade Webcomic 1 installations.
*
* @return integer
* @uses Webcomic::$config
@@ -513,7 +525,8 @@ private function upgrade1( $stage = 0 ) {
return 0;
}
- /** Upgrade Webcomic 2 installations.
+ /**
+ * Upgrade Webcomic 2 installations.
*
* @return integer
* @uses Webcomic::$config
@@ -798,7 +811,8 @@ private function upgrade2( $stage = 0 ) {
return 0;
}
- /** Upgrade Webcomic 3 installations.
+ /**
+ * Upgrade Webcomic 3 installations.
*
* @return integer
* @uses Webcomic::$config
@@ -1140,7 +1154,8 @@ private function upgrade3( $stage = 0 ) {
return 0;
}
- /** Upgrade ComicPress installations.
+ /**
+ * Upgrade ComicPress installations.
*
* @return integer
* @uses Webcomic::$config
@@ -1293,7 +1308,8 @@ private function upgrade_comicpress( $stage = 0 ) {
return 0;
}
- /** Insert legacy Webcomic files into the Media Library.
+ /**
+ * Insert legacy Webcomic files into the Media Library.
*
* @param string $file Absolute path and filename of the file to insert into the Media Library.
* @param mixed $context Context to add to the new file, or the integer ID of the attachment parent.
@@ -1331,7 +1347,8 @@ private function update_media_library( $file, $context = '', $attr = array() ) {
return ( integer ) $attachment_id;
}
- /** Gets the comic file path for legacy installations.
+ /**
+ * Gets the comic file path for legacy installations.
*
* @param string $directory The `comic_directory` option from the legacy configuration.
* @param string $category The category slug for subdirectories, if any.
View
51 -/php/media.php
@@ -1,17 +1,20 @@
<?php
-/** Contains the WebcomicMedia class.
+/**
+ * Contains the WebcomicMedia class.
*
* @todo core.trac.wordpress.org/ticket/16031
*
* @package Webcomic
*/
-/** Handle media-related tasks.
+/**
+ * Handle media-related tasks.
*
* @package Webcomic
*/
class WebcomicMedia extends Webcomic {
- /** Register hooks.
+ /**
+ * Register hooks.
*
* @uses WebcomicMedia::admin_init()
* @uses WebcomicMedia::admin_menu()
@@ -40,7 +43,8 @@ public function __construct() {
add_filter( 'image_size_names_choose', array( $this, 'image_size_names_choose' ), 10, 1 );
}
- /** Handle media functions.
+ /**
+ * Handle media functions.
*
* @uses Webcomic::$config
* @uses WebcomicAdmin::notify()
@@ -231,7 +235,8 @@ public function admin_init() {
}
}
- /** Register Media submenu pages.
+ /**
+ * Register Media submenu pages.
*
* @uses WebcomicMedia::generator()
* @hook admin_menu
@@ -241,7 +246,8 @@ public function admin_menu() {
add_submenu_page( 'upload.php', __( 'Webcomic Generator', 'webcomic' ), __( 'Webcomic Generator', 'webcomic' ), 'upload_files', 'webcomic-generator', array( $this, 'page_generator' ) );
}
- /** Render HTML data for bulk media actions.
+ /**
+ * Render HTML data for bulk media actions.
*
* @hook admin_footer
*/
@@ -253,7 +259,8 @@ public function admin_footer() {
}
}
- /** Manage webcomic media from the modal media manager.
+ /**
+ * Manage webcomic media from the modal media manager.
*
* @hook media_upload_webcomic_media
*/
@@ -273,7 +280,8 @@ public function media_upload_webcomic_media( $output = false ) {
}
}
- /** Unset term attachment info when a media object is deleted.
+ /**
+ * Unset term attachment info when a media object is deleted.
*
* @param integer $id The deleted attachment ID.
* @uses Webcomic::$config
@@ -301,7 +309,8 @@ public function delete_attachment( $id ) {
}
}
- /** Register and enqueue media scripts.
+ /**
+ * Register and enqueue media scripts.
*
* @hook admin_enqueue_scripts
*/
@@ -317,7 +326,8 @@ public function admin_enqueue_scripts() {
}
}
- /** Display attachment and alternate size details on Edit Media page.
+ /**
+ * Display attachment and alternate size details on Edit Media page.
*
* @hook attachment_submitbox_misc_actions
*/
@@ -343,7 +353,8 @@ public function attachment_submitbox_misc_actions() {
}
}
- /** Add 'Webcomic Media' modal media page.
+ /**
+ * Add 'Webcomic Media' modal media page.
*
* @return array
* @hook media_upload_tabs
@@ -366,7 +377,8 @@ public function media_upload_tabs( $tabs ) {
return $tabs;
}
- /** Add regenerate and detach options to media table.
+ /**
+ * Add regenerate and detach options to media table.
*
* This feature is not Webcomic-specific; any attached media object
* will gain a functional Detach option. With luck a future
@@ -389,7 +401,8 @@ public function media_row_actions( $actions, $attachment ) {
return $actions;
}
- /** Display relevant status for webcomic media.
+ /**
+ * Display relevant status for webcomic media.
*
* @param array $states List of media states.
* @return array
@@ -429,7 +442,8 @@ public function display_media_states( $states ) {
return $states;
}
- /** Add additional image sizes for inserting into posts.
+ /**
+ * Add additional image sizes for inserting into posts.
*
* @uses Webcomic::$config
*/
@@ -441,7 +455,8 @@ public function image_size_names_choose( $sizes ) {
return $sizes;
}
- /** Render the webcomic attacher.
+ /**
+ * Render the webcomic attacher.
*
* @uses Webcomic::$config
*/
@@ -616,7 +631,8 @@ public function page_attacher() {
<?php
}
- /** Render the webcomic generator.
+ /**
+ * Render the webcomic generator.
*
* @uses Webcomic::$config
* @uses Webcomic::get_attachments()
@@ -699,7 +715,8 @@ public function page_generator() {
<?php
}
- /** Save new media order.
+ /**
+ * Save new media order.
*
* @param array $ids Array of attachment ID's to update.
*/
View
48 -/php/pages.php
@@ -1,15 +1,18 @@
<?php
-/** Contains the WebcomicPages class.
+/**
+ * Contains the WebcomicPages class.
*
* @package Webcomic
*/
-/** Handle page-related tasks.
+/**
+ * Handle page-related tasks.
*
* @package Webcomic
*/
class WebcomicPages extends Webcomic {
- /** Register hooks.
+ /**
+ * Register hooks.
*
* @uses WebcomicPages::add_meta_boxes()
* @uses WebcomicPages::wp_insert_post()
@@ -36,7 +39,8 @@ public function __construct() {
add_filter( 'manage_edit-page_sortable_columns', array( $this, 'manage_edit_page_sortable_columns' ), 10, 1 );
}
- /** Add page meta boxes.
+ /**
+ * Add page meta boxes.
*
* @uses WebcomicPages::box_webcomic_collection()
* @hook add_meta_boxes
@@ -45,7 +49,8 @@ public function add_meta_boxes() {
add_meta_box( 'webcomic-collection', __( 'Webcomic Collection', 'webcomic' ), array( $this, 'box_webcomic_collection' ), 'page', 'side' );
}
- /** Save metadata with pages.
+ /**
+ * Save metadata with pages.
*
* @param integer $id The page ID to update.
* @param object $post Post object to update.
@@ -71,7 +76,8 @@ public function wp_insert_post( $id, $post ) {
}
}
- /** Handle bulk edit meta updates.
+ /**
+ * Handle bulk edit meta updates.
*
* @param integer $id Bulk-edited post ID.
* @hook pre_post_update
@@ -84,7 +90,8 @@ public function pre_post_update( $id ) {
}
}
- /** Register and enqueue meta box scripts.
+ /**
+ * Register and enqueue meta box scripts.
*
* @uses Webcomic::$url
* @hook admin_enqueue_scripts
@@ -97,7 +104,8 @@ public function admin_enqueue_scripts() {
}
}
- /** Render bulk edit options.
+ /**
+ * Render bulk edit options.
*
* @param string $column Name of the custom column.
* @param string $type Post type.
@@ -129,7 +137,8 @@ public function bulk_edit_custom_box( $column, $type ) {
}
}
- /** Render quick edit options.
+ /**
+ * Render quick edit options.
*
* @param string $column Name of the custom column.
* @param string $type Post type.
@@ -160,7 +169,8 @@ public function quick_edit_custom_box( $column, $type ) {
}
}
- /** Render column content for page admin pages.
+ /**
+ * Render column content for page admin pages.
*
* @param string $column The column name.
* @param integer $id Current post ID.
@@ -172,7 +182,8 @@ public function manage_page_posts_custom_column( $column, $id ) {
}
}
- /** Handle sorting and filtering pages by webcomic collection.
+ /**
+ * Handle sorting and filtering pages by webcomic collection.
*
* Because of how WordPress handles custom field queries, sorting
* this way has the unintentional side effect of filtering out any
@@ -198,7 +209,8 @@ public function request( $request ) {
return $request;
}
- /** Add custom webcomic collection to management pages.
+ /**
+ * Add custom webcomic collection to management pages.
*
* @param array $columns Array of of post columns.
* @return array
@@ -212,7 +224,8 @@ public function manage_edit_page_columns( $columns ) {
return array_merge( $pre, $columns );
}
- /** Add sortable webcomic collection column.
+ /**
+ * Add sortable webcomic collection column.
*
* @param array $columns An array of sortable columns.
* @return array
@@ -222,7 +235,8 @@ public function manage_edit_page_sortable_columns( $columns ) {
return array_merge( array( 'webcomic_collection' => 'webcomic_collection' ), $columns );
}
- /** Render the page collection meta box.
+ /**
+ * Render the page collection meta box.
*
* @param object $page Current page object.
* @uses Webcomic::$config
@@ -245,7 +259,8 @@ public function box_webcomic_collection( $page ) {
<?php
}
- /** Update quick edit meta values.
+ /**
+ * Update quick edit meta values.
*
* @param integer $id Post ID to retrieve values for.
*/
@@ -255,7 +270,8 @@ public static function ajax_quick_edit( $id ) {
) );
}
- /** Save quick edit meta values.
+ /**
+ * Save quick edit meta values.
*
* @param integer $id Post ID to save values for.
* @param string $page_collection Update collection meta value.
View
83 -/php/posts.php
@@ -1,15 +1,18 @@
<?php
-/** Contains the WebcomicPosts class.
+/**
+ * Contains the WebcomicPosts class.
*
* @package Webcomic
*/
-/** Handle post-related tasks.
+/**
+ * Handle post-related tasks.
*
* @package Webcomic
*/
class WebcomicPosts extends Webcomic {
- /** Register hooks.
+ /**
+ * Register hooks.
*
* @uses Webcomic::$config
* @uses WebcomicPosts::add_meta_boxes()
@@ -49,7 +52,8 @@ public function __construct() {
}
}
- /** Add webcomic meta boxes.
+ /**
+ * Add webcomic meta boxes.
*
* @uses Webcomic::$config
* @uses WebcomicPosts::media()
@@ -65,7 +69,8 @@ public function add_meta_boxes() {
}
}
- /** Handle bulk edit meta updates.
+ /**
+ * Handle bulk edit meta updates.
*
* @param integer $id Bulk-edited post ID.
* @hook pre_post_update
@@ -86,7 +91,8 @@ public function pre_post_update( $id ) {
}
}
- /** Update the collection updated time.
+ /**
+ * Update the collection updated time.
*
* @param integer $id Post ID to update.
* @param object $post Post object to update.
@@ -101,7 +107,8 @@ public function update_collection( $id, $post ) {
}
}
- /** Register and enqueue meta box scripts.
+ /**
+ * Register and enqueue meta box scripts.
*
* If the post editor is disabled we also need to enqueue the media
* upload script and thickbox stylesheet to ensure uploads work.
@@ -124,7 +131,8 @@ public function admin_enqueue_scripts() {
}
}
- /** Render additional post filtering options.
+ /**
+ * Render additional post filtering options.
*
* The wp_dropdown_categories() function works well enough, but we
* need to swap out the term ID values for term slug values to get
@@ -163,7 +171,8 @@ public function restrict_manage_posts() {
}
}
- /** Save commerce metadata with webcomics.
+ /**
+ * Save commerce metadata with webcomics.
*
* @param integer $id Post ID to update.
* @param object $post Post object to update.
@@ -207,7 +216,8 @@ public function save_webcomic_commerce( $id, $post ) {
}
}
- /** Update webcomic title, slug, and content prior to saving.
+ /**
+ * Update webcomic title, slug, and content prior to saving.
*
* @param array $data An array of post data.
* @param array $raw An array of raw post data.
@@ -233,7 +243,8 @@ public function wp_insert_post_data( $data, $raw ) {
return $data;
}
- /** Save transcript metadata with webcomics.
+ /**
+ * Save transcript metadata with webcomics.
*
* @param integer $id The post ID to update.
* @param object $post Post object to update.
@@ -255,7 +266,8 @@ public function save_webcomic_transcripts( $id, $post ) {
}
}
- /** Render bulk edit options.
+ /**
+ * Render bulk edit options.
*
* @param string $column Name of the custom column.
* @param string $type Post type.
@@ -302,7 +314,8 @@ public function bulk_edit_custom_box( $column, $type ) {
}
}
- /** Render quick edit options.
+ /**
+ * Render quick edit options.
*
* @param string $column Name of the custom column.
* @param string $type Post type.
@@ -327,7 +340,8 @@ public function quick_edit_custom_box( $column, $type ) {
}
}
- /** Filter posts list to display webcomics with no attachments.
+ /**
+ * Filter posts list to display webcomics with no attachments.
*
* @param string $where The WHERE query string.
* @return string