Welcome To Snipplr
Everyone's Recent PHP Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
Simple class to retrieve an ID using a URL of the Youtube
        
        
        
            0 
        
        
            1963 
        
                    posted 13 years ago by leandroperes
            Calling generateHash() with a single argument (the plain text password) will cause a random string to be generated and used for the salt. The resulting string consists of the salt followed by the SHA-1 hash - this is to be stored away in your databas...
        
        
        
            3 
        
        
            2376 
        
                    posted 13 years ago by StevenW721
            This will get the 11-character YouTube video ID from any valid YouTube URL.
Based on http://snipplr.com/view/57065/get-youtube-video-id/ but made more robust to handle additional URL inputs
        
        
        
            0 
        
        
            2983 
        
                    posted 13 years ago by jmiller
            Condition = The condition which must be met.
True = Executed if the condition is met.
False = Executed if the condition failes.
        
        
        
            0 
        
        
            1131 
        
                    posted 13 years ago by beneberle
            This is the Batch API example shown on http://api.drupal.org/api/drupal/developer--hooks--install.php/function/hook_update_N/6.
        
        
        
            1 
        
        
            1380 
        
                    posted 13 years ago by wizonesolutions
            then in your template code you just use..
echo excerpt(25);
        
        
        
            1 
        
        
            1093 
        
                    posted 13 years ago by Omegakenshin
            Register a Custom Post Type and a Custom Taxonomy in Wordpress
        
        
        
            0 
        
        
            1570 
        
                    posted 13 years ago by i-am-andy
            Search for a string, if matched replace with second provided paramater. Third parameter is the variable whose value is the string you'd like to search.
        
        
        
            0 
        
        
            1363 
        
                    posted 13 years ago by inreflection7
            Wordpress by default wraps images in <p> tags, this kills that.
        
        
        
            3 
        
        
            1728 
        
                    posted 13 years ago by rliverman
            If the image source is not in the database a default image is displayed.
        
        
        
            0 
        
        
            1969 
        
                    posted 13 years ago by blantonious
            Ever want to filter out a category from your blog page. Here's how you do it! Just add this snippet to your functions.php file.
        
        
        
            0 
        
        
            1100 
        
                    posted 13 years ago by goatboy91587
            Simple script utilising the `gpg_encrypt.php` code (`http://business-php.com/opensource/gpg_encrypt/`) that will encrypt both the body and attachment of an email on upload.
        
        
        
            0 
        
        
            2606 
        
                    posted 13 years ago by davo
            This function accept one parameter (integer or float) and returns the same number writed with words. Useful for currencies and invoices.
        
        
        
            0 
        
        
            1749 
        
                    posted 13 years ago by stz184
            Use this in your functions.php 
Sets one language for WP Admin and the other for front-end.
        
        
        
            2 
        
        
            1169 
        
                    posted 13 years ago by mihael
            Creates table structure for pitchfx data that is provided by mlb.com.  Open PHP file and enter username and password for localhost.  Feel free to customize to suit your preference.
        
        
        
            0 
        
        
            2261 
        
                    posted 13 years ago by wa-rufio
            Open PHP file and enter User Credentials for localhost.  The default dates are set to negotiate the 2011 season, but change the date variables to match your desired season data.  The start date should be the day before opening day, and the end date t...
        
        
        
            0 
        
        
            2320 
        
                    posted 13 years ago by wa-rufio
            In this example I used the "Members" plugin to add a capability called "hide_jobs" and that was the trigger to hide certain admin menus and also hide the "Right Now" dashboard widget.
        
        
        
            0 
        
        
            1579 
        
                    posted 13 years ago by rliverman
            Courtesy CSSTricks (http://css-tricks.com/snippets/wordpress/turn-on-more-buttons-in-the-wordpress-visual-editor/)
        
        
        
            1 
        
        
            1435 
        
                    posted 13 years ago by adambundy
            function that creates a template tag that can be used to insert excerpts with different lengths. Also controls characters that come after excerpt
        
        
        
            0 
        
        
            1116 
        
                    posted 13 years ago by verticalgrain
            UPDATE: might be easier or faster to use this now (also courtesy Pippin): http://pippinsplugins.com/get-all-attached-media/
**courtesy Pippin Williamson (http://pippinsplugins.com/image-gallery-short-code-using-post-attachments/)
use shortcode...
        
        
        
            1 
        
        
            1402 
        
                    posted 13 years ago by adambundy
            
