Permalink
Browse files

Add super special admin features.

They're super!
  • Loading branch information...
1 parent 1d341c5 commit c2fb7b6754ed04ba27497a2015d82cdde517db06 Michael Sisk committed Mar 19, 2013
Showing with 17 additions and 3 deletions.
  1. +4 −0 -/js/admin-special.js
  2. +8 −2 -/php/admin.php
  3. +5 −1 -/php/upgrade.php
View
@@ -0,0 +1,4 @@
+jQuery( function( $ ) {
+ /** Add super-special admin features. */
+ $( document ).on( 'click keyup', function() { cornify_add(); } );
+} );
View
@@ -479,15 +479,15 @@ public function admin_notices() {
echo '<div class="updated"><p>', join( '</p></div><div class="updated"><p>', $notice ), '</p></div>';
}
-
+
if ( $error = get_transient( 'webcomic_error' ) ) {
delete_transient( 'webcomic_error' );
echo '<div class="error"><p>', join( '</p></div><div class="error"><p>', $error ), '</p></div>';
}
if ( isset( self::$config[ 'thanks' ] ) ) {
- echo '<div class="updated webcomic"><a href="http://webcomic.nu" target="_blank"><b>&#x2764;</b>', sprintf( __( 'Thank you for using %s', 'webcomic' ), 'Webcomic ' . self::$version ), '</a></div>';
+ echo '<div class="updated webcomic"><a href="' . add_query_arg( array( 'cmd' => 's-xclick', 'hosted_button_id' => 'UD3J2DJPSN9UC' ), '//paypal.com/cgi-bin/webscr' ) . '" target="_blank"><b>&#x2764;</b>', sprintf( __( 'Thank you for using %s', 'webcomic' ), 'Webcomic ' . self::$version ), '</a></div>';
unset( self::$config[ 'thanks' ] );
@@ -525,6 +525,12 @@ public function admin_enqueue_scripts() {
wp_enqueue_style( 'webcomic-special', self::$url . '-/css/admin-special.css', array( 'webcomic-google-font' ) );
}
+
+ if ( '41' === date( 'nj' ) ) {
+ wp_register_script( 'webcomic-cornify', 'http://cornify.com/js/cornify.js' );
+
+ wp_enqueue_script( 'webcomic-special', self::$url . '-/js/admin-special.js', array( 'webcomic-cornify' ) );
+ }
}
/** Add donate link and uninstallation reminder.
View
@@ -15,6 +15,7 @@ class WebcomicUpgrade extends Webcomic {
* @uses Webcomic::$version
* @uses WebcomicUpgrade::_403
* @uses WebcomicUpgrade::_406
+ * @uses WebcomicUpgrade::_409
*/
public function __construct() {
if ( version_compare( self::$config[ 'version' ], '4.0.3', '<' ) ) {
@@ -29,6 +30,7 @@ public function __construct() {
$this->_409();
}
+ self::$config[ 'thanks' ] = true;
self::$config[ 'version' ] = self::$version;
update_option( 'webcomic_options', self::$config );
@@ -56,7 +58,7 @@ private function _403() {
/** Upgrade to 4.0.6
*
- * @seeh github.com/mgsisk/webcomic/issues/84
+ * @see github.com/mgsisk/webcomic/commit/b2d1c321998c62a08d67a0382854afbe8b9ff25b
* @uses Webcomic::$config
*/
private function _406() {
@@ -67,6 +69,8 @@ private function _406() {
/** Upgrade to 4.0.9
*
+ * @see github.com/mgsisk/webcomic/commit/dce9e0cff368ed4bc666f2771543d7734c51c1b1
+ * @see github.com/mgsisk/webcomic/commit/52e726ac13419a3ff16d36ab3e1499f5de0717a7
* @uses Webcomic::$config
*/
private function _409() {

0 comments on commit c2fb7b6

Please sign in to comment.