Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| <?php | |
| /** | |
| * GravityView doesn't trigger the `gform_after_submission` action when editing entries. This does that. | |
| * | |
| * @param array $form | |
| * @param int $entry_id ID of the entry being updated | |
| * @param GravityView_Edit_Entry_Render $object | |
| * | |
| * @return void |
| /* This goes to child-theme style.css and will hide the Profile Edit button. */ | |
| #edit-personal-li { | |
| display:none!important; | |
| } | |
| */ And this is to put into bp-custom.php to get the Edit button on the Profile Settings subnav. | |
| Note that there is an array field containing a new css rule for the item. */ | |
| function bpex_move_profile_edit_tab() { |
| <?php | |
| return array( | |
| "post_type" => "park", | |
| "post_status" => "publish", | |
| "posts_per_page" => 100 | |
| ); |
| <?php | |
| /** | |
| * Filter Gravity Forms select field display to wrap optgroups where defined | |
| * USE: | |
| * set the value of the select option to `optgroup` within the form editor. The | |
| * filter will then automagically wrap the options following until the start of | |
| * the next option group | |
| */ |
| <?php | |
| /* Parse the video uri/url to determine the video type/source and the video id */ | |
| function parse_video_uri( $url ) { | |
| // Parse the url | |
| $parse = parse_url( $url ); | |
| // Set blank variables | |
| $video_type = ''; | |
| $video_id = ''; |
| <?php | |
| // Make sure WooCommerce Subscriptions is active | |
| if ( class_exists( 'WC_Subscriptions_Switcher' ) ) { | |
| // Get the key for the customer's current subscription | |
| $subscription_key = WC_Subscriptions_Manager::get_subscription_key( $order_id, $product_id ); | |
| // Check if the current subscription can be switched by the customer | |
| if ( WC_Subscriptions_Manager::can_subscription_be_changed_to( 'new-subscription', $subscription_key, get_current_user_id() ) ) { |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000