SlideShare una empresa de Scribd logo
1 de 22
Descargar para leer sin conexión
What we can learn from
                            WordPress

                            Chandra Maharzan
                              tweet @maharzan



Sunday, March 25, 12
Sunday, March 25, 12
Sunday, March 25, 12
What we ignore
                       • Most simplest parts
                        • Comments
                        • White Space
                        • Proper Names
Sunday, March 25, 12
CSS



Sunday, March 25, 12
/* =Quote
       ----------------------------- */
       .format-quote blockquote {
       ! color: #555; /* red color */
       ! font-size: 17px;
       ! margin: 0;
       }




       /* =Image
       ----------------------------- */

Sunday, March 25, 12
/* =Menu
       ----------------------------- */
       #access ul ul ul {
       ! left: 100%;
       ! top: 0;
       }
       /* Search Form */
       #branding #searchform {
       ! position: absolute;
       ! top: 3.8em;
       ! right: 7.6%;
       }

Sunday, March 25, 12
selector {
              property: value;
          }
          #selector-1,
          #selector-2,
          #selector-3 {
              background: #fff;
              color: #000;
          }
          #selector-1 { background: #fff; color: #000; }

Sunday, March 25, 12
Class names
                       #comment-form {
                           margin: 0;
                       }

                       #commentForm {}
                       #comment_form {}
                       #abc-12 {}

Sunday, March 25, 12
Property : Value
       #comment-form {
         -moz-box-shadow: 0px 3px 3px rgba(0, 0, 0, 0.2);
         -webkit-box-shadow: 0px 3px 3px rgba(0, 0, 0, 0.2);
         box-shadow: 0px 3px 3px rgba(0, 0, 0, 0.2);
         font-size: 1em;
         position: absolute;
         top: 0;
         right: 0;
         bottom: 0;
         left: 0;
         width: 500px;
         height: auto;
       }


Sunday, March 25, 12
Useful Resources

                       •Firebug
                       • http://codex.wordpress.org/
                        CSS_Coding_Standards



Sunday, March 25, 12
PHP



