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 echo apply_filters('the_content', get_page($wp_query->get_queried_object_id())->post_content); //print content of blog page outside the loop ?> |
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
| $text = '<span class="black">Lorem Ipsum</span>'; | |
| $output = preg_replace('#</?span[^>]*>#is', '', $text); |
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
| /* ===== START ADD POST ID TO ADMIN ===== */ | |
| function posts_columns_id($defaults){ | |
| $defaults['wps_post_id'] = __('ID'); | |
| return $defaults; | |
| }// end posts_columns_id function | |
| function posts_custom_id_columns($column_name, $id){ | |
| if($column_name === 'wps_post_id'){ | |
| echo $id; | |
| } | |
| }// end posts_custom_id_columns function |
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
| /* ========== 410 TERMINATED EMPLOYEE PAGES =========== */ | |
| function 410_status_header(){ | |
| $terminatedEmployees = array('employee-1','employee-2','employee-3','employee-4','employee-5','employee-6','employee-7','employee-8', 'employee-9', 'employee-10'); | |
| $currentURL = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; | |
| $currentURL = rtrim(rawurldecode( $currentURL ), '/'); | |
| foreach( $terminatedEmployees as $terminatedEmployee ): | |
| if( get_bloginfo('url') . '/' . $terminatedEmployee === $currentURL ): | |
| status_header( 410 ); | |
| if( !locate_template( '410.php', true ) ) | |
| echo 'Sorry, the page you requested has been permanently removed.'; |
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
| $.validator.addMethod("UScurrency", function (value) { | |
| return value.match(/^\$?[^-]?[1-9]([0-9]+,?)*(\.([0-9]{1,2}))?$/) || value == "" || Number(value) > 0; | |
| }, "Please enter a valid dollar amount"); | |
| form.validate({ | |
| }); | |
| $.validator.addClassRules({ | |
| currency: { | |
| UScurrency: true |
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 rotateImages(slides) { | |
| //Hide all slides | |
| slides.hide(); | |
| //Show first slide | |
| slides.eq(0).show(); | |
| //Set current slide to 0 | |
| var current = 0; | |
| //Set total slides | |
| var total = slides.length; | |
| //Subtract one to make up for zero index |
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
| Order Allow,Deny | |
| allow from all | |
| <FilesMatch "^.*\.log$"> | |
| Deny from all | |
| </FilesMatch> |
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
| jQuery.validator.addMethod("phoneUS", function(phone_number, element) { | |
| phone_number = phone_number.replace(/\s+/g, ""); | |
| return this.optional(element) || phone_number.length > 9 && | |
| phone_number.match(/^(1-?)?(\([2-9]\d{2}\)|[2-9]\d{2})-?[2-9]\d{2}-?\d{4}$/); | |
| }, "Please enter a valid phone number"); |
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
| $.validator.addMethod('SocialSecurity', | |
| function (value) { | |
| return validSSN(value) || value == ""; | |
| }, 'Please enter a valid SSN' | |
| ); | |
| function validSSN(value) { | |
| var regex = /^([0-6]\d{2}|7[0-6]\d|77[0-2])([ \-]?)(\d{2})\2(\d{4})$/; | |
| if (!regex.test(value)) { | |
| return false; |