Category: Plugins

  • Change the “Enter title here” placeholder text to make it fit your content

    Change the “Enter title here” placeholder text to make it fit your content

    When you’re working with custom post types, sometimes the post title isn’t a title. It might be a person’s name, a building number, or a course code (just to take a few examples from universities). So it’s great that WordPress has a simple filter that makes it easy to customize the “Enter title here” placeholder text to make it fit your content:

    https://gist.github.com/patilswapnilv/5cffbf8396e3d2e86b4f77a1f3f1232f

    How to use this?

    Place this code in your functions.php or in a plugin or even better if you can add it to a must-have plugin.

  • How to submit plugin to WordPress plugin repository

    How to submit plugin to WordPress plugin repository

    So you made an interesting WordPress plugin, and you want that to be available for others to use. Though GitHub is really nice to share code, when it comes to WordPress, nothing beats the WordPress.org plugin and theme repository.

    Why Publish Your WordPress Plugin?

    The reasons people publish plugins in the WordPress Plugin Directory are obviously varied. A couple of examples are explained below:

    • You see a need for functionality that doesn’t exist in a plugin in the directory
    • You see a market opportunity
    • You want to build a community around your plugin
    • Your favorite plugin doesn’t offer additional functionality that you want
    • You’re frustrated by how much some plugins charge for extra extensions and you think you could build those features at a lower cost
    • You want to simplify functionality in a way that doesn’t exist
    • You want to contribute to the WordPress Plugin Directory in order to be a part of the community

    Today, I am trying to explain how you can submit your plugin/s to the WordPress.org repository.

    The plugin Submission process:

    I am breaking down the process into smaller steps for ease;

    The Guidelines.

    Make sure you read the guidelines before creating and submitting your plugin to the repository. Make sure that your plugin is in compliance with all the rules. Some of the rules include:

    • Your plugin must be GLP compatible
    • Requiring user consent before storing user information
    • Not spamming users
    • Not including obfuscated code
    • Not doing anything that is illegal or morally offensive
    • Not embedding external link in the public site

    Check the plugin name on the WordPress Directory

    This is a simple step to decide the name for your plugin before you start. Doing this will let you know if that name is already taken. Just like usernames, you might not get what you expected.

    Go to https://wordpress.org/plugins/ and enter your desired plugin name into the “Search plugin” search box. If you find no plugin for the name you used, there’s still a chance that a plugin has been submitted under that name and the user hasn’t submitted their first subversion commit, so don’t get too excited. Stay positive 🙂

    You will want to submit the plugin as soon as possible in order to make sure that you get the name. If the plugin name already exists, you will need to brainstorm to think of a new one.

    Create a plugin that works

    Isn’t this so obvious? Make sure you plugin does exactly what you mention in the Readme. I create several plugins using the WordPress Plugin BoilerPlate. It saves a lot of time and has a perfect structure. But this is a choice and not a necessity. You are free to use whatever structure you find comfortable working with, as far as it follows the guidelines.

    After you have made the plugin test it various times, in different environments if possible. Test all the functionalities so everything works exactly as you want it to.

    Validate the Readme file.

    The readme file plays an important role since it is used to populate the plugins page in the WordPress directory. If you want to make sure your plugin stands out here is an interesting article which talks about it in more detail.

    To give you a general overview, you should enter in your plugin name, contributors (WordPress author IDs), donate link, tags, the WordPress version that is required and the WordPress version the plugin has been tested on, license (it must be GPL) and a short description of your plugin. For the tags, I would suggest choosing tags based on those listed in a competing plugin and popular tags that are relevant to your plugin. You can find tags from competing plugins by looking at their directory page and scrolling to the bottom of their page or by checking out theirreadme.txt file.

    After adding that information, you should add the main description, installation instructions frequently asked questions and screenshots of your plugin. Make sure to include the screenshots, banner, and icon in your plugin’s assets directory. The more screenshots the better. Once you’re happy with your readme file, run it through the ReadMe Validator.

    Submit your plugin for Review

    Once you have completed all the above, you can log in to WordPress.org and add your plugin for review, by uploading your plugin at https://wordpress.org/plugins/add/

    Add your plugin name as well as a description of your plugin. For the plugin URL, you need to compress your plugin files and upload your plugin.zip file to your website or to a website that you have access to. You should be able to upload the compressed file to Dropbox or Google Drive and add a public link to the plugin zip file.

    Wait for approval 🙂

    During the review, in some cases, the plugin review team may suggest some improvements to your plugin. Once the review is done, you should receive an email from WordPress.org regarding the approval. Congrats! You may now have that little dance you were waiting for 😛

    The email will also contain the URL for your plugin page on WordPress.org, A SVN URL to upload your plugin files.

    This command adds all of your central WordPress Subversion repository’s files into your local repository. An important note, make sure to replace  https://plugins.svn.wordpress.org/your-plugin-name. with the URL that is provided in your plugin approval email; You SVN URL will also be in the similar format of https://plugins.svn.wordpress.org/your-plugin-name. And, replace your-plugin-name at the end of the command with what you would like to name the directory.

    You’ll get a response asking the following:

    (R)eject, accept (t)emporarily or accept (p)ermanently? 
    

    Type in t or p and hit Enter. Then, you’ll receive the message below. This indicates that the your-plugin-name directory was created on your computer and the tags, assets, trunk, and branches directories were added within the your-plugin-name Subversion repository directory.

    Place all of your plugin files in the trunk directory. Now that you have your plugin files in the trunk directory, you need to add those files to your Subversion repository so that they can be tracked. You can do this by running the terminal command below.

    svn2

    You then need to push the changes made to your local repository to the central WordPress repository by running the following command in your terminal window.

    svn-ci

    You’ll need to enter your computer’s logged in username and password.

    Then, you will be asked for your WordPress username and password.

    Once those are credentials are provided, your plugin’s files will be transferred to the WordPress central repository. A Transmitting File Data message will be displayed and when complete, a Committed revision message will be displayed.

    transmitting

    DONE! You should get an email from WordPress explaining the new commit. Now, you may go and check your plugin URL on WordPress.org to see the changes.

    Your plugin is now available for the public to download and use. But there are some improvements you can make to help users know your plugin a little better.

    If you have not added images for banner and screenshots etc in the /assets directory already you won’t see them on your plugin page. Now add them and run the following command.assest*

    Now, you need to commit the change to the central repository.

    adding-assets

     

    Check out your WordPress Plugin Directory page now and you should see images.

    If you are developing your plugin on multiple computers or with multiple contributors, make sure to run the update command (visible below) before committing any changes. This pulls the changes that exist in the central WordPress repository into your local plugin repository.

    update

    Question?

    Please feel free to get in touch using this contact form if you have any question regarding this, which I may have missed adding here.

    References:
    https://developer.wordpress.org/plugins/wordpress-org/
    https://developer.wordpress.org/plugins/wordpress-org/how-your-readme-txt-works/
    https://make.wordpress.org/plugins/2012/06/09/the-plugins-directory-and-readme-txt-files/
    https://www.sitepoint.com/create-awesome-wordpress-org-page-plugin/
    https://wordpress.org/plugins/developers/add/
    https://wppb.me/
    https://github.com/DevinVinson/WordPress-Plugin-Boilerplate
    https://www.slushman.com/guide-using-wordpress-plugin-boilerplate/

     

  • Installing Theme Unit Test Data with wp-cli

    Installing Theme Unit Test Data with wp-cli

    When building custom themes client sites it is important to test as many edge case as possible. Theme Unit Test Data is the way to go here and a minimum requirement for any professionally built WordPress theme (in my opinion anyway) If building a theme for the wordpress.org theme repository this will almost certainly be tested. For those using WP-CLI there is a quick and easy way to install and then remove this test data. Naturally, you will need to install and setup WP-CLI before proceeding.

    First you will want to backup your current database

    wp db export mydatabase.sql

    Then reset your WordPress installation. This step is not obligatory as you can import the test data on top of your own data. The --y flag stands for “yes” in response to the question “Are you sure you want to reset your database?” So make sure you have the old data backed up in case.

    wp db reset --yes

    Next you will want to import

     curl -O https://wpcom-themes.svn.automattic.com/demo/theme-unit-test-data.xml
    wp plugin install wordpress-importer --activate
    wp import ./theme-unit-test-data.xml --authors=create
    rm theme-unit-test-data.xml

    Here is where you will test you theme. Ideally you should go through and systematically check each of the links which have all sorts of edge cases. Correct any abnormalities and problems with layout. When you are finished you can change back to your old data.

    wp db reset --y
    wp db import mydatabase.sql

     

    Please note that you will have to provide the --url flag for some of those wp commands when using multisite. I am happy to answer any questions in the comments.

  • All-in-One WordPress migration

    All-in-One WordPress migration

    With the All-in-One WP Migration plugin from developers So Ilieva, Borislav Angelov and Pim Jitsawang it is possible to export the WordPress database, media files, plugins and themes. One can indefinitely in the database use Find and Replace operations in the database to perform, for example, when moving relative paths.

    The plugin comes with 32MB of memory. The plugin takes over the archiving of files with the help of 2048 byte chunks, the editor for database search / replace only accesses segments of 1MB to. So you’re protected from Speicherprobeme.

    Other features include: support for MySQL, PDO and MySQLi, support for Zip Archive and Pcl Zip.

  • Important WordPress Plugin’s for your website

    WordPress Plug-ins can impart additional functionalities to your WordPress site. Let’s understand what these plug-ins are and which are some of the most important plug-ins you can use for your website!

    What is a WordPress Plug-in?

    A plug-in is a portion of software added to enhance a current piece of software – and that’s what the various WordPress plugins do – they enhance the actual WordPress website.

    A WordPress plug-in is a snippet of code that extends the functionality of the WordPress development platform further than what the original developers of the platform have decided upon. It is for this reason that the CMS is quite raw, and offers only basic functionality such as creating posts, pages, and editing basic code.

    A plug-in is generally installed via the plug-in administration area in WordPress. It can be done –

    · Automatically from the plugins directory hosted by WordPress

    · Manually via FTP

    · Via an upload in the back end of WordPress

    In most of the cases, one will never need to install a plug-in manually; however, as the availability of premium plugins is rising significantly, this is happening more and more.

    Which are some of the most important WordPress Plug-ins?

    Akismet

    This is an anti-spam Plug-in which identifies, blocks comment and tracks back spam on blogs.  Akismet checks your comments against the Akismet web service to see if they look like spam or not. It lets you review the spam it catches or automatically delete spam.  Once you install WordPress, this plug-in will come automatically. However you need to create an account to get an API key.

    ContactForm7

    One can quickly and easily add a contact form to blogs with the help of this plug-in. It allows you to flexibly design the form and mail. One can manage multiple contact forms as well. In addition, it supports many features including AJAX submitting, CAPTCHA, Akismet spam filtering, file uploading, etc.

    TweetMe

    This is a great plug-in for encouraging your readers to retweet your blog posts into the twitter verse. The button shows a live count of the number of times your webpage or blog post has been tweeted.

    WishList Member

    With this plug-in you can turn your WordPress site into a fully customizable membership platform. One can keep an area of your website for the general public to see and have access to, and then you can create an area of your website that only paid members have access to. This works well for creating a private client area for your website or creating a paid e-course or program that members have access to and go in and download their lessons.

    Thesis Theme

    It allows you to change the look and feel of your blog. The best thing about this plug-in is that it can change the look and feel of your blog with just a few simple clicks of mouse. You can change the font, color, background color, number of columns, and page navigation within seconds.

    Need a WordPress Consultant? We specialize in WordPress Development services, WordPress Customization, WordPress integration & WordPress Maintenance, WordPress Upgradation, WordPress Hosting and WordPress Template Designing.