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_action( 'wp_enqueue_scripts', 'mytheme_scripts' ); | |
| /** | |
| * Enqueue Dashicons style for frontend use when enqueuing your theme's style sheet | |
| */ | |
| function mytheme_scripts() { | |
| wp_enqueue_style( 'mytheme-style', get_stylesheet_uri(), 'dashicons' ); | |
| } |
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
| font-family: -apple-system, ".SFNSText-Regular", "San Francisco", "Roboto", "Segoe UI", "Helvetica Neue", "Lucida Grande", sans-serif; |
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
| //gets the total number of WooCommerce orders from the WP database | |
| function get_number_of_orders() { | |
| global $wpdb; | |
| //get number of orders from database as array | |
| $number_of_orders_array_n = $wpdb->get_results( | |
| "SELECT COUNT(*) FROM wp_posts WHERE post_type = 'shop_order'", ARRAY_N); | |
| //convert number of orders array into a 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
| <?php | |
| //Uncomment the following line for converting one role to another | |
| //add_action( 'the_post', 'convert_subscribers_to_executives' ); | |
| function convert_subscribers_to_executives() { | |
| //Note: this only works by navigating to the page with ID 5883 on the site | |
| //to kick off the loop that updates all of the users. | |
| if (get_the_ID() === 5883) { | |
| //get all subscribers from this WP site | |
| $blogusers = get_users( 'blog_id=1&orderby=nicename&role=subscriber' ); |
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( 'gform_field_content', function ( $field_content, $field ) { | |
| if ( $field->type == 'email' ) { | |
| return str_replace( 'type=', "autocomplete='email' type=", $field_content ); | |
| } | |
| if ( $field->type == 'name' ) { | |
| return str_replace( 'type=', "autocomplete='name' type=", $field_content ); | |
| } | |
| return $field_content; |
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
| [ | |
| { | |
| "name": "/tmp/geth-compile-solidity400040342:Owned", | |
| "solidity": "pragma solidity ^0.4.8;\n\ncontract Owned {\n address public owner;\n\n function Owned() {\n owner = msg.sender;\n }\n\n modifier onlyOwner {\n require(msg.sender == owner);\n _;\n }\n\n function transferOwnership(address newOwner) onlyOwner {\n owner = newOwner;\n }\n}\n\ncontract TokenRecipient {\n function receiveApproval (address _from, uint256 _value, address _token, bytes _extraData);\n}\n\ncontract ScrypTestflight is Owned {\n /* Public variables of the token */\n string public standard = \"Test Scryp 0.1\";\n string public name;\n string public symbol;\n uint8 public decimals;\n uint256 public totalSupply;\n\n /* This creates an array with all balances */\n mapping (address =\u003e uint256) public balanceOf;\n mapping (address =\u003e mapping (address =\u003e uint256)) public allowance;\n\n /* This generates a public event on the blockchain t |
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
| 0x1418c2A5B8A2F547f2417996D39fB351777F2492 |
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
| 0xfb70456839B62ca7bA09a1fA9E5a553E5e36D4c4 |
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
| 0x22b07cfd25cf068a444364e8531be5fac8af7ef1 |
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
| #!/bin/bash | |
| curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash | |
| export NVM_DIR="$HOME/.nvm" | |
| nvm install 8.2.1 # node newer version install | |
| npm install -g npm |