Stephanie Leary @sleary stephanieleary.com
The WordPress University
New book coming Fall
2014!
Content Strategy for WordPress
demonstrates how to build structured
content for higher ed sites...
Steph’s Stuff
• @sleary
• stephanieleary.com
• profiles.wordpress.org/sillybean
• slideshare.net/stephanieleary
Why WordPress?
Common Situation
• No staff
• No budget
• No server
• Thousands of HTML files
• ... and broken links
• No search
• No RSS ...
Advantages
• Easy UI for managing posts and pages
• Scheduled publishing
• Clean URLs
• Feeds for everything
• One-click u...
Weaknesses
• Lacks native reusable content & network-
wide internal linking system
• Requires caching plugin, not included...
Compared to other
CMSs
• Fast development cycles
• WP 3.0 to 3.1: 8 months
• 5-6 months more typical
• Drupal 6.0 to 7.0: ...
Compared to other
CMSs
• Core features work very well
• Comments
• RSS and Atom feeds
• Permalinks
• File uploads
• Noness...
WordPress Tour
Media Uploads
• Limited to unpublicized list of MIMEs
• Easy to add or remove MIMEs
• Size/space limited by PHP, site sett...
oEmbed
• YouTube
• DailyMotion
• Vimeo
• Flickr
• Twitter
• Scribd
Check this out:
http://www.youtube.com/watch?v=nTDNLUzj...
Basic Roles
• Administrator
• Editor
• edits pages, publishes others’ posts
• Author
• publishes their own posts
• Contrib...
Posts vs. Pages
• Posts
• date-based
• non-hierarchical
• categorized and tagged
• Pages
• hierarchical
Custom Fields,
Taxonomies, and Post
Types
Custom Fields
• Adding more information to posts
• Default input vs. custom meta boxes
• Examples: content audit notes
• C...
Taxonomies
• Extra sets of categories and tags
• tags, people, locations, departments
• People
• Locations
• Departments
Taxonomies
• Default taxonomies
• Categories
• Post Tags
• Menus
• Link categories
• Custom examples
• People
• Locations
...
Custom Post Types
• Default post types
• Posts
• Pages
• Attachments
• Revisions
• Menu Items
• Custom examples
• Courses
...
Post Types
• Things that are not
• blog posts, news
• pages, information about your
office
• Anything that needs to be
cat...
Course Post Type
• Custom fields: arbitrary entry
• professor name
• email
• phone
• course code
• Taxonomies: selecting i...
Feeds
Feed Clean URL
Basic
/feed
/feed/atom
Comments /comments/feed
Category
(slug: news)
/category/news/feed
Tag
(slug: book)
/...
Feed Clean URL
Author
(nickname: Joe)
/author/joe/feed
Post Type
(slug: course)
/feed/?post_type=course
Taxonomy
(genre: m...
5 Minute Installation!
Unless your campus infrastructure sucks.
Basic Installation
• Gather database information: name,
username, password
• Unzip files to server
• View in browser
• Fil...
Network Setup
• Decide: subdirectories or subdomains?
• Wildcard DNS is not required if you are
not letting people sign up...
Domain Mapping
• snoopy.wordpress.com ->
snoopycorp.com
• snoopy.webserver-1.school.edu ->
snoopy.school.edu
• WordPress M...
Network Sites
U of
Foo
Liberal
Arts
Science
Business
Agriculture
Law
Network Domains
U of
Foo
Liberal
Arts
Science
Business
Agriculture
Law
foo.edu
law.foo.edu
arts.foo.edu
business.foo.edu
s...
Child Themes
Parent
Theme
Law Child Theme
Arts Child Theme
Business Child Theme
Science Child Theme
Ag Child Theme
Campus Network
Colleges
Clubs
Administration
Blogs
Sports
Break
Themes
Basic Theme Setup
• styles.css and index.php
• More specific files for each archive type:
• Single post, page, or custom p...
get_header()
Loop
while (have_posts()):
the_post();
the_title();
the_content();
comments_template();
endwhile;
get_sidebar...
The Loop
• while (have_posts()) ... endwhile;
• Translation:
• if the invisible query found posts, then for
each post, pri...
Have Posts?
• What was requested?
• What was returned?
• How many posts were returned, and how
many are displayed on this ...
How this comes
together...
• You click a category link on a post.
• Based on your permalink structure, WordPress
knows you...
Which template?
• Which theme file is used?
• category-slug.php
• category-id.php
• category.php
• archive.php
• index.php...
Advanced Themes
Page templates
Conditional tags
Multiple sidebars
Widget areas
Theme options
Editor styles
Tips:
handling ...
Child Themes
/*
Theme Name: My Child Theme
Description: A child of Parent Theme
Version: 1.0
Author: Stephanie Leary
Templ...
Other Child Theme Files
• If template is present in child theme, it
will be used instead of parent theme’s
file
• BOTH fun...
get_header()
Loop
while (have_posts()):
the_post();
the_title();
the_content();
comments_template();
endwhile;
get_sidebar...
get_header()
echo do_shortcode('[gallery]'); get_sidebar()
get_footer()
Child theme contains page template
or loop templat...
Theme Frameworks
• A complete theme with many options
• Page templates
• Specific archives
• Many widget areas
• SEO featu...
Building a Theme
1.Craft your HTML structure
2.Drop in WordPress template tags
• the_title()
• the_content()
• etc.
3.Move...
Building a Theme
4.Create widget areas
5.Handle comments and comment
forms
6.Don't forget 404.php!
Conditional Tags
Conditional ID Slug Title Array Other
is_single X X X X
is_sticky X
is_page X X
is_page_template Filename...
Conditional Tags
is_home is_search is_day is_feed is_404
is_comments_
popup
s_front_page is_time is_month is_attachment is...
Developing for
WordPress
Hooks
• Actions: places you can run your own
functions
• wp_head
• wp_footer
• Filters: things that can be altered with
yo...
Using Hooks
Excerpts for Pages
function excerpts_for_pages() {
add_post_type_support( 'page', 'excerpt' );
}
add_action( 'init', 'exce...
[rules]
function the_rules( $atts ) {
return "These are the rules!";
}
add_shortcode( 'rules', 'the_rules' );
Capital P, dangit!
function capital_P_dangit( $text ) {
return str_replace( 'Wordpress',
'WordPress', $text );
}
add_filte...
Admin Bar Link
function linkme( $admin_bar ){
$admin_bar->add_menu( array(
'id' => 'my-item',
'title' => 'My Item',
'href'...
Settings API
• Register settings
• form action=”options.php”
• update_option(‘foo’, ‘new value’);
• get_option(‘foo’);
Troubleshooting
• define('WP_DEBUG', true);
• Debug Bar plugin
• View hooks
• See Nacin on debugging WordPress
Evaluating Themes
and Plugins
• Search code for:
• base64()
• eval()
• include(../../wp-config.php)
• include(../../wp-loa...
Evaluating Themes
and Plugins
• Are wp_head() and wp_footer() missing?
• Does it insert links you can’t remove?
• Does it ...
Writing Secure
Themes and Plugins
• Use the Settings API
• Check user capabilities
• Check nonces and referrers
• Validate...
Developer References
• Mark Jaquith’s
WordCamp
Phoenix
presentation
• Professional
WordPress Plugin
Development
Theme & Plugin Q&A
???
Performance and
Security
Backing Up
• WP DB Backup (single sites, database
only)
• Backup Buddy (network, database and
files, $$)
Upgrading
• Do it! (But back up first.)
• If the FTP Settings screen appears, add direct
file method to your config file. ...
Caching
• WP Super Cache
• W3 Total Cache
• Hyper Cache
• Batcache
Security Precautions
• Make sure WP files are group-writeable,
not world
• directories: 644 or 664
• files: 755 or 775
• S...
Security Precautions
• Move wp-config.php up one directory
• Limit administrators
• Use Members to create less privileged
...
More With WordPress
BuddyPress
Social Network Layer
BuddyPress
• Campus wide social network
• Company-wide internal communication
tool
• Niche social network for interest top...
BuddyPress Plugins
• Welcome Pack
• Achievements
• BuddyPress Share It
• Group Suggest Widget
• Simple Google Map Plugin
ScholarPress
A Learning Management System for
BuddyPress
Content Audit
"Now we’re talking real CMS capability!"
The WordPress
Community
Development Philosophy
• 2.9, 3.0, 3.1, 3.5 are all major releases.
• 3.3.1 is a bugfix and security update.
• Old release...
Development Philosophy
• Development schedule kept on
make.wordpress.org/core.
• Meetings once a week in #wordpress-
dev.
...
Documentation
• Codex
• Forum
• WP StackExchange
• Trac
• Developers’ blogs
Support
• Active user forums on wordpress.org
• Individual plugin & theme developers
• Groups on LinkedIn
• huge Twitter p...
Support
• VIP Automattic (core creators)
• Third party vendors such as
MUSupport.net
• Core developers are also consultant...
Discussion
IRC channels
• #wordpress
• #wordpress-dev
• #buddypress
• #bbpress
Mailing Lists
• WP-Hackers
• WP-Edu
wp-edu....
News Events
WordCamps
• San Francisco
• New York
• local:
central.wordcamp.org
• WP Candy
• Planet WordPress
• wpMail.me
•...
Making the Case for
WordPress
LAMP vs. IIS 7
• mod_rewrite
• .htaccess
• PHP-FPM
• Postfix
• URL Rewrite 1.1
• PHP running as
FastCGI
Nginx
Open Source vs.
Commercial
Open Source
Low or no initial budget
outlay
Premium support
options available
Variety of custom...
Importing
• Many importers other than built-in list
• Writing your own MySQL-based import
• HTML Import
• Merging single i...
Q&A
Demos?
• Network administration
• Plugins
• BuddyPress
• Content Audit
• HTML Import
The WordPress University 2012
The WordPress University 2012
The WordPress University 2012
The WordPress University 2012
The WordPress University 2012
The WordPress University 2012
The WordPress University 2012
The WordPress University 2012
The WordPress University 2012
The WordPress University 2012
The WordPress University 2012
The WordPress University 2012
The WordPress University 2012
The WordPress University 2012
The WordPress University 2012
The WordPress University 2012
The WordPress University 2012
The WordPress University 2012
The WordPress University 2012
The WordPress University 2012
The WordPress University 2012
The WordPress University 2012
The WordPress University 2012
The WordPress University 2012
The WordPress University 2012
The WordPress University 2012
The WordPress University 2012
The WordPress University 2012
The WordPress University 2012
The WordPress University 2012
The WordPress University 2012
Upcoming SlideShare
Loading in...5
×

The WordPress University 2012

4,699

Published on

Published in: Technology, Business
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
4,699
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
18
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide
  • Widgets & menus: drag-n-drop happiness.
  • Obsolete plugins example: RB Internal Links. No longer necessary, was once hyper critical. Also, Genesis has made Page Links To unnecessary.
  • Shootout highlights\n \nWordPress releases take 5 to 8 months. \nFast development cycles do mean frequent updates. However, functions are always deprecated instead of being removed altogether, so plugins and themes don't break with every major release unless the developer did something stupid. Some simple plugins that use the APIs correctly have not needed an update since version 1.5 -- seven years ago.\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • The files will be grouped into folders unless you turn off that preference in Settings -> Media. The date is determined by the date of the associated post, not the date you upload the file!\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Taxonomies can be hierarchical -- like categories, where you can nest them -- or non-hierarchical -- like tags, where you just type new ones into a text field\n
  • \n
  • \n
  • Talk about SRD’s news and taxonomies\n
  • \n
  • Post types can also be hierarchical (like pages) or non (like posts).\n\nYou can specify which fields your type supports -- title, page attributes, excerpt, revisions, author, the big editor. You can turn those off, then use custom fields to add new ones. You'll have to customize your theme to display the additional stuff.\n
  • \n
  • \n
  • \n
  • \n
  • WordPress automatically generates feeds for just about everything. Most of the time, the feeds for posts and comments are the only ones you see. For anything else, just add /feed to the URL and see what happens! You can get feeds for categories, tags, combinations of tags...\n
  • ... individual authors’ posts, post types (including pages!), taxonomy terms, and even search terms.\n
  • \n
  • I think we should point to some instructions/blogs about installation. Leave the slide, point them to a resource, move on.\n
  • Decide subdomain vs subdirectory. \n\nMake sure your server meets the requirements. \n\nChange the wp-config setting.\n\nAccess the network admin menu.\n
  • [screenshots: step 1 (wp-config stuff), step 2, Network Admin screens, single site options screen w/ plugin & theme permissions]\n
  • Stephanie - Domain plugins\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Don't use Thesis\n\nSK- talk about what a framework means on a network site, show child theme options, framework settings, etc. Talk about framework specific plugins.\n
  • \n
  • \n
  • \n
  • \n
  • These are the conditional tags (functions) that take arguments. Is_single can take an ID, slug, title, or array of any of those.\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • This is actually part of WordPress! You might have a common typo or misspelling on campus and you’d like to force the correction.\n
  • \n
  • \n
  • Common problems: Missing .htaccess file; bad permissions on wp-includes or wp-content; wp-includes didn’t completely upload; plugin conflicts or bad plugin/theme code.\n
  • Themes on Extend go through an extensive vetting process.\n\nPLUGINS DO NOT. Any moron can upload a plugin to the repository. However, they are monitored for evil code. Still, getting things from wordpress.org helps you avoid the nasty stuff.\n
  • Themes on Extend go through an extensive vetting process.\n\nPLUGINS DO NOT. Any moron can upload a plugin to the repository. However, they are monitored for evil code. Still, getting things from wordpress.org helps you avoid the nasty stuff.\n
  • \n
  • If you’re going to write plugins or themes with options, you need this book.\n
  • \n
  • \n
  • \n
  • Old versions do not get security fixes. You must stay up to date with WP and all the plugins and themes you have installed.\n\nAuto-upgrading is by far the easiest thing to do. If you need to FTP the files for some reason, be sure to skip wp-content and .htaccess.\n \nNinjas can stay updated via Subversion. The wp-config.php file can be moved up one directory level so you don't overwrite it. \n
  • High-traffic WordPress sites NEED caching, but it's not built in! Why? The developers want you to find the solution that works best for your site and server.\n
  • \n
  • \n
  • \n
  • see the Google spreadsheet on plugins for a good list of security-related plugins. Also, if you are the server administrator, make sure your PHP settings are correct. (Turn off register_globals, etc.)\n
  • \n
  • BuddyPress adds: extended profiles, friends, groups, private messaging, activity streams, forums -- and the users manage everything from the front end. Theming is much more complicated as a result.\n
  • With BuddyPress, you own the content on the social network. You won’t be surprised when the business model changes and your free network suddenly costs an arm and a leg, or your users are suddenly hit with ads you don’t curate. You can also integrate with campus single-sign on tools.\n
  • \n
  • \n
  • \n
  • Google Summer of Code project. It provides classes, assignments, gradebook, student/teacher roles and more. Today it isn’t ready to handle the courseware needs of a complete institution, but it’s worth trying out for faculty/staff CMS training and on-campus professional development.\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • This is reality, even if the wiki says otherwise.\n
  • This is reality, even if the wiki says otherwise.\n
  • \n
  • VIP Support - Automattic: http://goo.gl/DLlXR\n\nSK: Huge fan of premium plugins and themes because the support offered tends to be top notch. Communities build up around these. Good examples are Genesis and GravityForms.\n
  • VIP Support - Automattic: http://goo.gl/DLlXR\n\nSK: Huge fan of premium plugins and themes because the support offered tends to be top notch. Communities build up around these. Good examples are Genesis and GravityForms.\n
  • \n
  • \n
  • \n
  • Ask if anyone's planning to run on IIS... the info on permissions is pretty LAMP-centric.\n
  • Low/no initial budget outlay\n\nFocus spending on customization and meeting campus needs\n\nAvailable commercial/premium support\n\nPut Shelley's budget slide here against ~$52k to launch OmniUpdate at a 2 year school.\n \n[Stephanie's budget: a lot less than that. I think all we bought was a Gravity Forms dev license. Did use our slave -- er, student worker pretty hard for about a month during and after the launch.] \n
  • \n
  • \n
  • \n
  • The WordPress University 2012

    1. 1. Stephanie Leary @sleary stephanieleary.com The WordPress University
    2. 2. New book coming Fall 2014! Content Strategy for WordPress demonstrates how to build structured content for higher ed sites. Sign up to be notified when it’s out: http://sleary.me/list
    3. 3. Steph’s Stuff • @sleary • stephanieleary.com • profiles.wordpress.org/sillybean • slideshare.net/stephanieleary
    4. 4. Why WordPress?
    5. 5. Common Situation • No staff • No budget • No server • Thousands of HTML files • ... and broken links • No search • No RSS feeds
    6. 6. Advantages • Easy UI for managing posts and pages • Scheduled publishing • Clean URLs • Feeds for everything • One-click upgrades • Widgets and menus • Thousands of free plugins and themes
    7. 7. Weaknesses • Lacks native reusable content & network- wide internal linking system • Requires caching plugin, not included, to optimize speed • Critical plugins can fail as WP advances • Disjointed and incomplete advanced documentation • Heavy use of pages can be problematic • Lacks robust native workflow
    8. 8. Compared to other CMSs • Fast development cycles • WP 3.0 to 3.1: 8 months • 5-6 months more typical • Drupal 6.0 to 7.0: 3 years • Joomla 1.5 to 1.6: 3 years • Cohesive, disciplined core developer group • UI focused on ease of use
    9. 9. Compared to other CMSs • Core features work very well • Comments • RSS and Atom feeds • Permalinks • File uploads • Nonessential features relegated to plugins
    10. 10. WordPress Tour
    11. 11. Media Uploads • Limited to unpublicized list of MIMEs • Easy to add or remove MIMEs • Size/space limited by PHP, site settings • Grouped into folders by date: • wp-content/uploads/2012/10/file.jpg • files/2012/10/file.jpg
    12. 12. oEmbed • YouTube • DailyMotion • Vimeo • Flickr • Twitter • Scribd Check this out: http://www.youtube.com/watch?v=nTDNLUzjkpg Hooray!
    13. 13. Basic Roles • Administrator • Editor • edits pages, publishes others’ posts • Author • publishes their own posts • Contributor • submits their own posts to editor • Subscriber
    14. 14. Posts vs. Pages • Posts • date-based • non-hierarchical • categorized and tagged • Pages • hierarchical
    15. 15. Custom Fields, Taxonomies, and Post Types
    16. 16. Custom Fields • Adding more information to posts • Default input vs. custom meta boxes • Examples: content audit notes • Custom Meta Boxes class on GitHub
    17. 17. Taxonomies • Extra sets of categories and tags • tags, people, locations, departments • People • Locations • Departments
    18. 18. Taxonomies • Default taxonomies • Categories • Post Tags • Menus • Link categories • Custom examples • People • Locations • Departments • Colleges
    19. 19. Custom Post Types • Default post types • Posts • Pages • Attachments • Revisions • Menu Items • Custom examples • Courses • Faculty profiles • Specimen inventory • Reference catalogue
    20. 20. Post Types • Things that are not • blog posts, news • pages, information about your office • Anything that needs to be catalogued and displayed separately
    21. 21. Course Post Type • Custom fields: arbitrary entry • professor name • email • phone • course code • Taxonomies: selecting items from a list • college • department
    22. 22. Feeds
    23. 23. Feed Clean URL Basic /feed /feed/atom Comments /comments/feed Category (slug: news) /category/news/feed Tag (slug: book) /tag/book/feed Multiple Tags (slugs: book, dvd) /tag/book+dvd/feed
    24. 24. Feed Clean URL Author (nickname: Joe) /author/joe/feed Post Type (slug: course) /feed/?post_type=course Taxonomy (genre: mystery) /genre/mystery/feed Search Term (wordpress) /feed/?s=wordpress
    25. 25. 5 Minute Installation! Unless your campus infrastructure sucks.
    26. 26. Basic Installation • Gather database information: name, username, password • Unzip files to server • View in browser • Fill in values • Pass Go, collect $200
    27. 27. Network Setup • Decide: subdirectories or subdomains? • Wildcard DNS is not required if you are not letting people sign up for new sites on their own. • Users already in the system can be added to the new site. • http://codex.wordpress.org/Create_A_N etwork
    28. 28. Domain Mapping • snoopy.wordpress.com -> snoopycorp.com • snoopy.webserver-1.school.edu -> snoopy.school.edu • WordPress MU Domain Mapping
    29. 29. Network Sites U of Foo Liberal Arts Science Business Agriculture Law
    30. 30. Network Domains U of Foo Liberal Arts Science Business Agriculture Law foo.edu law.foo.edu arts.foo.edu business.foo.edu science.foo.edu ag.foo.edu
    31. 31. Child Themes Parent Theme Law Child Theme Arts Child Theme Business Child Theme Science Child Theme Ag Child Theme
    32. 32. Campus Network Colleges Clubs Administration Blogs Sports
    33. 33. Break
    34. 34. Themes
    35. 35. Basic Theme Setup • styles.css and index.php • More specific files for each archive type: • Single post, page, or custom post type • Category and tag archives; custom taxonomies • Date-based archives (day, month, year) • functions.php turns on feature support; works like mini-plugin • header.php, footer.php, sidebar.php -- basic includes • comments.php
    36. 36. get_header() Loop while (have_posts()): the_post(); the_title(); the_content(); comments_template(); endwhile; get_sidebar() get_footer()
    37. 37. The Loop • while (have_posts()) ... endwhile; • Translation: • if the invisible query found posts, then for each post, print the following: • the_title(); • the_content(); • etc.
    38. 38. Have Posts? • What was requested? • What was returned? • How many posts were returned, and how many are displayed on this page? global $wp_query; var_dump( $wp_query );
    39. 39. How this comes together... • You click a category link on a post. • Based on your permalink structure, WordPress knows you are requesting a list of posts in that category. It queries the database. • It finds 53 posts. Your Reading setting says 20 per page. • WordPress assembles the first 20 posts' data, plus links to two more pages.
    40. 40. Which template? • Which theme file is used? • category-slug.php • category-id.php • category.php • archive.php • index.php • See Show Template plugin
    41. 41. Advanced Themes Page templates Conditional tags Multiple sidebars Widget areas Theme options Editor styles Tips: handling subcategories without tons of files conditional sidebars
    42. 42. Child Themes /* Theme Name: My Child Theme Description: A child of Parent Theme Version: 1.0 Author: Stephanie Leary Template: parent */ @import url(../parent/style.css); /* Overrides: */
    43. 43. Other Child Theme Files • If template is present in child theme, it will be used instead of parent theme’s file • BOTH functions.php files will be used
    44. 44. get_header() Loop while (have_posts()): the_post(); the_title(); the_content(); comments_template(); endwhile; get_sidebar() get_footer() Child theme contains sidebar.php
    45. 45. get_header() echo do_shortcode('[gallery]'); get_sidebar() get_footer() Child theme contains page template or loop template part
    46. 46. Theme Frameworks • A complete theme with many options • Page templates • Specific archives • Many widget areas • SEO features • custom fields for keywords • title filters • Genesis Google snippet preview • Can be overridden by child themes
    47. 47. Building a Theme 1.Craft your HTML structure 2.Drop in WordPress template tags • the_title() • the_content() • etc. 3.Move common elements into include templates • Header • Footer • Sidebars • Search form
    48. 48. Building a Theme 4.Create widget areas 5.Handle comments and comment forms 6.Don't forget 404.php!
    49. 49. Conditional Tags Conditional ID Slug Title Array Other is_single X X X X is_sticky X is_page X X is_page_template Filename is_category X X X X in_category X is_tag X X X
    50. 50. Conditional Tags is_home is_search is_day is_feed is_404 is_comments_ popup s_front_page is_time is_month is_attachment is_trackback is_active_ sid ebar is_archive is_date is_year is_singular is_preview is_admin comments_ o pen pings_open is_paged in_the_loop
    51. 51. Developing for WordPress
    52. 52. Hooks • Actions: places you can run your own functions • wp_head • wp_footer • Filters: things that can be altered with your own functions • the_title • the_content
    53. 53. Using Hooks
    54. 54. Excerpts for Pages function excerpts_for_pages() { add_post_type_support( 'page', 'excerpt' ); } add_action( 'init', 'excerpts_for_pages' );
    55. 55. [rules] function the_rules( $atts ) { return "These are the rules!"; } add_shortcode( 'rules', 'the_rules' );
    56. 56. Capital P, dangit! function capital_P_dangit( $text ) { return str_replace( 'Wordpress', 'WordPress', $text ); } add_filter( ‘the_content’, ‘capital_P_dangit’); add_filter( ‘the_title’, ‘capital_P_dangit’);
    57. 57. Admin Bar Link function linkme( $admin_bar ){ $admin_bar->add_menu( array( 'id' => 'my-item', 'title' => 'My Item', 'href' => '#', 'meta' => array( 'title' => __('My Item'), ), )); add_action( 'admin_bar_menu', ‘linkme', 100 );
    58. 58. Settings API • Register settings • form action=”options.php” • update_option(‘foo’, ‘new value’); • get_option(‘foo’);
    59. 59. Troubleshooting • define('WP_DEBUG', true); • Debug Bar plugin • View hooks • See Nacin on debugging WordPress
    60. 60. Evaluating Themes and Plugins • Search code for: • base64() • eval() • include(../../wp-config.php) • include(../../wp-load.php) • Does it use updated libraries? • wp_deregister_script( ‘jquery’ )
    61. 61. Evaluating Themes and Plugins • Are wp_head() and wp_footer() missing? • Does it insert links you can’t remove? • Does it pester you for commercial upgrades?
    62. 62. Writing Secure Themes and Plugins • Use the Settings API • Check user capabilities • Check nonces and referrers • Validate user input • Escape output
    63. 63. Developer References • Mark Jaquith’s WordCamp Phoenix presentation • Professional WordPress Plugin Development
    64. 64. Theme & Plugin Q&A ???
    65. 65. Performance and Security
    66. 66. Backing Up • WP DB Backup (single sites, database only) • Backup Buddy (network, database and files, $$)
    67. 67. Upgrading • Do it! (But back up first.) • If the FTP Settings screen appears, add direct file method to your config file. (See Codex page on wp-config.php.) • Upgrading via Subversion
    68. 68. Caching • WP Super Cache • W3 Total Cache • Hyper Cache • Batcache
    69. 69. Security Precautions • Make sure WP files are group-writeable, not world • directories: 644 or 664 • files: 755 or 775 • Set up permalinks and caching, then make .htaccess not writeable • Change admin username • Change database table prefix from wp_ • Create a database user other than root
    70. 70. Security Precautions • Move wp-config.php up one directory • Limit administrators • Use Members to create less privileged roles • Prevent bogus login attempts with Login Lockdown • Run WP Security Scan and Exploit Scanner • Monitor filesystem with File Monitor Plus
    71. 71. More With WordPress
    72. 72. BuddyPress Social Network Layer
    73. 73. BuddyPress • Campus wide social network • Company-wide internal communication tool • Niche social network for interest topic
    74. 74. BuddyPress Plugins • Welcome Pack • Achievements • BuddyPress Share It • Group Suggest Widget • Simple Google Map Plugin
    75. 75. ScholarPress A Learning Management System for BuddyPress
    76. 76. Content Audit "Now we’re talking real CMS capability!"
    77. 77. The WordPress Community
    78. 78. Development Philosophy • 2.9, 3.0, 3.1, 3.5 are all major releases. • 3.3.1 is a bugfix and security update. • Old releases do not get security updates. • Core developers set feature agenda for major releases based on Trac tickets, known problems, and user surveys.
    79. 79. Development Philosophy • Development schedule kept on make.wordpress.org/core. • Meetings once a week in #wordpress- dev. • If it can be covered by a plugin, let it. Core is for features most people need, or frameworks developers can build on. • If you want it fixed sooner, patch it yourself.
    80. 80. Documentation • Codex • Forum • WP StackExchange • Trac • Developers’ blogs
    81. 81. Support • Active user forums on wordpress.org • Individual plugin & theme developers • Groups on LinkedIn • huge Twitter population • IRC channels
    82. 82. Support • VIP Automattic (core creators) • Third party vendors such as MUSupport.net • Core developers are also consultants • WP-only hosts • WP Engine • Page.ly • Sucuri.net security specialists
    83. 83. Discussion IRC channels • #wordpress • #wordpress-dev • #buddypress • #bbpress Mailing Lists • WP-Hackers • WP-Edu wp-edu.org Development blogs • make/core • make/ui • make/themes • make/accessibility • make/wppolyglots
    84. 84. News Events WordCamps • San Francisco • New York • local: central.wordcamp.org • WP Candy • Planet WordPress • wpMail.me • wpBeginner • wpTuts
    85. 85. Making the Case for WordPress
    86. 86. LAMP vs. IIS 7 • mod_rewrite • .htaccess • PHP-FPM • Postfix • URL Rewrite 1.1 • PHP running as FastCGI Nginx
    87. 87. Open Source vs. Commercial Open Source Low or no initial budget outlay Premium support options available Variety of custom development options -------------------------------- Shelley launched in 2009 with $2k Commercial High startup costs Enterprise support contracts available Often contracted to the CMS company for customization ------------------------------- Texas 2yr launching OmniUpdate this year:
    88. 88. Importing • Many importers other than built-in list • Writing your own MySQL-based import • HTML Import • Merging single installs into networks
    89. 89. Q&A
    90. 90. Demos? • Network administration • Plugins • BuddyPress • Content Audit • HTML Import
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×