(function (wp) {
const el = wp.element.createElement;
if (!wp.plugins) {
return;
}
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
{% comment %} First page {% endcomment %} | |
{% comment %} [<] [1] 2 3 [>] {% endcomment %} | |
{% comment %} Second page {% endcomment %} | |
{% comment %} [<] 1 [2] 3 [>] {% endcomment %} | |
{% comment %} Third page {% endcomment %} | |
{% comment %} [<] 1 2 [3] [>] {% endcomment %} | |
{%- if paginate.parts.size > 0 -%} | |
<div class="blog-mb__pagination"> | |
<div class="blog-mb__p-inner"> |
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
const repeatWithTimeout = (action, interval) => { | |
let timerId; | |
function repeat() { | |
action(); | |
timerId = setTimeout(repeat, interval); | |
} | |
repeat(); | |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Pagination with Alpine.js</title>
<script
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/cdn.min.js"
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 | |
require_once( dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) . '/wp-load.php' ); |
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 | |
$final_submission = []; | |
if ( isset( $_FILES['files'] ) && is_array( $_FILES['files']) && !empty( $_FILES['files'] ) ) { | |
$files = $_FILES['files']; | |
$allowed_file_types = ['image/jpeg', 'image/png', 'video/mp4']; | |
$max_file_size = 5 * 1024 * 1024; // 5MB | |
$max_files = 5; |
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
class AdevScrollState { | |
constructor(element) { | |
this.scrollableEl = this.selectElement(element); | |
if (this.scrollableEl === null) return console.error("AdevScrollState: Element not found"); | |
this.isScrollable = false; | |
this.isScrolled = false; | |
this.isAtTop = false; | |
this.isAtBottom = 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
# Directory access disable | |
<IfModule mod_autoindex.c> | |
Options -Indexes | |
</IfModule> | |
# Custom HTTP headers for specific file types. | |
<IfModule mod_alias.c> | |
<FilesMatch "\.(html|htm|rtf|rtx|txt|xsd|xsl|xml)$"> | |
<IfModule mod_headers.c> | |
Header set X-Powered-By "WordPress/Adev" |
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 adevCreateFormData(formData, key, data) { | |
if (data === Object(data) || Array.isArray(data)) { | |
for (var i in data) { | |
adevCreateFormData(formData, key + '[' + i + ']', data[i]); | |
} | |
} else { | |
formData.append(key, data); | |
} | |
} |
WARNING: USE AT YOUR OWN RISK.
Create a folder on any disk, for example, D:\python_scripts
and add that folder to the system environment variable path. create new file eg: 'xampp.py' in that folder.
paste this code and rename the xampp_path
variable to the path where you have installed xampp.
import subprocess
import os
import time
NewerOlder