Lee Pham
I'm a Vietnamese guy who loves all technology stuff and web. Follow my Twitter to get in touch with me.
  • Code
    Guide to Creating Your Own WordPress Editor ButtonsGuide to creating your own wordpress editor buttons
    Most likely you know that WordPress is bundled with the HTML WYSIWYG editor, TinyMCE. The variety of features, and the ability to be extended though plugins, make it the most used WYSIWYG editor in the world. WordPress doesn't make use of all its features, however. WordPress customizes it and only keeps parts which are really helpful to users, avoiding messing up the user interface. That also means some features, buttons for example, have been hidden from users. You can totally enable the hidden MCE buttons. Typically they are stylesheet, sub, sup buttons. If even the hidden ones still don't satisfy your needs, then you have to create a TinyMCE plugin to do add your own. In this tutorial, I will walk you through the basics of adding your WordPress Editor buttons by creating a TinyMCE plugin.Read More…
  • Code
    Integrating the WP Media Uploader Into Your Theme With jQueryIntegrating the wp media uploader into your theme with jquery
    A while ago, we had a tutorial showing how to integrate the WordPress Media Uploader in Theme and Plugin Options. Based on this idea, we'll develop another version of it by changing something in JavaScript (basically, the core PHP code is almost same as the old one). In short, we will take advantage of jQuery to create a tiny jQuery plugin to meet our purpose instead.Read More…
  • Code
    Digging Into the Theme Customizer: Practicing IIDigging into theme customizer part 4 practicing2
    In the previous post, we examined the Theme Customizer's component in actions. In this part, I would like to show you three additional things that I see as important for you about Sanitization, Transport, and some Extended components in the Theme Customizer. Before reading this, I recommend that you review the previous articles in this series.Read More…
  • Code
    Digging Into the Theme Customizer: Practicing IDigging into theme customizer part 3 practicing i1
    After going through previous posts in this series, I presume that you understand the Theme Customizer components and how to add, remove, and configure them. It seems there are many things to figure out, and it will be a good exercise to put into action everything we've learned. In this post, I will cover some of the most important things about the Theme Customizer through several examples. This should result in greater understanding of the features as opposed to simply reading an article that doesn't include any code.Read More…
  • Code
    Digging Into the Theme Customizer: ComponentsDigging into theme customizer part 2 components
    In the first part of this series, I introduced the Theme Customizer feature, and showed the reasons why it is useful. We already know that the Theme Customizer has 4 main components: Settings, Sections, Controls and the one which controls the others is the Manager who's important variable is $wp_customize. We also know the way to invoke this variable for using later. In this tutorial, I plan to go deeply into these components, figure out their properties and how to register or remove components and the way to configure them as you want.Read More…
  • Code
    Digging Into the Theme Customizer: OverviewDigging into theme customizer part 1 overview
    In version 3.4, beside improving current features, WordPress released a very cool new feature. It's a really useful tool that makes it easier for a user to configure and customize their website. That is the Theme Customizer. So what is the Theme Customizer, what can it do, and how to customize it? In this series, I'm going to walk you through understanding its components and tasks deeply. Once we're done, you can totally customize it by yourself.Read More…
  • Code
    Making the WordPress Editor Look Pretty Using CodeMirrorPreview
    WordPress contains two built-in editors that allow you to edit theme files directly from within the browser, they the Theme Editor and Plugin Editor. By default, the editor looks very simple, and hard to edit because the colors are totally black and grey. In this tutorial, I will show you how to integrate CodeMirror.js into the editors to make the look prettier. Our code snippets will be highlighted with more color, the editors will even have line numbers, and more.Read More…
  • Code
    Modifying Custom Background Feature for Any HTML Element You WantPreview
    In the recent new WordPress version, WordPress has added some new features such as Custom Background, Custom Header, etc, you can see this in action in the Twenty Eleven theme. The Custom Background will add a CSS snippet that effects the <body> element's background, what if you only want this feature to effect another element you specify? Maybe the <header>, <content>, or <footer> elements or another HTML tag.Read More…
  • Code
    Creating a Simple Backup/Restore Settings FeatureBackuprestore
    Options are the most important data in WordPress, they store various configuration settings (see more). They're also contained in the database like other important data such as posts, pages, etc. Day by day, these options can be changed by WordPress itself or users. So how to configure them back to a previous state without memorizing each exact value?Read More…