This file contains hidden or 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 | |
| /* | |
| Plugin Name: R Debug | |
| Description: Set of dump helpers for debug. | |
| Author: Andrey "Rarst" Savchenko | |
| Author URI: https://www.rarst.net/ | |
| License: MIT | |
| */ |
This file contains hidden or 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
| { | |
| "name" : "rarst/install-test", | |
| "description" : "Test project for WordPress stack via Composer", | |
| "authors" : [ | |
| { | |
| "name" : "Andrey Savchenko", | |
| "homepage": "http://www.Rarst.net/" | |
| } | |
| ], | |
| "type" : "project", |
This file contains hidden or 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
| curl https://github.com/%1/compare/master...%2.diff > patches/%2.diff |
This file contains hidden or 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 | |
| namespace Rarst; | |
| /** | |
| * Discover where is array global being modified, because WordPress. | |
| */ | |
| class Global_Sniffer implements \ArrayAccess { | |
| protected $name; |
This file contains hidden or 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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <templateSet group="WordPress"> | |
| <template name="aa" value="add_action( '$hook$', '$callback$' ); $END$" description="add_action" toReformat="false" toShortenFQNames="true"> | |
| <variable name="hook" expression="" defaultValue="" alwaysStopAt="true" /> | |
| <variable name="callback" expression="" defaultValue="" alwaysStopAt="true" /> | |
| <context> | |
| <option name="HTML_TEXT" value="false" /> | |
| <option name="HTML" value="false" /> | |
| <option name="XSL_TEXT" value="false" /> | |
| <option name="XML" value="false" /> |
This file contains hidden or 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_action( 'init', function () { | |
| if ( ! function_exists( 'afc_add_item' ) || ! function_exists( 'apc_clear_cache' ) ) { | |
| return; | |
| } | |
| afc_add_item( array( | |
| 'id' => 'apc', |
This file contains hidden or 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 | |
| function is_user_logged_in() { | |
| $loggedin = false; | |
| foreach ( (array) $_COOKIE as $cookie => $value ) { | |
| if ( stristr($cookie, 'wordpress_logged_in_') ) | |
| $loggedin = true; | |
| } | |
| return $loggedin; | |
| } | |
| if ( ! stristr($_SERVER['REQUEST_URI'], '/wp-admin') && ! stristr($_SERVER['REQUEST_URI'], '/wp-login.php') && ! is_user_logged_in() ) |
This file contains hidden or 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
| This program is free software: you can redistribute it and/or modify | |
| it under the terms of the GNU General Public License as published by | |
| the Free Software Foundation, either version 2 of the License, or | |
| (at your option) any later version. | |
| This program is distributed in the hope that it will be useful, | |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| GNU General Public License for more details. |
This file contains hidden or 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
| {{ with getJSON "https://noti.st/rarst.json" }} | |
| <h3 class="text-left">Latest Talk</h3> | |
| {{ $talks := (index .data 0).relationships.data }} | |
| {{ $latest :=index $talks 0 }} | |
| <a href="{{ $latest.links.self }}"> | |
| <img src="{{ $latest.attributes.image.src }}" alt="{{ $latest.attributes.title }}" | |
| class="img-responsive" style="max-height: 210px;border: 1px solid #eee" loading="lazy"/> | |
| </a> | |
| {{ end }} |
NewerOlder