WordPress / Learn

WordPress.org Learn - The canonical source for the code and content behind https://learn.WordPress.org
277 stars 101 forks source link

What to Include in Functions.php - Lesson Plan #400

Closed courtneyr-dev closed 2 years ago

courtneyr-dev commented 2 years ago

In this lesson you will learn that WordPress themes often include a file named functions.php, which is where unique features and custom functions can be added. When should you use functions.php to add your custom code and when should you use plugins? This lesson will help you understand the difference between the two.

After completing this lesson, you will be able to:

https://github.com/wptrainingteam/what-to-include-in-functions-dot-php-file

https://learn.wordpress.org/lesson-plan/what-to-include-in-functions-dot-php-file/

https://make.wordpress.org/training/handbook/theme-school/what-to-include-in-functions-php/

Topic Description

Write a description of the topic here.

Related Resources

Links to related content on Learn, HelpHub, DevHub, GitHub Gutenberg Issues, DevNotes, etc.

Guidelines

Review the team guidelines (https://make.wordpress.org/training/handbook/guidelines/)

Development Checklist:

Repo Structure and Lesson Plan Template

Please remove all blockquote comments such as this before publishing.

Description

A short paragraph explaining what is covered in the lesson plan. This should be text that can be copied and used in a meetup or workshop description.

Objectives

After completing this lesson, participants will be able to:

It’s required that you include a bulleted list of objective(s) for each lesson plan. Objectives should be worded as actions that the participant can do once they’ve finished. See Bloom's Taxonomy of Action Verbs (PDF) as a reference. Avoid using words like "know," "understand," "be introduced to," etc. There should be one assement item for each objective (see below).

Target Audience

Who is this lesson intended for? What interests/skills would they bring? Put an "x" in the brackets for all that apply.

Experience Level

How much experience would a participant need to get the most from this lesson? Put an "x" in the brackets for all that apply.

Type of Instruction

Which strategies will be used for this lesson plan? Put an "x" in the brackets for all that apply.

Time Estimate (Duration)

How long will it take to present this lesson? Put an "x" in the brackets for the one that applies.

Prerequisite Skills

Participants will get the most from this lesson if they have familiarity with:

For example:

  • Experience with HTML and CSS
  • Completed the Basic WordPress Concepts lesson

Readiness Questions

A list of questions for participants to see if they have the background and skills necessary to learn and understand the lesson.

For example:

  • Do you want to makes changes to your theme yourself?
  • Do you know how to write CSS?

Slides

Change the /repo-name/ in the link to match the URL name of this repo.

Materials Needed

A list of files, resources, equipment, or other materials the presenter will need for the lesson.

For example:

  • A local install of WordPress
  • The files for the TwentySixteen theme

Notes for the Presenter

A list of any handy tips or other information for the presenter.

For example:

  • Participants may need to download the TwentySixteen theme before beginning
  • What to do if there’s no projector or internet available
  • What to do if a participant doesn’t have the necessary set up
  • How to handle different opinions about the topic

Lesson Outline

The plan for the lesson. Outline form works well.

For example:

  • Talk about what a theme is
  • Demonstrate how to install and activate a theme
  • Practice exercises to have participants find and install a theme on their own site

Exercises

Exercise name

Short description of what the exercise does and what skills or knowledge it reinforces.

These are short or specific activities that help participants practice certain components of the lesson. They should not be fully scripted exercises, but rather something that participants could do on their own. For example, you can create an exercise based on one step of the Example Lesson.

Assessment

There should be one assement item (or more) for each objective listed above. Each assessment item should support an objective; there should be none that don't.

Write out the question.

  1. Option
  2. Option
  3. Option
  4. Option

Answer: 3. Correct answer

A few questions to ask participants to evaluate their retention of the material presented. They should be a measure of whether the objectives were reached. Consider having a question for each objective.

Additional Resources

An optional section which can contain a list of resources that the presenter can use to get more information on the topic.

For example:

  • Link to information on the Codex
  • Theme Review Team's Handbook

Example Lesson

An example of how the lesson plan can be implemented. Written in script form as one possible way an presenter might use this lesson plan at an event, with screenshots and instructions if necessary.

Section Heading for Example Lesson

You will likely need to break the Example Lesson down into multiple sections.

Lesson Wrap Up

Follow with the Exercises and Assessment outlined above.

jonathanbossenger commented 2 years ago

I'd like to tackle this Lesson Plan update. Could someone assign me to the ticket please?

jonathanbossenger commented 2 years ago

Adding some links here for myself for when I work on updating the lesson plan

jonathanbossenger commented 2 years ago

Unfortunately, I took this on too late to get it done in March, I'll continue to work on this for April.

azhiya commented 2 years ago

@jonathanbossenger I'm going to move this to the "Drafts in Progress"

jonathanbossenger commented 2 years ago

Thanks, @azhiya.

Once I have completed an updated version to be reviewed, do I just pop it in the Slack channel and ask for a review?

azhiya commented 2 years ago

For now yes, please. Highlight the lesson plan on this GitHub issue and drop the GitHub link in Slack all the comments can be captured on the card.

We are working on a solution to ping team members so that all you have to do is ping them on the card.

Thanks.

jonathanbossenger commented 2 years ago

No problem, thanks @azhiya

jonathanbossenger commented 2 years ago

Updated Lesson Plan https://learn.wordpress.org/wp-admin/post.php?post=15170&action=edit

azhiya commented 2 years ago

Found a ready for review label, might help us with tracking what is ready to be reviewed.

jonathanbossenger commented 2 years ago

@azhiya very handy. Could I ask you to remove it from this issue, for now. I pasted the link more as a reminder to myself, I still want to review it against the style guide, before sending it out for review.

jonathanbossenger commented 2 years ago

Thanks for your patience @azhiya, could I ask you to add the label back, then I'll share it in Slack for review. Thanks

webtechpooja commented 2 years ago

Thanks, @jonathanbossenger for working on it.

At the first glance, seems it is not following the current Lesson plan format. Could you please check and compare it.

Here are some points, I would like to highlight: For example, in this lesson plan, there is a screening Question section and now we are using Readiness Questions instead of it.

Assets -> Materials Needed Screening Questions -> Readiness Questions Teacher Notes -> Notes for the Presenter Quiz -> Assessment

A hands-on Walkthrough could be included in the exercise section.

And lastly, it would be excellent if we include the Lesson outline and an example lesson.

Hope this will be helpful.

jonathanbossenger commented 2 years ago

Thanks for the feedback @webtechpooja when I worked on this I was still getting used to the lesson plan format, so it's very possible I missed a few things 🙈

I'll be sure to update it accordingly and send it back out for review once it's ready.

jonathanbossenger commented 2 years ago

@webtechpooja could I confirm which is the correct document for the Lesson plan format?

I am working on this document https://make.wordpress.org/training/getting-started/lesson-style-guide/, which I found here https://make.wordpress.org/training/handbook/lesson-plans/how-to-conduct-an-instructional-review/.

However it seems you are referring to a different document, so I'd like to make sure I follow that, and that the handbook is updated to the correct document.

Thanks

EDIT: I think I've just realized that the new plan is included in the template for the issue. I'll work on that, and also get the document updated in the handbook.

jonathanbossenger commented 2 years ago

@azhiya @webtechpooja I've had to delete my original updated lesson plan to create a new one, based on the lesson plan reusable block that's available from the block editor on the site.

This follows the updated lesson plan style guide and is ready to be reviewed.

https://learn.wordpress.org/wp-admin/post.php?post=18590&action=edit

azhiya commented 2 years ago

@webtechpooja do you want to check this again?

webtechpooja commented 2 years ago

@jonathanbossenger Looks good to me.

jonathanbossenger commented 2 years ago

Awesome, thank you @webtechpooja

jonathanbossenger commented 2 years ago

@azhiya are you happy for me to go ahead and publish this update?

azhiya commented 2 years ago

Yes please @jonathanbossenger, sorry for the delayed response.

jonathanbossenger commented 2 years ago

No problem, thanks @azhiya

The lesson plan has been updated https://learn.wordpress.org/lesson-plan/what-to-include-in-functions-dot-php-file/