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
| <div class="l-main track_event " id="main" data-event-tracking="outfit"></div><aside class="l-sidebar"><li id="pn_dfpad-2" class="track_event-0 widget widget_pn_dfpad"> <div id="gpt-bigboxtop" class="pn_dfpads adslot"> | |
| <script type="text/javascript"> | |
| jQuery( document ).ready( function() { | |
| apstag.fetchBids({ | |
| slots: [{ | |
| slotID: 'gpt-bigboxtop', | |
| sizes: [ | |
| [ 300,250 ], [ 300,251 ], [ 300,600 ], [ 300,601 ] | |
| ] | |
| }] |
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
| <!-- Needs to be the first ad rendered on the page --> | |
| <div id="gpt-nulladslot" style='height:0; display:none;'> | |
| <!-- Null Ad Slot for bug DAS-265--> | |
| <script> | |
| googletag.cmd.push(function() { | |
| var gpt_nulladslot = googletag.defineSlot('null', [66, 6], 'gpt-nulladslot').addService(googletag.pubads()); | |
| googletag.display('gpt-nulladslot'); | |
| googletag.pubads().refresh( [ gpt_nulladslot ], {changeCorrelator: false} ); | |
| }); | |
| </script> |
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 | |
| // found in: ci-build/wordpress-tests-lib/includes/install.php | |
| // reference: https://core.trac.wordpress.org/ticket/34692 | |
| /** | |
| * Shell function that returns the version of mysql regardless of using PDO or MySQLi | |
| * @return string - the numbered version of mysql i.e 5.7.14 | |
| */ | |
| function get_mysql_version() { | |
| $output = shell_exec('mysql -V'); |
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 reinstalling, the items preceded with (s) can be skipped on the reinstall | |
| 1) on your Mac open your terminal | |
| 2) Install Home Brew: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
| 3) Install NGINX ( Webserver ): brew install nginx | |
| 4) (s) Install dnsmasq for local DNS and subdomains like oc.test: | |
| ~ The following commands will install dnsmasq, configure it to point all requests to the .test top-level domain to | |
| our local machine, and make sure it starts up and runs all of the time. | |
| ~ brew install dnsmasq | |
| ~ cd $(brew --prefix); echo 'address=/.test/127.0.0.1' > etc/dnsmasq.conf | |
| ~ sudo cp -v $(brew --prefix dnsmasq)/homebrew.mxcl.dnsmasq.plist /Library/LaunchDaemons |
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 | |
| namespace Postmedia\Web\Utilities; | |
| /** | |
| * Is Device - Adapter classes for JetPack device handling | |
| * @author Steve Browning | |
| * @version 1.0 - basic wrappers with jetpack exists checks | |
| */ | |
| class Device { |
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 | |
| // The path to the file written out from xdebug | |
| $path_and_filename = '/usr/srv/www/data.txt'; | |
| // get the data written out from xdebug | |
| $data = file_get_contents ( $path_and_filename ); | |
| // The path to our output file | |
| $output_path_and_filename = '/usr/srv/www/output.txt'; | |
| // open the file | |
| $fp = fopen( $output_path_and_filename, 'a' ); | |
| // append data to it. |
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 | |
| /** | |
| * Template Name: Ad Test 1 | |
| * | |
| * @package PostMedia | |
| */ | |
| get_header(); | |
| // check to see if function exists before calling it |
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 mem( $key, $in_or_out = 'in' ) { | |
| if ( ! isset( $this->mem_usage ) ) { | |
| $this->mem_usage = array(); | |
| } | |
| $this->mem_usage[ $key ] = array( 'memory' => memory_get_usage(), 'in or out' => $in_or_out ); | |
| } | |
| function console_log_mem() { |
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 ( function_exist( 'wpl_update_option' ) ) { | |
| return wlo_update_option( $this->unique_storage_key, wp_json_encode( $this->process_data( $data ) ) ); | |
| } else if ( function_exist( update_option ) { | |
| return update_option( $this->unique_storage_key, wp_json_encode( $this->process_data( $data ) ) ); | |
| } | |
| return false; |
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 | |
| require_once __DIR__ . '/vendor/autoload.php'; | |
| WP_Mock::setUsePatchwork( false ); | |
| WP_Mock::bootstrap(); |