Index: trunk/tools/wp-photocommons/inc/class-photocommons.php |
— | — | @@ -24,18 +24,18 @@ |
25 | 25 | |
26 | 26 | function __construct() { |
27 | 27 | if ( is_admin() ) { |
28 | | - $this->initAdmin(); |
| 28 | + $this->init_admin(); |
29 | 29 | } else { |
30 | | - $this->initFrontend(); |
| 30 | + $this->init_frontend(); |
31 | 31 | } |
32 | 32 | } |
33 | 33 | |
34 | | - public function addShortcode( $args ) { |
| 34 | + public function add_shortcode( $args ) { |
35 | 35 | $filename = $args['file']; |
36 | 36 | $width = $args['width']; |
37 | 37 | $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 ); |
40 | 40 | |
41 | 41 | return sprintf( |
42 | 42 | '<a href="%s" title="%s" class="wp-photocommons-thumb">' . |
— | — | @@ -46,20 +46,20 @@ |
47 | 47 | ); |
48 | 48 | } |
49 | 49 | |
50 | | - private function getThumbUrl( $file, $width ) { |
| 50 | + private function get_thumb_url( $file, $width ) { |
51 | 51 | return sprintf( self::FILEPATH_PATTERN, rawurlencode( $file ), rawurlencode( $width ) ); |
52 | 52 | } |
53 | 53 | |
54 | | - private function getPageUrl( $file, $width ) { |
| 54 | + private function get_page_url( $file, $width ) { |
55 | 55 | return sprintf( self::FILEPAGE_PATTERN, rawurlencode( $file ) ); |
56 | 56 | } |
57 | 57 | |
58 | | - private function initAdmin() { |
59 | | - $this->enqueueScripts(); |
60 | | - $this->enqueueStyles(); |
| 58 | + private function init_admin() { |
| 59 | + $this->enqueue_scripts(); |
| 60 | + $this->enqueue_styles(); |
61 | 61 | } |
62 | 62 | |
63 | | - private function enqueueScripts() { |
| 63 | + private function enqueue_scripts() { |
64 | 64 | // Register some of our own scripts |
65 | 65 | wp_register_script( 'admin', plugins_url() . self::PLUGIN_PATH . 'js/admin.js' ); |
66 | 66 | wp_register_script( 'search', plugins_url() . self::PLUGIN_PATH . 'js/search.js' ); |
— | — | @@ -76,7 +76,7 @@ |
77 | 77 | wp_enqueue_script( 'suggestions' ); |
78 | 78 | } |
79 | 79 | |
80 | | - private function enqueueStyles() { |
| 80 | + private function enqueue_styles() { |
81 | 81 | // Register our own styles and enqueue |
82 | 82 | wp_register_style( 'jquid_jquery_blog_stylesheet', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.6/themes/redmond/jquery-ui.css' ); |
83 | 83 | wp_register_style( 'suggestions', plugins_url() . self::PLUGIN_PATH . 'css/jquery.suggestions.css' ); |
— | — | @@ -88,7 +88,7 @@ |
89 | 89 | |
90 | 90 | } |
91 | 91 | |
92 | | - private function initFrontend() { |
93 | | - add_shortcode( 'photocommons', array( $this, 'addShortcode' ) ); |
| 92 | + private function init_frontend() { |
| 93 | + add_shortcode( 'photocommons', array( $this, 'add_shortcode' ) ); |
94 | 94 | } |
95 | 95 | } |
\ No newline at end of file |