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 | |
/* | |
* Add this code to your theme's functions.php file | |
*/ | |
// Theme activation | |
add_action("after_switch_theme", "theme_activated"); | |
function theme_activation_hook(){ | |
error_log('theme activated'); | |
} |
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
RewriteEngine On | |
RewriteCond %{REQUEST_URI} !^/public/ | |
RewriteRule ^(.*)$ /public/$1 [L,QSA] | |
--- | |
This will silently rewrite all your base URIs to the /public folder. | |
Even all Headers, for example the HTTP Authorization Header, and all | |
optional URI parameters will silently be passed on to the /public folder as well. | |
Applies to web hosts that do not allow to change the home directory. |
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
/** | |
* Global object storing all registered actions | |
* @type {*[]} | |
* @public | |
*/ | |
window.__actions__ = []; | |
/** | |
* Register an action | |
* @param actionName |
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
# | |
# Local .htaccess file | |
# Used to set the "public" directory as the document root | |
### laravel App (https://laravel-site.dev/) | |
# | |
Options +FollowSymLinks -MultiViews | |
# Turn mod_rewrite on | |
RewriteEngine On | |
RewriteBase / |
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
https://github.com/microsoftarchive/redis/ => get redis installer for windows | |
to use redis as cache service, install predis: | |
>> composer require predis/predis |
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 | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.com | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query | |
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php | |
*/ | |
$args = 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
* The least working version for Custom Build React app + scss | |
* Not all entries in package.json are required && can be improved | |
============================================================================= | |
(npm run build or npx webpack) | |
============================================================================= | |
----------------------------- | |
package.json | |
----------------------------- |
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 ($) { | |
"use strict"; | |
/** | |
* Holds the list of all registered actions | |
* @see this.addAction | |
* @see this.hasAction | |
* @see this.doAction | |
* @type {{}} | |
*/ |
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 | |
// v4.7.4 | |
$vc_params_list = array( | |
// Default | |
'textfield', | |
'dropdown', | |
'textarea_html', | |
'checkbox', | |
'posttypes', |
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
/* | |
usage: scrollToElm($containerElement.get(0), $targetItem.get(0), 0.2); | |
url: https://stackoverflow.com/a/51005649 | |
*/ | |
function scrollToElm(container, elm, duration) { | |
var pos = getRelativePos(elm); | |
scrollTo(container, pos.top, duration); // duration in seconds | |
} |
NewerOlder