Make WordPress Themes

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#21264 closed theme (not-approved)

THEME: Casper - 1.1.1

Reported by: gojukebox Owned by: Frank Klein
Priority: theme update Keywords: theme-casper
Cc: gojukebox@…


Casper - 1.1.1

A Ghost-like WordPress theme. Casper (for WordPress) is a simple yet beautiful theme for bloggers. Inspired by the Ghost blogging platform, Casper is a WordPress port of the default theme by the same name. The goal of this project is to emulate the gorgeous theme while taking advantage of features exclusive to the WordPress framework. There are plenty of customization options included, accessible through the WordPress Customizer. Already included are hooks to serve responsive images appropriately and media queries to provide a fast and seamless experience from desktop to mobile. For questions, support, development instructions, or to contribute to the project visit https://github.com/lacymorrow/casper-wp

Theme URL - https://github.com/lacymorrow/casper-wp
Author URL - http://lacymorrow.com

SVN - https://themes.svn.wordpress.org/casper/1.1.1
ZIP - https://wordpress.org/themes/download/casper.1.1.1.zip?nostats=1

Diff with previous version: https://themes.trac.wordpress.org/changeset?old_path=/casper/1.1.0&new_path=/casper/1.1.1


Ticket Summary Status Resolution Owner
#2108 THEME: Casper Mobile - 1.0 closed not-approved chipbennett
#2118 THEME: Casper Mobile - 1.1 closed not-approved cais
#17462 THEME: Casper - 1.0.1 closed not-approved cyberchimpscode
#18498 THEME: Casper - 1.0.9 closed not-approved catchthemes
#19527 THEME: Casper - 1.0.12 closed live emiluzelac
#20188 THEME: Casper - 1.0.14 closed live jacenty3590
#20216 THEME: Casper - 1.0.15 closed live karmatosed
#20254 THEME: Casper - 1.0.16 closed live jcastaneda
#20569 THEME: Casper - 1.0.17 closed live karmatosed
#20657 THEME: Casper - 1.1.0 closed live jcastaneda
#21264 THEME: Casper - 1.1.1 closed not-approved Frank Klein

(this ticket)

#21782 THEME: Casper - 1.1.2 closed live karmatosed
#21812 THEME: Casper - 1.1.3 closed live karmatosed
#26082 THEME: Casper – 1.1.4 closed live bravokeyl
#27986 THEME: Casper – 1.1.5 closed live karmatosed


Change History (10)

#1 @Frank Klein
3 years ago

  • Owner set to Frank Klein
  • Status changed from new to reviewing

#2 @Frank Klein
3 years ago


  • Every add_setting() call in the Customizer needs to have a sanitization callback.
  • You need to remove the Child Theme packaged with the theme.
  • You need to escaped the values provided by the calls to get_theme_mod() before output. Look in functions.php and footer.php.
  • All Javascript functions living in the global namespace need to be prefixed, see main.js.
  • I only mark this as recommended because there seems to be no guideline clearly stating this: options that allow users to enter arbitrary HTML, like for example the footer option, should only be available to users that have the unfiltered_html capability. See http://codex.wordpress.org/Roles_and_Capabilities#unfiltered_html
  • casper_add_editor_styles() should be hooked to after_setup_theme.
  • The Custom Header preview in the admin under Appearance > Header does not correspond to the front end.
  • The theme is not marked as translation-ready, so this is not a requirement. But themes that are internationalized should enqueue fonts in a way that allows them to do be dequeued by translators, see http://themeshaper.com/2014/08/13/how-to-add-google-fonts-to-wordpress-themes/.

#3 @gojukebox
3 years ago

Thanks you for review and the detailed instructions. I'll fix the recommended and required and resubmit.

I did want to ask the reasoning behind not allowing me to package a child theme with the theme. Many of my users have requested it

#4 @Frank Klein
3 years ago

There isn't a precise guideline that forbids packaging a child theme with a theme. But I think that is mostly because everybody agrees that a theme folder should only contain one theme.