Sunday, March 25, 12
Comments
       /**
        * Tell WordPress to run twentyeleven_setup() when the
        * 'after_setup_theme' hook is run.
        */
       add_action( 'after_setup_theme', 'twentyeleven_setup' );


       /**
        * Sets the post excerpt length to 40 words.
        *
        * To override this length in a child theme,
        * remove the filter and add your own
        * function tied to the excerpt_length filter hook.
        */
       function twentyeleven_excerpt_length( $length ) {



Sunday, March 25, 12
Comments
       // Turn on random header image rotation by default.
       add_theme_support( 'custom-header', array( 'random-
       default' => true ) );


       // Has the text been hidden?
       if ( 'blank' == get_header_textcolor() ) :
         ...
         ...
       // If the user has set a custom color for the text use
       else :
         ....
         ....
       endif;




Sunday, March 25, 12
Comments
       /**
        * The Template for displaying all single posts.
        *
        * @package WordPress
        * @subpackage Twenty_Eleven
        * @since Twenty Eleven 1.0
        */

       <div id="primary">
       ! <div id="content" role="main">
         .....
         .....
         </div><!-- #content -->
       </div><!-- #primary -->




Sunday, March 25, 12
Variables
       $foo='somevalue';
       $foo2='somevalue2';
       $foo34var='somevalue3';
       $nicevar=somevalue4';


       $my_array=array(
          'foo'=>'somevalue',
          'foo2'=>'somevalue2',
          'foo3'=>'somevalue3',
          'foo34'=>'somevalue3'
       );



Sunday, March 25, 12
Better?
                $foo        =   'somevalue';
                $foo2       =   'somevalue2';
                $foo34var   =   'somevalue3';
                $nicevar    =   somevalue4';


                $my_array = array(
                   'foo'   => 'somevalue',
                   'foo2' => 'somevalue2',
                   'foo3' => 'somevalue3',
                   'foo34' => 'somevalue3'
                );



Sunday, March 25, 12
HTML

         <?php if ( ! have_posts() ) : ?>
            <div id="post-1" class="post">
               <h1 class="entry-title">Not Found</h1>
               <div class="entry-content">
                  <p>Apologies, but no results were found.</p>
                  <?php get_search_form(); ?>
               </div>
             </div>
         <?php endif; ?>




Sunday, March 25, 12
White Space
      function te_custom_excerpt( $output ) {
      !   if ( has_excerpt() && ! is_attachment() ) {
      !     $output .= te_continue_reading_link();
      !   }
      !   return $output;
      }
      add_filter( 'get_the_excerpt', 'te_custom_excerpt' );




Sunday, March 25, 12
In General
                       •x == 23
                       •foo && bar
                       •! foo
                       •function( $a, $b,   $c )
                       •$concat . '-5'
                       •$term .= 'X'
Sunday, March 25, 12
Reference

                       • http://codex.wordpress.org/
                         WordPress_Coding_Standards




Sunday, March 25, 12
Thank you



Sunday, March 25, 12

Más contenido relacionado

La actualidad más candente

Wynn Netherland: Accelerating Titanium Development with CoffeeScript, Compass...
Wynn Netherland: Accelerating Titanium Development with CoffeeScript, Compass...Wynn Netherland: Accelerating Titanium Development with CoffeeScript, Compass...
Wynn Netherland: Accelerating Titanium Development with CoffeeScript, Compass...Axway Appcelerator
 
DBIx::Skinnyと仲間たち
DBIx::Skinnyと仲間たちDBIx::Skinnyと仲間たち
DBIx::Skinnyと仲間たちRyo Miyake
 
Let's write secure drupal code! - Drupal Camp Pannonia 2019
Let's write secure drupal code! - Drupal Camp Pannonia 2019Let's write secure drupal code! - Drupal Camp Pannonia 2019
Let's write secure drupal code! - Drupal Camp Pannonia 2019Balázs Tatár
 
Drupal 7 — Circle theme
Drupal 7 — Circle themeDrupal 7 — Circle theme
Drupal 7 — Circle themeKirill Borzov
 
Let's write secure Drupal code! - Drupal Camp Poland 2019
Let's write secure Drupal code! - Drupal Camp Poland 2019Let's write secure Drupal code! - Drupal Camp Poland 2019
Let's write secure Drupal code! - Drupal Camp Poland 2019Balázs Tatár
 
HTML5 and CSS3 Refresher
HTML5 and CSS3 RefresherHTML5 and CSS3 Refresher
HTML5 and CSS3 RefresherIvano Malavolta
 
CSS: A Slippery Slope to the Backend
CSS: A Slippery Slope to the BackendCSS: A Slippery Slope to the Backend
CSS: A Slippery Slope to the BackendFITC
 
Let's write secure Drupal code! DUG Belgium - 08/08/2019
Let's write secure Drupal code! DUG Belgium - 08/08/2019Let's write secure Drupal code! DUG Belgium - 08/08/2019
Let's write secure Drupal code! DUG Belgium - 08/08/2019Balázs Tatár
 
Accelerated Native Mobile Development with the Ti gem
Accelerated Native Mobile Development with the Ti gemAccelerated Native Mobile Development with the Ti gem
Accelerated Native Mobile Development with the Ti gemWynn Netherland
 
Using shortcode in plugin development
Using shortcode in plugin developmentUsing shortcode in plugin development
Using shortcode in plugin developmentgskhanal
 
JavaScript for Flex Devs
JavaScript for Flex DevsJavaScript for Flex Devs
JavaScript for Flex DevsAaronius
 
Implementing Awesome: An HTML5/CSS3 Workshop
Implementing Awesome: An HTML5/CSS3 WorkshopImplementing Awesome: An HTML5/CSS3 Workshop
Implementing Awesome: An HTML5/CSS3 WorkshopShoshi Roberts
 
Big Design Conference: CSS3
Big Design Conference: CSS3 Big Design Conference: CSS3
Big Design Conference: CSS3 Wynn Netherland
 
JS.Chi CSS Animations
JS.Chi CSS AnimationsJS.Chi CSS Animations
JS.Chi CSS AnimationsJustin Meyer
 
WordPress Theme Design and Development Workshop - Day 3
WordPress Theme Design and Development Workshop - Day 3WordPress Theme Design and Development Workshop - Day 3
WordPress Theme Design and Development Workshop - Day 3Mizanur Rahaman Mizan
 
LESS(CSS preprocessor)
LESS(CSS preprocessor)LESS(CSS preprocessor)
LESS(CSS preprocessor)VIPIN KUMAR
 
Let's write secure Drupal code! - 13.09.2018 @ Drupal Europe, Darmstadt, Germany
Let's write secure Drupal code! - 13.09.2018 @ Drupal Europe, Darmstadt, GermanyLet's write secure Drupal code! - 13.09.2018 @ Drupal Europe, Darmstadt, Germany
Let's write secure Drupal code! - 13.09.2018 @ Drupal Europe, Darmstadt, GermanyBalázs Tatár
 

La actualidad más candente (20)

Wynn Netherland: Accelerating Titanium Development with CoffeeScript, Compass...
Wynn Netherland: Accelerating Titanium Development with CoffeeScript, Compass...Wynn Netherland: Accelerating Titanium Development with CoffeeScript, Compass...
Wynn Netherland: Accelerating Titanium Development with CoffeeScript, Compass...
 
DBIx::Skinnyと仲間たち
DBIx::Skinnyと仲間たちDBIx::Skinnyと仲間たち
DBIx::Skinnyと仲間たち
 
Let's write secure drupal code! - Drupal Camp Pannonia 2019
Let's write secure drupal code! - Drupal Camp Pannonia 2019Let's write secure drupal code! - Drupal Camp Pannonia 2019
Let's write secure drupal code! - Drupal Camp Pannonia 2019
 
Drupal 7 — Circle theme
Drupal 7 — Circle themeDrupal 7 — Circle theme
Drupal 7 — Circle theme
 
Let's write secure Drupal code! - Drupal Camp Poland 2019
Let's write secure Drupal code! - Drupal Camp Poland 2019Let's write secure Drupal code! - Drupal Camp Poland 2019
Let's write secure Drupal code! - Drupal Camp Poland 2019
 
Accelerated Stylesheets
Accelerated StylesheetsAccelerated Stylesheets
Accelerated Stylesheets
 
HTML5 and CSS3 Refresher
HTML5 and CSS3 RefresherHTML5 and CSS3 Refresher
HTML5 and CSS3 Refresher
 
CSS: A Slippery Slope to the Backend
CSS: A Slippery Slope to the BackendCSS: A Slippery Slope to the Backend
CSS: A Slippery Slope to the Backend
 
Let's write secure Drupal code! DUG Belgium - 08/08/2019
Let's write secure Drupal code! DUG Belgium - 08/08/2019Let's write secure Drupal code! DUG Belgium - 08/08/2019
Let's write secure Drupal code! DUG Belgium - 08/08/2019
 
Accelerated Native Mobile Development with the Ti gem
Accelerated Native Mobile Development with the Ti gemAccelerated Native Mobile Development with the Ti gem
Accelerated Native Mobile Development with the Ti gem
 
Using shortcode in plugin development
Using shortcode in plugin developmentUsing shortcode in plugin development
Using shortcode in plugin development
 
JavaScript for Flex Devs
JavaScript for Flex DevsJavaScript for Flex Devs
JavaScript for Flex Devs
 
LESS
LESSLESS
LESS
 
Implementing Awesome: An HTML5/CSS3 Workshop
Implementing Awesome: An HTML5/CSS3 WorkshopImplementing Awesome: An HTML5/CSS3 Workshop
Implementing Awesome: An HTML5/CSS3 Workshop
 
Big Design Conference: CSS3
Big Design Conference: CSS3 Big Design Conference: CSS3
Big Design Conference: CSS3
 
JS.Chi CSS Animations
JS.Chi CSS AnimationsJS.Chi CSS Animations
JS.Chi CSS Animations
 
WordPress Theme Design and Development Workshop - Day 3
WordPress Theme Design and Development Workshop - Day 3WordPress Theme Design and Development Workshop - Day 3
WordPress Theme Design and Development Workshop - Day 3
 
LESS(CSS preprocessor)
LESS(CSS preprocessor)LESS(CSS preprocessor)
LESS(CSS preprocessor)
 
18. images in symfony 4
18. images in symfony 418. images in symfony 4
18. images in symfony 4
 
Let's write secure Drupal code! - 13.09.2018 @ Drupal Europe, Darmstadt, Germany
Let's write secure Drupal code! - 13.09.2018 @ Drupal Europe, Darmstadt, GermanyLet's write secure Drupal code! - 13.09.2018 @ Drupal Europe, Darmstadt, Germany
Let's write secure Drupal code! - 13.09.2018 @ Drupal Europe, Darmstadt, Germany
 

Destacado

Interesting Theme Shop Stats
Interesting Theme Shop StatsInteresting Theme Shop Stats
Interesting Theme Shop StatsChandra Maharzan
 
Maxxconnect Presentation
Maxxconnect PresentationMaxxconnect Presentation
Maxxconnect PresentationShankarNabar
 
Thucydides - /by Igor Rozdobudko
Thucydides - /by Igor RozdobudkoThucydides - /by Igor Rozdobudko
Thucydides - /by Igor RozdobudkoOleksandr Khomenko
 
Chandra Maharzan: The Future of Web Design Experience
Chandra Maharzan: The Future of Web Design ExperienceChandra Maharzan: The Future of Web Design Experience
Chandra Maharzan: The Future of Web Design ExperienceChandra Maharzan
 
WordPress Security Implementation Guideline - Presentation for OWASP Romania ...
WordPress Security Implementation Guideline - Presentation for OWASP Romania ...WordPress Security Implementation Guideline - Presentation for OWASP Romania ...
WordPress Security Implementation Guideline - Presentation for OWASP Romania ...Dan Vasile
 
Chandra Maharzan: Making a successful career out of WordPress
Chandra Maharzan: Making a successful career out of WordPressChandra Maharzan: Making a successful career out of WordPress
Chandra Maharzan: Making a successful career out of WordPresswpnepal
 

Destacado (7)

Interesting Theme Shop Stats
Interesting Theme Shop StatsInteresting Theme Shop Stats
Interesting Theme Shop Stats
 
Maxxconnect Presentation
Maxxconnect PresentationMaxxconnect Presentation
Maxxconnect Presentation
 
Be HTML5-ready today
Be HTML5-ready todayBe HTML5-ready today
Be HTML5-ready today
 
Thucydides - /by Igor Rozdobudko
Thucydides - /by Igor RozdobudkoThucydides - /by Igor Rozdobudko
Thucydides - /by Igor Rozdobudko
 
Chandra Maharzan: The Future of Web Design Experience
Chandra Maharzan: The Future of Web Design ExperienceChandra Maharzan: The Future of Web Design Experience
Chandra Maharzan: The Future of Web Design Experience
 
WordPress Security Implementation Guideline - Presentation for OWASP Romania ...
WordPress Security Implementation Guideline - Presentation for OWASP Romania ...WordPress Security Implementation Guideline - Presentation for OWASP Romania ...
WordPress Security Implementation Guideline - Presentation for OWASP Romania ...
 
Chandra Maharzan: Making a successful career out of WordPress
Chandra Maharzan: Making a successful career out of WordPressChandra Maharzan: Making a successful career out of WordPress
Chandra Maharzan: Making a successful career out of WordPress
 

Similar a What we can learn from WordPress as a developer

Metaprogramovanie #1
Metaprogramovanie #1Metaprogramovanie #1
Metaprogramovanie #1Jano Suchal
 
Obscure Wordpress Functions That Are Actually Quite Useful
Obscure Wordpress Functions That Are Actually Quite UsefulObscure Wordpress Functions That Are Actually Quite Useful
Obscure Wordpress Functions That Are Actually Quite UsefulGraham Armfield
 
Why Hacking WordPress Search Isn't Some Big Scary Thing
Why Hacking WordPress Search Isn't Some Big Scary ThingWhy Hacking WordPress Search Isn't Some Big Scary Thing
Why Hacking WordPress Search Isn't Some Big Scary ThingChris Reynolds
 
Ruby is Awesome
Ruby is AwesomeRuby is Awesome
Ruby is AwesomeAstrails
 
Extending Moose
Extending MooseExtending Moose
Extending Moosesartak
 
Can't Miss Features of PHP 5.3 and 5.4
Can't Miss Features of PHP 5.3 and 5.4Can't Miss Features of PHP 5.3 and 5.4
Can't Miss Features of PHP 5.3 and 5.4Jeff Carouth
 
Simple Ways To Be A Better Programmer (OSCON 2007)
Simple Ways To Be A Better Programmer (OSCON 2007)Simple Ways To Be A Better Programmer (OSCON 2007)
Simple Ways To Be A Better Programmer (OSCON 2007)Michael Schwern
 
メタプログラミングPerl nagoya rubykaigi02
メタプログラミングPerl nagoya rubykaigi02メタプログラミングPerl nagoya rubykaigi02
メタプログラミングPerl nagoya rubykaigi02なんとか くら
 
Corinna Status 2022.pptx
Corinna Status 2022.pptxCorinna Status 2022.pptx
Corinna Status 2022.pptxCurtis Poe
 
第49回Php勉強会@関東 Datasource
第49回Php勉強会@関東 Datasource第49回Php勉強会@関東 Datasource
第49回Php勉強会@関東 DatasourceKaz Watanabe
 
Hardcore URL Routing for WordPress - WordCamp Atlanta 2014 (PPT)
Hardcore URL Routing for WordPress - WordCamp Atlanta 2014 (PPT)Hardcore URL Routing for WordPress - WordCamp Atlanta 2014 (PPT)
Hardcore URL Routing for WordPress - WordCamp Atlanta 2014 (PPT)Mike Schinkel
 

Similar a What we can learn from WordPress as a developer (20)

Metaprogramovanie #1
Metaprogramovanie #1Metaprogramovanie #1
Metaprogramovanie #1
 
Obscure Wordpress Functions That Are Actually Quite Useful
Obscure Wordpress Functions That Are Actually Quite UsefulObscure Wordpress Functions That Are Actually Quite Useful
Obscure Wordpress Functions That Are Actually Quite Useful
 
php2.pptx
php2.pptxphp2.pptx
php2.pptx
 
Why Hacking WordPress Search Isn't Some Big Scary Thing
Why Hacking WordPress Search Isn't Some Big Scary ThingWhy Hacking WordPress Search Isn't Some Big Scary Thing
Why Hacking WordPress Search Isn't Some Big Scary Thing
 
veracruz
veracruzveracruz
veracruz
 
veracruz
veracruzveracruz
veracruz
 
veracruz
veracruzveracruz
veracruz
 
veracruz
veracruzveracruz
veracruz
 
Ruby is Awesome
Ruby is AwesomeRuby is Awesome
Ruby is Awesome
 
Extending Moose
Extending MooseExtending Moose
Extending Moose
 
Ruby AST Tools
Ruby AST ToolsRuby AST Tools
Ruby AST Tools
 
Lithium Best
Lithium Best Lithium Best
Lithium Best
 
Can't Miss Features of PHP 5.3 and 5.4
Can't Miss Features of PHP 5.3 and 5.4Can't Miss Features of PHP 5.3 and 5.4
Can't Miss Features of PHP 5.3 and 5.4
 
Fluent14
Fluent14Fluent14
Fluent14
 
Simple Ways To Be A Better Programmer (OSCON 2007)
Simple Ways To Be A Better Programmer (OSCON 2007)Simple Ways To Be A Better Programmer (OSCON 2007)
Simple Ways To Be A Better Programmer (OSCON 2007)
 
メタプログラミングPerl nagoya rubykaigi02
メタプログラミングPerl nagoya rubykaigi02メタプログラミングPerl nagoya rubykaigi02
メタプログラミングPerl nagoya rubykaigi02
 
Perl object ?
Perl object ?Perl object ?
Perl object ?
 
Corinna Status 2022.pptx
Corinna Status 2022.pptxCorinna Status 2022.pptx
Corinna Status 2022.pptx
 
第49回Php勉強会@関東 Datasource
第49回Php勉強会@関東 Datasource第49回Php勉強会@関東 Datasource
第49回Php勉強会@関東 Datasource
 
Hardcore URL Routing for WordPress - WordCamp Atlanta 2014 (PPT)
Hardcore URL Routing for WordPress - WordCamp Atlanta 2014 (PPT)Hardcore URL Routing for WordPress - WordCamp Atlanta 2014 (PPT)
Hardcore URL Routing for WordPress - WordCamp Atlanta 2014 (PPT)
 

Último

From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 

Último (20)

From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 

What we can learn from WordPress as a developer

  • 1. What we can learn from WordPress Chandra Maharzan tweet @maharzan Sunday, March 25, 12
  • 4. What we ignore • Most simplest parts • Comments • White Space • Proper Names Sunday, March 25, 12
  • 6. /* =Quote ----------------------------- */ .format-quote blockquote { ! color: #555; /* red color */ ! font-size: 17px; ! margin: 0; } /* =Image ----------------------------- */ Sunday, March 25, 12
  • 7. /* =Menu ----------------------------- */ #access ul ul ul { ! left: 100%; ! top: 0; } /* Search Form */ #branding #searchform { ! position: absolute; ! top: 3.8em; ! right: 7.6%; } Sunday, March 25, 12
  • 8. selector { property: value; } #selector-1, #selector-2, #selector-3 { background: #fff; color: #000; } #selector-1 { background: #fff; color: #000; } Sunday, March 25, 12
  • 9. Class names #comment-form { margin: 0; } #commentForm {} #comment_form {} #abc-12 {} Sunday, March 25, 12
  • 10. Property : Value #comment-form { -moz-box-shadow: 0px 3px 3px rgba(0, 0, 0, 0.2); -webkit-box-shadow: 0px 3px 3px rgba(0, 0, 0, 0.2); box-shadow: 0px 3px 3px rgba(0, 0, 0, 0.2); font-size: 1em; position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 500px; height: auto; } Sunday, March 25, 12
  • 11. Useful Resources •Firebug • http://codex.wordpress.org/ CSS_Coding_Standards Sunday, March 25, 12
  • 13. Comments /** * Tell WordPress to run twentyeleven_setup() when the * 'after_setup_theme' hook is run. */ add_action( 'after_setup_theme', 'twentyeleven_setup' ); /** * Sets the post excerpt length to 40 words. * * To override this length in a child theme, * remove the filter and add your own * function tied to the excerpt_length filter hook. */ function twentyeleven_excerpt_length( $length ) { Sunday, March 25, 12
  • 14. Comments // Turn on random header image rotation by default. add_theme_support( 'custom-header', array( 'random- default' => true ) ); // Has the text been hidden? if ( 'blank' == get_header_textcolor() ) : ... ... // If the user has set a custom color for the text use else : .... .... endif; Sunday, March 25, 12
  • 15. Comments /** * The Template for displaying all single posts. * * @package WordPress * @subpackage Twenty_Eleven * @since Twenty Eleven 1.0 */ <div id="primary"> ! <div id="content" role="main"> ..... ..... </div><!-- #content --> </div><!-- #primary --> Sunday, March 25, 12
  • 16. Variables $foo='somevalue'; $foo2='somevalue2'; $foo34var='somevalue3'; $nicevar=somevalue4'; $my_array=array( 'foo'=>'somevalue', 'foo2'=>'somevalue2', 'foo3'=>'somevalue3', 'foo34'=>'somevalue3' ); Sunday, March 25, 12
  • 17. Better? $foo = 'somevalue'; $foo2 = 'somevalue2'; $foo34var = 'somevalue3'; $nicevar = somevalue4'; $my_array = array( 'foo' => 'somevalue', 'foo2' => 'somevalue2', 'foo3' => 'somevalue3', 'foo34' => 'somevalue3' ); Sunday, March 25, 12
  • 18. HTML <?php if ( ! have_posts() ) : ?> <div id="post-1" class="post"> <h1 class="entry-title">Not Found</h1> <div class="entry-content"> <p>Apologies, but no results were found.</p> <?php get_search_form(); ?> </div> </div> <?php endif; ?> Sunday, March 25, 12
  • 19. White Space function te_custom_excerpt( $output ) { ! if ( has_excerpt() && ! is_attachment() ) { ! $output .= te_continue_reading_link(); ! } ! return $output; } add_filter( 'get_the_excerpt', 'te_custom_excerpt' ); Sunday, March 25, 12
  • 20. In General •x == 23 •foo && bar •! foo •function( $a, $b, $c ) •$concat . '-5' •$term .= 'X' Sunday, March 25, 12
  • 21. Reference • http://codex.wordpress.org/ WordPress_Coding_Standards Sunday, March 25, 12