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_tree($pid) { | |
| global $post; | |
| if(is_page()&&($post->post_parent==$pid||is_page($pid))) { | |
| 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($){ | |
| var frame; | |
| $(function(){ | |
| $('#cloner-csv-button').click(function () { | |
| // var $el =$(this); | |
| if(frame) { | |
| frame.open(); | |
| return; |
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
| if('book'==get_post_type()) { | |
| } |
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
| exists () { | |
| if [[ -f $1 ]] | |
| then | |
| . $1 | |
| echo "${blue}$msgSuccess$reset $1 included" | |
| else | |
| echo "${red}$msgError$reset: Could not locate $1." | |
| exit 1 | |
| fi | |
| } |
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 modify_comment_form_fields($fields){ | |
| $commenter = wp_get_current_commenter(); | |
| $req = get_option( 'require_name_email' ); | |
| $aria_req = ( $req ? " aria-required='true'" : "" ); | |
| $fields['author'] = '<p class="comment-form-author">' . | |
| '<input id="author" name="author" type="text" placeholder="Name*" value="' . esc_attr( $commenter['comment_author'] ) . '" size="20"' . $aria_req . ' /></p>'; | |
| $fields['email'] = '<p class="comment-form-email">'. |
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 global $woocommerce; | |
| $cart_count = ($woocommerce->cart->cart_contents_count)? $woocommerce->cart->cart_contents_count:'0'; |
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
| cd $HOME | |
| ln -s `which php54` ~/bin/php | |
| export PATH=$HOME/bin:$PATH | |
| curl -sS https://getcomposer.org/installer | php54 | |
| echo -e "\n# Composer\nalias composer=\"php54 \$HOME/composer.phar\"" >> $HOME/.bash_profile | |
| source $HOME/.bash_profile |
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
| let newArray = oldArray1.concat(oldArray2.filter((item) => { | |
| return item.value !== duplicate.value; | |
| })); |
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
| import React from 'react' | |
| import Perf from 'react-addons-perf'; | |
| window.Perf = Perf; | |
| class Component extends React.Component { | |
| componentDidMount() { | |
| setImmediate(() => { | |
| Perf.start(); | |
| }); | |
| setTimeout(() => { |