Linux 软件免费装

Child Themes Helper

开发者 paulswarthout
更新时间 2023年9月14日 04:33
捐献地址: 去捐款
PHP版本: 5.6.31 及以上
WordPress版本: 5.4.1
版权: GPLv2 or later
版权网址: 版权信息

标签

theme developers child child themes child theme child themes helper template theme parent theme IIS Linux copy files to child theme create a child theme

下载

1.2 2.1.1 2.2

详情介绍:

  1. The Child Themes Helper is a tool.... ...developed for those child theme developers who write or modify PHP code in the development of their child themes. Previous versions of the Child Themes Helper required the child theme being modified be the activated theme. That is no longer the case. However, you will still need to set a child theme to be an "Active Theme" on the Options tab, but it does not have to be the activated theme.
  2. Copy files from Parent Theme to Child Theme The primary purpose of the Child Themes Helper plugin is to copy files from a parent theme (also called the template theme) to a child theme. The folder path in the parent theme is duplicated in the child theme during the copy.
  3. Edit Child Theme Files Starting with the Child Themes Helper version 2.1, you can now edit your child theme files and save the changes. You can also "edit" your parent theme files, but they are marked read-only and you will not be able to save any changes that you make. This is not meant to be the primary method of editing your files, but rather a way to make a quick change or to peer inside of a file without having to go elsewhere to make a quick change.
  4. Remove files from the Child Theme The Child Themes Helper plugin will also remove any files that you no longer want in the child theme. Any folders that are made empty by the removal of a file or folder, will also be removed.
  5. Prompt before removal The Child Themes Helper plugin will detect when a child theme file is different from its parent theme counterpart. If the files are not identical, the user will be prompted before allowing a parent theme file to be copied over an existing child theme file, or before allowing a child theme file to be removed.
  6. Create a child theme The primary functionality of the Child Themes Helper plugin requires the existence of a child theme. If a child theme has not already been created, this plugin will help you to create a child theme of any of the currently installed themes (not other child themes) on the website.
  7. Generate a temporary graphic for the Themes page Creating a child theme does not create a graphic for your new theme on the WordPress themes page. The Child Themes Helper plugin can create a graphic for your child theme. You're free to select the foreground and background colors for that graphic and choose from up to a couple of dozen Google Fonts. If you would like a different font, you only need to copy the .ttf file into the Child Themes Helper plugin's assets/fonts folder. The next time you open the Options page, the newly downloaded font will be displayed with a sample string.
  8. Notes
  9. Troubleshooting Installation Issues If you are upgrading the Child Themes Helper from a version prior to version 2.0, you might have problems installing the upgrade. The most frequent problem is that the upgrade fails and displays a nasty message at the top of the plugins page. WordPress then politely deactivates the Child Themes Helper plugin. If you experience this problem, the solution is to: deactivate the plugin if it isn't already deactivated. Delete the plugin. And then reinstall the Child Themes Helper directly from the WordPress plugins repository.
