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
if ( ! class_exists( 'theme_utilities' ) ) { | |
class theme_utilities { | |
public static function theme_function_one() { } | |
public static function theme_function_two() { } | |
} | |
} |
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( '{taxonomy}_add_form_fields', 'add_feature_group_field', 10, 2 ); | |
function add_feature_group_field($taxonomy) { | |
global $meta_name; | |
?> | |
<div class="form-field"> | |
<label for="meta_name">Meta Name</label> | |
<input name="meta_name" id="meta_name" type="text" value="<?php echo $meta_name; ?>" size="40" aria-required="true"> |
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
/** | |
* Author : Doe | |
* @param string $role_type used for getting type of user. | |
*/ | |
function get_team_members($role_type) { | |
$args = array( | |
'role' => $role_type, | |
'fields' => '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
{ | |
"folders": [ | |
{ | |
"folder_exclude_patterns": [ | |
"wp-includes", | |
"wp-admin", | |
"wp-content/uploads", | |
".idea" | |
], | |
"path": "PATH HERE", |
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
function add_alt_tags($content) | |
{ | |
global $post; | |
preg_match_all('/<img (.*?)\/>/', $content, $images); | |
if(!is_null($images)) | |
{ | |
foreach($images[1] as $index => $value) | |
{ | |
if(!preg_match('/alt=/', $value)) | |
{ |
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
//Theme Structure | |
header.php ...................... Header Section | |
index.php ......................... Main Section | |
sidebar.php .................... Sidebar Section | |
single.php ....................... Post Template | |
page.php ......................... Page Template | |
comments.php .................. Comment Template | |
search.php ...................... Search Content | |
searchform.php ............ Search Form Template | |
archive.php ................... Archive Template |
NewerOlder