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
| ssh rocketapps@rocketapps.ssh.wpengine.net | |
| wp core check-update | |
| wp core update | |
| wp plugin list | |
| wp plugin update --all | |
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 | |
| // In the main plugin file: | |
| /* Register settings */ | |
| function my_cool_plugin_settings_init() { | |
| register_setting ( | |
| 'my_cool_plugin_settings', | |
| 'my_cool_plugin_settings', | |
| 'my_cool_plugin_settings_validate' |
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
| add_action( 'woocommerce_account_content', 'action_woocommerce_account_content' ); | |
| function action_woocommerce_account_content( ) { | |
| // Do something | |
| }; |
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 jQuery is not enqueued, do it */ | |
| function enqueue_jquery() { | |
| wp_enqueue_script('jquery'); | |
| } | |
| add_action('wp_enqueue_scripts', 'enqueue_jquery'); |
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 /* Product names for use in Gravity Forms field */ | |
| function ra_all_product_names() { | |
| $args = array( | |
| 'post_type' => 'product', | |
| 'orderby' => 'title', | |
| 'order' => 'asc', | |
| 'posts_per_page' => -1 | |
| ); | |
| $gchoice_count = 1; | |
| $input_count = 1; |
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 | |
| /* | |
| Funds list | |
| Usage: | |
| funds_list(false); // Include the images | |
| or | |
| funds_list(); // DOon't include the images | |
| */ | |
| function funds_list($output_images = 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
| @media screen and (max-width: 600px) { | |
| table { | |
| width: 100%; | |
| border-collapse: collapse; | |
| } | |
| tr:nth-child(even) { | |
| background-color: #f0f0f0; | |
| } |
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 date_default_timezone_set('Australia/Perth'); ?> |
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
| /* | |
| Change the date of post ID 946 to the current date. | |
| This is so the post is shown as the latest, thereby showing as the | |
| latest post on the homepage and also as the latest post on the latest-news page. | |
| */ | |
| function update_post_date_daily() { | |
| $post = get_post(946); | |
NewerOlder