http://twitter.com/share?text=<TITLE>&url=<URL>
E.g. http://twitter.com/share?text=This+is+google+a+search+engine&url=https%3A%2F%2Fwww.google.com
http://www.facebook.com/sharer.php?u=&p[title]=
| <?php // Don't copy this line if you are inserting in a file that has it already. | |
| /** | |
| * ACF Options Page | |
| * | |
| * Instructions: | |
| * Add more languages to the array below: $languages | |
| * | |
| * @author: Zeshan Ahmed <https://zeshanahmed.com/> | |
| */ |
Прежде всего нужно создать ключ для доступа к репозиториям. Один ключ можно использовать для разных репозиториев. Для этого идём в github, в настройки разработчика, и переходим к персональным токенам и жмём сюда для генерации ключа.
При генерации ключа отмечаем поля repo, workflow, user, даём название и копируем сам ключ.
| if ( ! function_exists( 't5_add_page_number' )) | |
| { | |
| function t5_add_page_number( $s ) | |
| { | |
| global $page; | |
| $paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1; | |
| ! empty ( $page ) && 1 < $page && $paged = $page; | |
| // $paged > 1 && $s .= ' | ' . sprintf( __( 'Страница %s' ), $paged ); |
| if ( ! function_exists( 't5_add_page_number' )) | |
| { | |
| function t5_add_page_number( $s ) | |
| { | |
| global $page; | |
| $paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1; | |
| ! empty ( $page ) && 1 < $page && $paged = $page; | |
| // $paged > 1 && $s .= ' | ' . sprintf( __( 'Страница %s' ), $paged ); |
| header.php | |
| <?php | |
| if ( is_checkout() && ! empty( $wp->query_vars['order-received'] ) ) { | |
| // echo $wp->query_vars['order-received']; | |
| // Lets grab the order | |
| $order = wc_get_order( $wp->query_vars['order-received'] ); |
| # Find the latest version on https://github.com/creationix/nvm#install-script | |
| $ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash | |
| # Add in your ~/.zshrc the following: | |
| export NVM_DIR=~/.nvm | |
| [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" | |
| $ source ~/.zshrc |
| //Woocommerce Checkout JS events | |
| $( document.body ).trigger( 'init_checkout' ); | |
| $( document.body ).trigger( 'payment_method_selected' ); | |
| $( document.body ).trigger( 'update_checkout' ); | |
| $( document.body ).trigger( 'updated_checkout' ); | |
| $( document.body ).trigger( 'checkout_error' ); | |
| //Woocommerce cart page JS events | |
| $( document.body ).trigger( 'wc_cart_emptied' ); | |
| $( document.body ).trigger( 'update_checkout' ); |
| <!DOCTYPE HTML> | |
| <html prefix="og: http://ogp.me/ns#"> | |
| <head> | |
| <title>[[*title]]</title> | |
| <meta charset="utf-8" /> | |
| <base href="[[++site_url]]" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | |
| <meta name="description" content="[[*description]]" /> | |
| <meta name="keywords" content="[[*keywords]]" /> |
| <?php | |
| // Ensure cart contents update when products are added to the cart via AJAX (place the following in functions.php) | |
| add_filter( 'woocommerce_add_to_cart_fragments', 'woocommerce_header_add_to_cart_fragment' ); | |
| function woocommerce_header_add_to_cart_fragment( $fragments ) { | |
| ob_start(); | |
| ?> | |
| <a class="cart-contents" href="<?php echo wc_get_cart_url(); ?>" title="<?php _e( 'View your shopping cart' ); ?>"><?php echo sprintf (_n( '%d item', '%d items', WC()->cart->get_cart_contents_count() ), WC()->cart->get_cart_contents_count() ); ?> - <?php echo WC()->cart->get_cart_total(); ?></a> | |
| <?php |