r81515 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81514‎ | r81515 | r81516 >
Date:13:50, 4 February 2011
Author:krinkle
Status:deferred
Tags:
Comment:
camelCase to lower_under_score
Modified paths:
  • /trunk/tools/wp-photocommons/inc/class-photocommons.php (modified) (history)

Diff [purge]

Index: trunk/tools/wp-photocommons/inc/class-photocommons.php
@@ -24,18 +24,18 @@
2525
2626 function __construct() {
2727 if ( is_admin() ) {
28 - $this->initAdmin();
 28+ $this->init_admin();
2929 } else {
30 - $this->initFrontend();
 30+ $this->init_frontend();
3131 }
3232 }
3333
34 - public function addShortcode( $args ) {
 34+ public function add_shortcode( $args ) {
3535 $filename = $args['file'];
3636 $width = $args['width'];
3737 $align = empty( $args['align'] ) ? 'alignright' : 'align' . $args['align'];
38 - $thumb = $this->getThumbUrl( $filename, $width );
39 - $filepage = $this->getPageUrl( $filename, $width );
 38+ $thumb = $this->get_thumb_url( $filename, $width );
 39+ $filepage = $this->get_page_url( $filename, $width );
4040
4141 return sprintf(
4242 '<a href="%s" title="%s" class="wp-photocommons-thumb">' .
@@ -46,20 +46,20 @@
4747 );
4848 }
4949
50 - private function getThumbUrl( $file, $width ) {
 50+ private function get_thumb_url( $file, $width ) {
5151 return sprintf( self::FILEPATH_PATTERN, rawurlencode( $file ), rawurlencode( $width ) );
5252 }
5353
54 - private function getPageUrl( $file, $width ) {
 54+ private function get_page_url( $file, $width ) {
5555 return sprintf( self::FILEPAGE_PATTERN, rawurlencode( $file ) );
5656 }
5757
58 - private function initAdmin() {
59 - $this->enqueueScripts();
60 - $this->enqueueStyles();
 58+ private function init_admin() {
 59+ $this->enqueue_scripts();
 60+ $this->enqueue_styles();
6161 }
6262
63 - private function enqueueScripts() {
 63+ private function enqueue_scripts() {
6464 // Register some of our own scripts
6565 wp_register_script( 'admin', plugins_url() . self::PLUGIN_PATH . 'js/admin.js' );
6666 wp_register_script( 'search', plugins_url() . self::PLUGIN_PATH . 'js/search.js' );
@@ -76,7 +76,7 @@
7777 wp_enqueue_script( 'suggestions' );
7878 }
7979
80 - private function enqueueStyles() {
 80+ private function enqueue_styles() {
8181 // Register our own styles and enqueue
8282 wp_register_style( 'jquid_jquery_blog_stylesheet', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.6/themes/redmond/jquery-ui.css' );
8383 wp_register_style( 'suggestions', plugins_url() . self::PLUGIN_PATH . 'css/jquery.suggestions.css' );
@@ -88,7 +88,7 @@
8989
9090 }
9191
92 - private function initFrontend() {
93 - add_shortcode( 'photocommons', array( $this, 'addShortcode' ) );
 92+ private function init_frontend() {
 93+ add_shortcode( 'photocommons', array( $this, 'add_shortcode' ) );
9494 }
9595 }
\ No newline at end of file

Status & tagging log