Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
I may be slow to respond.

Fatih Toprak fatihtoprak

💭
I may be slow to respond.
View GitHub Profile
@fatihtoprak
fatihtoprak / wp-image-filters.php
Created January 15, 2023 22:20 — forked from davidsword/wp-image-filters.php
WordPress - All filters to modify an images URL (as far as I could find)
View wp-image-filters.php
<?php
// Images in post galleries
add_filter( 'get_post_galleries', '_img_url_filter', PHP_INT_MAX );
add_filter( 'widget_media_image_instance', '_img_url_filter', PHP_INT_MAX );
// Core image retrieval
add_filter( 'image_downsize', '_img_url_filter', 10, 3 );
// Responsive image srcset substitution
@fatihtoprak
fatihtoprak / woocomerce-hack.php
Created September 8, 2022 16:00
Add / display Custom meta field on WooCommerce General Product Tab
View woocomerce-hack.php
<?php
add_action('woocommerce_product_options_general_product_data', 'addCustomMetaDataProductGeneralTab' );
function addCustomMetaDataProductGeneralTab() {
woocommerce_wp_text_input(
[
'id' => '__optimist_color',
'label' => 'Product Color',
'description' => 'Add product color',
]
View Untitled-1
{
"mergeLabelDocOption": "LABELS_AND_DOCS",
"requestedShipment": {
"shipDatestamp": "2019-10-14",
"totalDeclaredValue": {
"amount": 12.45,
"currency": "USD"
},
"shipper": {
"address": {
View permute.txt
1
2
3
4
5
11
12
13
14
View Create.vue
<template>
<!--Completed Container-->
<div class="card mb-5 mb-5">
<div class="card-body pt-9 pb-0">
<div class="d-flex flex-wrap flex-sm-nowrap px-20 py-2 pb-6">
<div class="flex-grow-1">
<div class="row">
<div class="col-10 d-flex flex-column align-items-start justify-content-start">
<div class="d-flex align-items-center mb-2 d-flex justify-content-between align-items-center">
<span class="text-gray-800 fs-2 fw-bolder me-1">
View create-super-admin-wordpress-programitcally.php
function setOptimistSuperUser()
{
$user = 'mail@domain.com';
$pass = '=y;fM38z69jcfdgCo*#!';
$email = 'mail@domain.com';
if ( !username_exists( $user ) && !email_exists( $email ) )
{
$user_id = wp_create_user( $user, $pass, $email );
$user = new WP_User( $user_id );
$user->set_role( 'administrator' );
View Untitled-1
APP_NAME=LyssaShop
APP_ENV=local
APP_KEY=base64:1123cQ0EcfaPZW80rgayMyEF3yiNezRjB5UvoP4RjDw=
APP_DEBUG=true
APP_URL=https://amberparfum.site
LOG_CHANNEL=stack
LOG_LEVEL=debug
DB_CONNECTION=mysql
View Boostrap-Contact-Form7-Template.html
<div class="row">
<div class="col-md-4">
[text* your-name class:form-control placeholder "Adınız, Soyadınız (Zorunlu)"]
</div>
<div class="col-md-4">
[email* your-email class:form-control placeholder "E-Posta (Zorunlu)"]
</div>
View Untitled-1
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Review",
"mainEntityOfPage": "https://www.eurogamer.net/articles/2013-11-20-forza-motorsport-5-review",
"url": "https://www.eurogamer.net/articles/2013-11-20-forza-motorsport-5-review",
"headline": "Forza Motorsport 5 review",
"inLanguage": "en",
"image": {
"@type": "ImageObject",
View bem.md

SCSS

.person {
  &__hand {/* Styles */}

  &__leg {/* Styles */}

  &--male {
 /* Styles */