Coding Blocks

描述

NOTE: THIS PLUGIN DOES NOT AND WILL NEVER EXECUTE ANY TYPE OF CODE ON YOUR WORDPRESS SITE!

This PLUGIN can be seen as an extension of Google Prettify made Available for WordPress.
Users can now embed code snippets in their wordpress posts making use of Google prettify.
You get to choose from a wide-range of programming languages and a wide-range of themes including sunburst.

This Plugin relies on 3rd party services under these circumstances;

  1. Copy function – This will enable you copy the shortcodes to your codesnippets
  2. Icons – This will enable us render icons on the plugin Admin’s page and on Frontend
  3. Styling your Code Box – This will make your code snippets to be attractive

The 3rd party services are listed below;

  1. ClipboardJs – https://clipboardjs.com/
  2. FontAwesome – http://fontawesome.io/
  3. Google Prettify – https://github.com/googlearchive/code-prettify/
  4. Google Prettify Color Themes – https://jmblog.github.io/color-themes-for-google-code-prettify/

You can find both their Terms of Use and privacy policy on their official sites above.

HOW TO USE

INSERT CODE SNIPPET

  1. Head Over to Insert Code page to Add a New Code Snippet.
  2. On the page, add a title for the new snippet.
  3. Select the Language you’re working with.
  4. Type in the code in the code box and when you’re done, click on Preview.
  5. Click on Save to save your code snippet.

NOTE: YOUR CODE SNIPPETS ARE STORED AS PLAIN TEXT TO PREVENT ITS EXECUTION

CONFIGURE CODE SNIPPET

  1. Head Over to Configure Code tab to Modify An Already Existing Code Snippet.
  2. On the page, you can change the title for the snippet.
  3. Change the Language you’re working with.
  4. Modify the code in the code box and when you’re done, click on Update.

NOTE: THIS UPDATE WILL ENCODE AND STORE YOUR CODE SNIPPETS AS PLAIN TEXT TO PREVENT ITS EXECUTION

  1. Click on Copy button at the right to Copy the shortcode for the snippet.
  2. In any of your posts, place the copied shortcode, save the post and click on preview to see the MAGIC.
  3. You can also Delete the snippet or perform some bulk actions on it.

螢幕截圖

  • This is the Screenshot of the Insert Page, where you can add a New Code Snippet, preview it and save it when you're done.
  • This is the Screenshot of the Configuration Page, where you can copy the shortcode to your Code snippet, Modify the code snippet (Change the code, activate or de-activate it) or Delete the Code snippet.
  • This is the Screenshot of the Code snippet in a Wordpress Post.
  • This is a Screenshot of the preview page.

安裝

  1. Upload coding-blocks to the /wp-content/plugins/ directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
  3. Head Over to Get Started to learn How to add your first code snippet.

常見問題

How does the plugin work?

Install it, head over to Insert tab and add a new title for the code snippet, select a language for the snippet, type in the code in the code box, click on preview and if you are okay with it, click on save to save your snippet.

評價

There are no reviews for this plugin.

貢獻者及開發者

“Coding Blocks” 是一個開源的軟體。以下的人對這個外掛作出了貢獻。

貢獻者

將 Coding Blocks 外掛本地化為台灣繁體中文版。

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

修改日誌

1.0.2

  1. It supports up to 44 Languages.
  2. It supports up to 34 Color Themes.
  3. We Added Settings Page. (More description in Changelog file).
  4. We Added Preview Page. (More description in Changelog file).
  5. We Removed Code Labels on code blocks (In re-development process).
  6. We Redesigned Admin UI.
  7. Block Sync Now Available (You can update all your code snippets with one tap to reflect your current plugin settings)

1.0.0

  1. It supports just 6 Languages.
  2. It has Just one default theme which is Sunburst Google prettify + night glory.
  3. A brief description of your code snippet is attached at the header section.
  4. A copy button is attached to each of your code snippet.