Verifying myself: I am redmonkey73 on Keybase.io. 251LbZ9xDAxiAKk6SrRvtdvcWznGu7nEnXJU / https://keybase.io/redmonkey73/sigs/251LbZ9xDAxiAKk6SrRvtdvcWznGu7nEnXJU
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 | |
/** | |
* Create a new custom yoast seo sitemap | |
*/ | |
add_filter( 'wpseo_sitemap_index', 'ex_add_sitemap_custom_items' ); | |
add_action( 'init', 'init_wpseo_do_sitemap_actions' ); | |
// Add custom index |
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 | |
///////Example usage////////// | |
//get object terms for $post->ID with taxonomies categories and tags, | |
//args set as fields all and exclude term with id 1 | |
$terms = wp_get_object_terms( | |
$post->ID, | |
array( |
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 | |
// enable divi functions | |
add_action( 'wp_enqueue_scripts', 'my_enqueue_assets' ); | |
function my_enqueue_assets() { | |
wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' ); | |
} | |
//add 1440px image size | |
add_image_size('image_1440', 1440, 9999, false); |
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
### Keybase proof | |
I hereby claim: | |
* I am evgrezanov on github. | |
* I am redmonkey73 (https://keybase.io/redmonkey73) on keybase. | |
* I have a public key ASAVm8J5FPky5p_VG-b8sSa5YPj4M-8JnnpL-0bfZKpwsgo | |
To claim this, I am signing this object: |
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 | |
/** | |
* Generate login for new WP user | |
* | |
* return string uniq login | |
*/ | |
function generate_new_userlogin(){ | |
$users_ids = get_users('fields=ID&number=3&orderby=registered&order=DESC'); | |
$last_id = max($users_ids); |
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 | |
function change_link( $permalink, $post ) { | |
if( $post->post_type == 'resources_post_type' ) { | |
$resource_terms = get_the_terms( $post, 'resource_type' ); | |
$term_slug = ''; | |
if( ! empty( $resource_terms ) ) { | |
foreach ( $resource_terms as $term ) { |
I hereby claim:
- I am evgrezanov on github.
- I am redmonkey73 (https://keybase.io/redmonkey73) on keybase.
- I have a public key ASCF7zWRYJ4CbNIP-YQpAdsrW63us9iTtEtxnqXNbZ8BWAo
To claim this, I am signing this object:
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 // File location: /wp-content/themes/my-theme/src/Models/ | |
namespace App\Models; | |
use Illuminate\Database\Eloquent\Model as Eloquent; | |
class Car extends Eloquent | |
{ | |
protected $table = 'cars'; | |
protected $primaryId = '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
FormAjax('#loginform', 'sb/v1/user/signin'); |
OlderNewer