This file contains 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
/** | |
* Return a timestamp with the format "m/d/yy h:MM:ss TT" | |
* @type {Date} | |
*/ | |
function timeStamp() { | |
// Create a date object with the current time | |
var now = new Date(); | |
// Create an array with the current month, day and time |
This file contains 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
// Remove classes that have given prefix | |
// Example: | |
// You have an element with classes "apple juiceSmall juiceBig banana" | |
// You run: | |
// $elem.removeClassPrefix('juice'); | |
// The resulting classes are "apple banana" | |
// NOTE: discussion of implementation techniques for this, including why simple RegExp with word boundaries isn't correct: | |
// http://stackoverflow.com/questions/57812/jquery-remove-all-classes-that-begin-with-a-certain-string#comment14232343_58533 |
This file contains 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
/** | |
* Additional registration checks. | |
* | |
* This filter is documented in wp-includes/user.php | |
*/ | |
function my_registration_errors( $errors, $sanitized_user_login, $user_email ) { | |
if ( strlen( $sanitized_user_login ) < 5 ) { | |
$errors->add( 'username_too_short', __( '<strong>ERROR</strong>: Username must be at least 5 characters.' ) ); | |
} | |
return $errors; |
This file contains 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: Theme Screenshot Inheritance | |
* Description: Child themes without screenshots inherit their parent theme's screenshot. | |
* | |
* Drop this in the /plugins or /mu-plugins directory. | |
*/ | |
/** | |
* Add parent screenshot to child theme. |
This file contains 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 | |
/* Register custom post types on the 'init' hook. */ | |
add_action( 'init', 'my_register_post_types' ); | |
/** | |
* Registers post types needed by the plugin. | |
* | |
* @since 0.1.0 | |
* @access public |
This file contains 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
/** | |
* Retrieve category list in either HTML list or custom format. | |
* This is a copy of the native `get_the_category_list` function. | |
* | |
* @global WP_Rewrite $wp_rewrite | |
* | |
* @param string $separator Optional, default is empty string. Separator for between the categories. | |
* @param string $parents Optional. How to display the parents. | |
* @param int|bool $post_id Optional. Post ID to retrieve categories. | |
* @return string |
This file contains 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 | |
/** | |
* Add a link to the Plugins menu to show active plugins. | |
* | |
* Add this, without the <?php line above, to your (child) theme's functions.php. | |
* If using Admin Menu Editor plugin, you will need to reposition link manually. | |
*/ | |
function my_ui_plugins_active() { | |
global $submenu; | |
$submenu['plugins.php'][6] = array( __( 'Active Plugins' ), 'activate_plugins', 'plugins.php?plugin_status=active' ); |
This file contains 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
/* | |
Document : sc_our_services_admin | |
Created on : Jun 25, 2014, 10:07:44 PM | |
Author : Bilal | |
Description: | |
Purpose of the stylesheet follows. | |
*/ | |
root { | |
display: block; |
This file contains 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 | |
/** | |
* Strong Testimonials - Single post section | |
* | |
* For Spacious theme by ThemeGrill | |
*/ | |
?> | |
<?php get_header(); ?> |
This file contains 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 | |
/** | |
* Strong Testimonials - Single testimonial content | |
* | |
* For Spacious theme by ThemeGrill | |
*/ | |
?> | |
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> | |
<?php do_action( 'spacious_before_post_content' ); ?> |
OlderNewer