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
.wp-site-blocks { | |
column-width: 12em; | |
column-gap: 2em; | |
line-height: 1.1em; | |
} | |
.horizontal-break { | |
column-span: all; | |
height: 100px; | |
} |
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 | |
/** | |
* Remove Settings submenu in admin bar | |
*/ | |
add_action( | |
'admin_bar_menu', | |
function() { | |
global $wp_admin_bar; | |
$nodes = array_keys( $wp_admin_bar->get_nodes() ); |
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 ilog( $label = '', $value = null, $dump = false ) { | |
static $logs = []; | |
if ( true === $dump ) { | |
echo "\n<h1>Log Report</h1>\n"; | |
foreach ( $logs as $log ) { | |
echo "<br/>\n{$log['label']}: "; | |
var_export( $log['value'] ); | |
echo "\n<br/>"; | |
} |
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
public function add_notice_and_transparency( $widget_area ) { | |
$limit = $this->widget_area_limits()[$widget_area] ?? null; | |
$style = ".ione-module-widget-limit-$limit div:nth-child(n+" . ($limit + 2) . "){opacity:50%}"; | |
if ( $limit ) { | |
printf( | |
'<p class="description">This widget area (sidebar) will only display the first %d widgets.</p><section class="ione-module-widget-limit-%d"><style>%s</style>', | |
absint( $limit ), | |
absint( $limit ), | |
$style |
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 | |
/** | |
* Calls the callback functions that have been added to a filter hook. | |
* | |
* @since 4.7.0 | |
* | |
* @param mixed $value The value to filter. | |
* @param array $args Additional parameters to pass to the callback functions. | |
* This array is expected to include $value at index 0. | |
* @return mixed The filtered value after all hooked functions are applied 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 | |
return array_merge( | |
... array_map( | |
function( $key, $values ) { | |
if ( ! is_array( $values ) ) { | |
return []; | |
} | |
return array_map( | |
function ( $value ) use ( $key ) { |
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( | |
'after_setup_theme', | |
function() { | |
global $wpdb; | |
foreach ( [ 'twitter.com', 'facebook.com', 'instagram.com', 'youtube.com', 'soundcloud.com' ] as $s ) { | |
echo "\n$s"; | |
$results = $wpdb->get_results( "SELECT * FROM `wp_3_posts` WHERE `post_content` LIKE '%$s%' ORDER BY `ID` DESC LIMIT 200;" ); |
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 IOne\IOne3\Core\Controllers; | |
use IOne\IOne3\Core\Entities\GoogleAnalyticsDimension; | |
/** | |
* Class GoogleAnalyticsController | |
* | |
* Consolidate multiple messages that should go into a single dimension. |
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 IOne\IOne3\Core\Entities; | |
/** | |
* Class LogEntries | |
* | |
* Represent all log entries when they need to be gathered before output. | |
*/ | |
class LogEntries { |
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 | |
/** | |
* Create a multidimensional array from supplied array keys. | |
* | |
* Accepts a variable number of parameters that can be strings or arrays of | |
* strings. Each parameter represents another level of nesting. | |
* | |
* Each leaf node is an empty array. | |
* |
NewerOlder