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 | |
/** | |
* Plugin Name: Register Theme Directory | |
* Plugin URI: | |
* Description: Autoload acp.edu theme. | |
* Version: 1.0 | |
* Author: WPMU DEV | |
* Author URI: https://wpmudev.com | |
*/ |
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( 'posts_clauses', 'filter_clauses', 10, 2 ); | |
/** | |
* Filtering everything. | |
* | |
* @param array $clauses Array with all parts of the query. | |
* @param WP_Query $wp_query Object. | |
* @return string |
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 | |
// With dual parameters | |
function modify_query_one( $clauses, $query ) { | |
global $wpdb; | |
if ( isset( $query->query['orderby'] ) && 'color' == $query->query['orderby'] ) { | |
$clauses['join'] .= <<<SQL | |
LEFT OUTER JOIN {$wpdb->term_relationships} ON {$wpdb->posts}.ID={$wpdb->term_relationships}.object_id | |
LEFT OUTER JOIN {$wpdb->term_taxonomy} USING (term_taxonomy_id) | |
LEFT OUTER JOIN {$wpdb->terms} USING (term_id) |
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 | |
namespace wpdFormAttr; | |
use wpdFormAttr\FormConst\wpdFormConst; | |
use wpdFormAttr\Field\DefaultField\Captcha; | |
class Form { | |
public $wpdOptions; |
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
javascript | |
ES6ValidationInspection | |
JSAccessibilityCheckInspection | |
JSBitwiseOperatorUsageInspection | |
JSCheckFunctionSignaturesInspection | |
JSClosureCompilerSyntaxInspection | |
JSCommentMatchesSignatureInspection | |
JSComparisonWithNaNInspection | |
JSConsecutiveCommasInArrayLiteralInspection |
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
import { | |
BlockEditorKeyboardShortcuts, | |
BlockEditorProvider, | |
BlockInspector, | |
BlockList, | |
ObserveTyping, | |
SETTINGS_DEFAULTS, | |
WritingFlow, | |
} from '@wordpress/block-editor'; | |
import { registerCoreBlocks } from '@wordpress/block-library'; |
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 | |
/** | |
* Stackoverflow link https://stackoverflow.com/questions/52388607/in-multidimensional-array-replace-parent-element-value-from-child-arrays | |
*/ | |
$tree = array( | |
'16' => array( | |
'id' => '16', | |
'name' => 'Clothing', |
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 ( ! function_exists( 'wpcfu_output_file_upload_form' ) ) { | |
/** | |
* Output the form. | |
* | |
* @param array $atts User defined attributes in shortcode tag | |
*/ | |
function wpcfu_output_file_upload_form( $atts ) { |
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( 'job_manager_locate_template', 'my_theme_include_job_manager_templates', 10, 3 ); | |
if (!function_exists('my_theme_include_job_manager_templates')) { | |
/** | |
* Include modified job manager templates. | |
* | |
* @param mixed $template The template | |
* @param string $template_name The template name |