New with Child Themes Helper v2.0, the primary folder name ("~/plugins/pasChildThemes) and the primary file name (pasChildThemes.php) were changed to (~/plugins/child-themes-helper) and (child-themes-helper.php) to make the plugin match the WordPress assigned slug. Under certain circumstances, probably due to either browser caching or website caching, this causes the upgrade to fail. - PHP Developer Tool The Child Themes Helper is meant as a PHP developer's tool to help the WordPress PHP developer make direct changes to a child theme's PHP code. It is NOT a GUI, drag -n- drop tool to help non-developers build a child theme. - Child Themes Helper on GitHub The GitHub repository for this plugin can be found here. Stable versions are usually found on the WordPress SVN repository. Intermediate versions are often found on GitHub. - Child Themes Helper access The Child Themes Helper is accessed from the WordPress dashboard under the heading "Child Themes Helper". The menu item may be found immediately below the Appearance Dashboard menu item. - Platform Support The Child Themes Helper was developed on Microsoft IIS 10 and tested on both Windows' and Linux -based web servers. - If you like the Child Themes Helper plugin, please consider writing a review here. Thank you. - Development versions Versions 2.1, 1.2 are available for download and install. - Screenshot The temporary graphic is referred to as the ScreenShot because the filename is "screenshot.png" and is located in the root folder of your theme. The filename and the location are defined by the WordPress core and cannot be changed by this (or any) plugin. Your browser will cache the screenshot file whenever possible. If you modify the ScreenShot graphic and you do not see any changes when you generate a new one, then you will need to clear your browser's image and file cache. If you generate a screenshot graphic and you only see the background (i.e., no words), just generate the screenshot again. This happens when the selected font does not exist in the assets/fonts folder of the Child Themes Helper plugin. If you are updating from version 1.0, you will see this happen the first time that you generate a screenshot since the original fonts were deleted and replaced by Google Fonts. Most developers will replace this generated screenshot file with a graphic of their own. This feature is meant to provide a temporary graphic that quickly and easily identifies the child theme name and its parent theme. In a future release, there will be a lock feature on the options page to prevent accidental overwrites of the screenshot file. Also, in a future release, there will be the ability to select an existing graphic and crop it as necessary, instead of generating one. - Known Bug Although the Child Themes Helper plugin is mostly responsive, the Edit File functionality doesn't work very well on small screens. But does anybody actually modify themes on smartphones and tablets? (Please say 'No').

安装:

屏幕截图:

  • If you don't already have a Child Theme, you can click the Create Child Theme tab at the top and create one.
  • Once you have created a child theme, the first dialog will list the installed themes plus your new child theme. Click the large radio button to select your child theme. Note: this does NOT activate your child theme.
  • If your screen is wide enough, you will see the child theme files listed on the left and the parent theme files listed on the right. If you are using a mobile device or a tablet that is not wide enough, then you will only see the child theme files list or the parent theme files list, and a button where you can switch back and forth.
  • Right click on a file in either the child theme files or the parent theme files to open a popup menu. On the child theme files list, you will see the ability to remove a file from the child theme or edit the file. On the parent theme files list, you will see the ability to copy the file to the child theme or view the contents of the file.
  • Choosing Edit Child Theme file will let you open the file in a simple editor.
  • After copying the footer.php file from the parent theme to the child theme, we have opened it in the simple editor.
  • The Screenshot tab lets you create a temporary graphic that will display on the Dashboard >> Appearance >> Themes page for your child theme. Most developers will replace this image during their child theme development, but it makes a nice placeholder in the meantime.
  • You can change the font, the text color, and the background color of your temporary graphic. You can add fonts to the plugin's ~/assets/fonts folder and they will be automatically available. Click the Generate Screenshot button and a window will open with a copy of your new temporary graphic. Go to the website's themes page to see it as it was intended to be used.

升级注意事项:

1.1.3
  • Fixed a bug: The path to the child theme's stylesheet in the functions.php was incorrect.
  • If you only use the Child Themes Helper for its primary purpose of copying files from the parent theme to a child theme, then this change will not effect you and there is no reason to update at this time.
  • However, if you plan on creating a new child theme with this plugin, then you should update this plugin first.

常见问题:

Do I have to keep the Child Themes Helper installed and/or activated?

No. You should at least deactivate all plugins and themes that you are not using. That will decrease your website's load times. The Child Themes Helper leaves nothing behind that is required for you to be able to use your child themes or temporary graphics files. Feel free to uninstall it and/or deactivate it once you've completed your child theme.

What is next?

I am glad you asked.

  • A pro version that encompasses even more features like:
  • The ability to copy multiple files and/or folders at once, instead of a single file at a time.
  • The ability to make a modified non-child theme into a child theme of itself.
  • Some kind of feature to make stylesheets more manageable. Something to help the relative newcomers understand what they're changing and why, and more importantly, what to change.

Where I can see the Child Themes Helper in action?

I am glad you asked. Starting with version 1.2 (version 2.2 is not yet installed on that page), you can visit my demo page and take it for a test drive. Create your own child theme. Copy files to the newly created child theme. Generate screenshots. Change the Screenshot options. In short, put it through its paces. And don't worry about screwing up the website. It's there for that purpose.

I generated a screenshot but it didn't change. Why not?

You did nothing wrong. Your browser will cache the screenshot file to help your website to load more quickly. The solution is to clear your browser's image cache. Here's a good article that I found that gives great directions on how to accomplish that.

Why create a screenshot? I'm just going to delete it later anyway.

I hate the fact that nothing appears as a graphic in a newly created child theme. It just bugs me. So I thought I'd do something about it. But most of all, it was a learning experience. I got to learn about CSS grids, and the GD graphics library, and handling fonts.

更新日志:

2.2 2.1.1 2.0 1.3.2 1.2 1.2 1.1.3 1.1.2 1.1.1 1.1
  1. Updated the ScreenShot Options page
  2. Graphic size options have been removed.
  3. Changing the background and/or foreground colors of the graphic will now display a color picker. If you already know the hex code for the color you want, you can directly enter it in the space provided on the color picker. If you know the decimal values for each of the colors, you can enter that in the spaces provided. Otherwise, you can just move the sliders to create your new color code.
  4. The font selection dropdown list now provides a sample of each font to the right of the name of the font.
  5. Fonts are easy to add or remove. Visit the plugin's assets/fonts folder and remove any fonts that you do not want as an option or add the .ttf file for any
The fonts dropdown list, now provides a sample of each font. The font samples are generated on the fly. If you copy a new font into the assets/fonts folder, that sample will be created and added to the drop down list immediately. One caveat: if you remove the font that is specified as the selected font, the first time you generate a screenshot, the wording will be blank. Just regenerate it and it will work. 2. Replaced screenshot fonts - Removed the existing fonts and replaced with a subset of the Google Fonts. 3. Bug Fixes - Fixed a bug where the style.css header block wasn't getting populated correctly. 1.0