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
| /* =========================================== | |
| Show Guest Photo Attachment in CPT Admin Columns | |
| =============================================*/ | |
| // GET ATTACHED IMAGE | |
| function revcon_get_attachment_image($post_ID) { | |
| $images = get_attached_media('image', $post_ID); | |
| if ($images) { |
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 global:Set-AppPoolEnvVariable { | |
| param ( | |
| [string]$appPool = $(Read-Host "Application Pool"), | |
| [string]$varName = $(Read-Host "Variable name"), | |
| [string]$varValue = $(Read-Host "Variable value") | |
| ) | |
| $sec = "System.Security.Principal"; | |
| $acct = New-Object "$sec.NTAccount" -ArgumentList "IIS AppPool\$appPool"; | |
| $sid = $acct.Translate([System.Type]::GetType("$sec.SecurityIdentifier")).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
| <?php | |
| add_action( 'dp_duplicate_page', 'dp_duplicate_p2p', 10, 2 ); | |
| add_action( 'dp_duplicate_post', 'dp_duplicate_p2p', 10, 2 ); | |
| // For Duplicate Product support in WooCommerce: | |
| //add_action( 'woocommerce_duplicate_product', 'dp_duplicate_p2p', 10, 2 ); | |
| function dp_duplicate_p2p( $new_post_id, $old_post ) { | |
| global $wpdb; |
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
| // Long Polling (Recommened Technique - Creates An Open Connection To Server ∴ Fast) | |
| (function poll(){ | |
| $.ajax({ url: "server", success: function(data){ | |
| //Update your dashboard gauge | |
| salesGauge.setValue(data.value); | |
| }, dataType: "json", complete: poll, timeout: 30000 }); | |
| })(); |