I agree with your that listening to user feedback is important, but their suggestions are not always good ones. I consider the idea of having a sample child theme interesting, just the delivery mechanism is not the right one.

There are many other ways for you to offer a quick way for your users to download a sample child theme. You could place a link in the readme file or offer information about the child theme on the theme's website for example.

#5 @gojukebox
3 years ago

Understandable, I would like to argue that the child theme _should_ be in close relation to the theme. Based on feedback, it seems like a large number of my users are making changes to the theme (around 40%) and would greatly benefit from using a child theme; Many are not aware of the capability/existence of child themes. By packaging the theme and the child theme together, and properly formatting them, I'm able to provide a one-step install process of the child theme, without any extra download/upload process, and allow them to begin making changes as quickly as possible. *This is important.*

However trivial, many users are deterred by the extra steps of learning about, locating, downloading, installing child themes. By including it in the theme I can provide detailed theme editing instructions without getting caught up on the requirements behind the child theme. If it were a generic child theme I would understand keeping the two separate, but this is a child theme that is *directly* related to the parent and I believe they should be attached. I don't like the idea of a separate download link, users won't see/use the link, will be deterred by extra steps, and will eventually give up/use another theme.

The ease-of-use is imperative, especially for a highly-modified theme like this one, and including the child theme does not detract from the parent theme, only makes using it easier.

I would like to hear your what you think would be the best distribution method and if we could make an exception for casper; after a lot of thought I still believe that packaging the child and parent together make the most sense for packaging/use.

#6 @Frank Klein
3 years ago

I agree with you that proper customization of themes is important. But this is an issue related to user education and packaging the child theme along with the parent does not solve this problem.

Users would have to FTP into their server, move the child theme out of the parent's folder and then start editing the files. These are the hardest steps for users, not creating the theme.

When they know enough to hack the parent or make the bundled child theme work, then they have overcome the biggest hurdle for customization.

I think that you don't give your users enough credit. When you explain things well, they will learn them. You should have documentation on the theme's website about child theming, blog about it, explain it in the readme, you can even add a link to the tutorial in the description AFAIK.

Also child theming is not the only option. Users can install Jetpack and use the Custom CSS module or any other plugin offering a similar functionality.

I'm not making the guidelines here, just following them. In my interpretation, you cannot bundle a theme within a theme, so I won't grant and cannot grant you an exception here.

If you disagree with my assessment, feel free to bring it up on the mailing list or join us in Slack and we can discuss further with more parties involved.

#7 @gojukebox
3 years ago

Understandable, I appreciate you taking the time to explain yourself and I really appreciate the recommendations to the theme. Could you help me with two things:

  1. How can I properly sanitize a checkbox in the wp customizer?
  1. What JS functions do I have living in the global namespace?
  • I am using one plugin but it seems terrible practice to rename a common plugin function

#8 @Frank Klein
3 years ago

  1. Checkboxes, like radio buttons and selects only offer choices to the user known by the developer. So you can leverage this fact by using a whitelisting approach for sanitization. Basically what you is you verify whether the value you get from the setting is part of the choices you gave the user. If yes, you save it, it not you fallback to a default. You can use in_array() with the $strict parameter set to true to do the verification.
  2. In main.js, there is the makeImagesResponsive() function. This is a function declaration in the global namespace, so the some rules apply as for PHP. The fact that this is a plugin doesn't unfortunately change the fact that this needs to be prefixed. When you ship third party code with your theme, you are taking the responsibility on yourself to make it compatible with the guidelines. A search an replace should fix this quickly.

#9 @Frank Klein
3 years ago

  • Resolution set to not-approved
  • Status changed from reviewing to closed

No activity in 7 days, closing.

#10 @gojukebox
3 years ago

Hi Frank,
Please reopen this, I've sent you multiple emails with questions regarding some of the changes. I apologize if I should have made those requests through this site, I can re-post if necessary.

As always, I really appreciate your time and effort with WP.org, cheers!

Note: See TracTickets for help on using tickets.