Skip to content

Instantly share code, notes, and snippets.

View sinanisler's full-sized avatar
🖐️
Hello

sinanisler sinanisler

🖐️
Hello
View GitHub Profile
@sinanisler
sinanisler / gist:3c0afbf4c9f6f37503e6b9573549c06b
Created July 31, 2023 07:19 — forked from CasperKleinn/gist:4696930
HTML: XHTML Starting Template
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="nl">
<head>
<link href="favicon.ico" rel="icon" type="image/ico" />
<link href="style.css" rel="stylesheet" type="text/css" />
<title>Page Title</title>
</head>
<body>
@sinanisler
sinanisler / water.css
Created June 2, 2023 11:30 — forked from AmmarYasserAllaiThy/water.css
Pure CSS3 Water Wave Text Animation Effects Using CSS Clip-path
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
background: #000015;
}
@sinanisler
sinanisler / block.js
Last active May 19, 2023 18:14
simple wordpress block native .js
// put this .js on your theme /blocks/ folder name it your-block.js
(function () {
var registerBlockType = wp.blocks.registerBlockType;
var RichText = wp.blockEditor.RichText;
registerBlockType('your-theme/block', {
title: 'Your Block',
description: 'Add a title and description',
icon: 'smiley',
@sinanisler
sinanisler / functions.php
Created September 28, 2022 12:15
disable wordpress fullscreen default
<?php
if (is_admin()) {
function jba_disable_editor_fullscreen_by_default() {
$script = "jQuery( window ).load(function() { const isFullscreenMode = wp.data.select( 'core/edit-post' ).isFeatureActive( 'fullscreenMode' ); if ( isFullscreenMode ) { wp.data.dispatch( 'core/edit-post' ).toggleFeature( 'fullscreenMode' ); } });";
wp_add_inline_script( 'wp-blocks', $script );
}
add_action( 'enqueue_block_editor_assets', 'jba_disable_editor_fullscreen_by_default' );
}
@sinanisler
sinanisler / .php
Created August 8, 2022 11:57
amelia data
<!DOCTYPE html>
<html lang="en-US" prefix="og: http://ogp.me/ns#">
<head>
<title>CANSULTA Dev &#124; Expertise within reach.</title>
<!-- SEO by Squirrly SEO 12.1.10 - https://plugin.squirrly.co/ -->
<meta name="robots" content="index,follow">
@sinanisler
sinanisler / flarum to wordpress exporter.php
Last active August 20, 2022 12:34
flarum to wordpress exporter
<?php get_header();
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
?>
<div class="blog-page-area pd-bottom-80">
@sinanisler
sinanisler / functions.php
Last active April 19, 2022 17:36
cleaning wp_head and wp_footer and security
<?php
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
remove_action( 'wp_print_styles', 'print_emoji_styles' );
remove_action( 'wp_head', 'rest_output_link_wp_head', 10 );
remove_action ('wp_head', 'rsd_link');
remove_action ('wp_head', 'wlwmanifest_link');
remove_action ('wp_head', 'wp_generator');
remove_action( 'wp_head', 'wp_resource_hints', 2 );
function wps_deregister_styles() {
wp_dequeue_style( 'global-styles' );
@sinanisler
sinanisler / heartbeat-api-demo.php
Created November 14, 2015 18:15 — forked from strangerstudios/heartbeat-api-demo.php
Minimal example demonstrating the WordPress Heartbeat API being added in WP version 3.6.
<?php
/*
Plugin Name: Heartbeat API Demo
Plugin URI: http://www.strangerstudios.com/wp/heartbeat-api-demo
Description: Minimal example demonstrating the WordPress Heartbeat API being added in WP version 3.6.
Version: .1
Author: strangerstudios
If logged in as a user and viewing the frontend of your website,
every 15 seconds you should see the following in your Javascript console: