This file contains 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 | |
/** | |
* Priority Array | |
* | |
* @since 1.3 | |
*/ | |
class PriorityArray implements \IteratorAggregate, \ArrayAccess, \Serializable, \Countable { | |
/*** Properties ***********************************************************/ |
This file contains 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 | |
/** | |
* Event manager | |
* | |
* @since 1.3 | |
*/ | |
class EventManager { | |
/*** Properties ***********************************************************/ |
This file contains 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', 'sample_after_setup_theme', 11 ); | |
/** | |
* An action for 'after_setup_theme' hook. | |
* | |
* @return void | |
* @since 0.1 | |
*/ |
This file contains 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_momtaz_setup', 'sample_after_momtaz_setup', 11 ); | |
/** | |
* Load all the necessary code after Momtaz setup. | |
* | |
* @return void | |
* @since 0.1 | |
*/ |
This file contains 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_filter( 'gettext', 'change_widget_translation', 10, 3 ); | |
/* | |
* Change the Arabic "Widgets" translation. | |
* | |
* @return string | |
*/ | |
function change_widget_translation( $translations, $text, $domain ) { |
This file contains 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 | |
/** | |
* Retrieves post data given a post name, type and parent ID. | |
* | |
* @return WP_Post|NULL | |
*/ | |
function get_post_by_name( array $args ) { | |
global $wpdb; |
This file contains 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 | |
if ( ! did_action( 'bbp_after_setup_actions' ) ) { | |
add_action( 'bbp_after_setup_actions', 'n5n_after_bbPress_setup' ); | |
} else { | |
n5n_after_bbPress_setup(); | |
} | |
/** | |
* After bbPress Setup. |
This file contains 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 | |
$hosts = []; | |
$doc = new DOMDocument(); | |
$doc->loadHTMLFile("report-2015.html"); | |
$historyTable = $doc->getElementById('history'); | |
$historyTableRows = $historyTable->getElementsByTagName('tr'); |
This file contains 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 | |
/** | |
* Recursively takes the specified criteria and adds too the expression. | |
* | |
* The criteria is defined in an array notation where each item in the list | |
* represents a comparison <fieldName, operator, value>. The operator maps to | |
* comparison methods located in ExpressionBuilder. The key in the array can | |
* be used to identify grouping of comparisons. | |
* |
OlderNewer