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 | |
| add_filter( 'gettext', 'wps_translate_words_array' ); | |
| add_filter( 'ngettext', 'wps_translate_words_array' ); | |
| function wps_translate_words_array( $translated ) { | |
| $words = array( | |
| // 'word to translate' = > 'translation' | |
| 'Posts' => 'Article', | |
| 'Post' => 'Articles', | |
| 'Pages' => 'Stuffing', |
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
| $fontawesome_path: "." !default | |
| @font-face | |
| font-family: 'FontAwesome' | |
| src: font-url('#{$fontawesome_path}/fontawesome-webfont.eot') | |
| src: font-url('#{$fontawesome_path}/fontawesome-webfont.eot?#iefix') format("embedded-opentype"), font-url('#{$fontawesome_path}/fontawesome-webfont.woff') format("woff"), font-url('#{$fontawesome_path}/fontawesome-webfont.ttf') format("truetype") | |
| font-weight: normal | |
| font-style: normal | |
| @mixin icon($icon) |
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 | |
| // Standard Size Thumbnail | |
| if(false === get_option("thumbnail_crop")) { | |
| add_option("thumbnail_crop", "1"); } | |
| else { | |
| update_option("thumbnail_crop", "1"); | |
| } | |
| // Medium Size Thumbnail | |
| if(false === get_option("medium_crop")) { |
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(document).ready(function($) { | |
| var waitForFinalEvent = (function () { | |
| var timers = {}; | |
| return function (callback, ms, uniqueId) { | |
| if (!uniqueId) { | |
| uniqueId = "Don't call this twice without a uniqueId"; | |
| } | |
| if (timers[uniqueId]) { | |
| clearTimeout (timers[uniqueId]); |
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 | |
| /** | |
| * handle the calculation | |
| * @param integer $seconds [description] | |
| * @return [type] [description] | |
| */ | |
| function rkv_calc_read_time( $seconds = 0 ) { | |
| // calc the minutes |
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 | |
| /** | |
| * Deactivates a WordPress Plugin Automatically | |
| * | |
| * @copyright PressCoders | |
| * @license http://www.gnu.org/licenses/gpl-2.0.html | |
| * @link http://www.presscoders.com/2011/11/deactivate-wordpress-plugin-automatically/ | |
| * | |
| */ |
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 | |
| /****************************************************************************** | |
| * @Author: Boutros AbiChedid | |
| * @Date: June 20, 2011 | |
| * @Websites: http://bacsoftwareconsulting.com/ ; http://blueoliveonline.com/ | |
| * @Description: Preserves HTML formating to the automatically generated Excerpt. | |
| * Also Code modifies the default excerpt_length and excerpt_more filters. | |
| *******************************************************************************/ | |
| function custom_wp_trim_excerpt($text) { | |
| $raw_excerpt = $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
| <?php | |
| function my_preset_content() { | |
| global $post; | |
| if ( $post->post_content == '' and $post->post_type == 'custom_post_type' ) { | |
| $default_content = 'my preset content here'; | |
| } else { |
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 | |
| /** | |
| * Adds a simple WordPress pointer to Settings menu | |
| */ | |
| function thsp_enqueue_pointer_script_style( $hook_suffix ) { | |
| // Assume pointer shouldn't be shown | |
| $enqueue_pointer_script_style = 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
| <?php | |
| /** | |
| * Theme Activation Tour | |
| * | |
| * This class handles the pointers used in the introduction tour. | |
| * @package Popup Demo | |
| * | |
| */ | |
| class WordImpress_Theme_Tour { |