Skip to content

Instantly share code, notes, and snippets.

View azamatx's full-sized avatar

Azamat azamatx

View GitHub Profile
@azamatx
azamatx / greeting.php
Last active December 7, 2023 20:50
wp greeting user
<?php
// Add Shortcode
function subform() {
ob_start();
// Greet guests, if user is not logged in.
$user_display_name = __( 'Guest', 'wpmudev' );
// Get the current user's display name.
if ( is_user_logged_in() ) {
.home .has-foreground-background-color {
background-color: #25a6bb !important;
}
.home .wp-block-site-title {
text-align: center;
}
.home .wp-block-navigation__responsive-container:not(.is-menu-open.is-menu-open) {
padding: 15px 10px;
@azamatx
azamatx / add_action_print_r_debug.json
Last active November 9, 2021 09:02
VS Code WordPress add_action print_r debug
"add_action_print": {
"prefix": "add",
"body": [
"add_action('init', function() {",
"\tif (isset(\\$_GET['devpre'])) {",
"\t\t\\$templates = get_option('wpb_js_templates');",
"\t\techo '<pre>';",
"\t\tprint_r(\\$templates);",
"\t\techo '</pre>';",
"\t\texit;",