Skip to content

Instantly share code, notes, and snippets.

Avatar
🐘
Herding 🐘

Juliette jrfnl

🐘
Herding 🐘
View GitHub Profile
@jrfnl
jrfnl / wp-survey-and-quiz-tool-nl_NL.po
Created Sep 13, 2012
Dutch translation file for WP Survey and Quiz Tool
View wp-survey-and-quiz-tool-nl_NL.po
# Copyright (C) 2012 WP Survey And Quiz Tool
# This file is distributed under the same license as the WP Survey And Quiz Tool package.
msgid ""
msgstr ""
"Project-Id-Version: WP Survey And Quiz Tool 2.11\n"
"Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-survey-and-quiz-tool\n"
"POT-Creation-Date: 2012-09-13 13:15:40+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@jrfnl
jrfnl / wp-config-debug.php
Last active Aug 4, 2021
Code to add to wp-config.php to enhance information available for debugging.
View wp-config-debug.php
<?php
/**
* == About this Gist ==
*
* Code to add to wp-config.php to enhance information available for debugging.
*
* You would typically add this code below the database, language and salt settings
*
* Oh.. and *do* make sure you change the path to the log file to a proper file path on your server (make sure it exists).
*
View .htaccess for error log dir
# .htaccess voor /path/to/writable/file/logs/
IndexIgnore *
# Don't show directory listings for URLs which map to a directory.
Options All -Indexes
Options +FollowSymLinks
#Refuse access to this directory to all
Order Allow,Deny
@jrfnl
jrfnl / ShortcodeReference.php
Last active Dec 31, 2015
Debugged version of the ShortcodeReference.php file from @bartee's WP plugin Shortcode Reference. Not all the fixes are done in the most efficient way, but at least it (sort of) works now and definitely works better than before.
View ShortcodeReference.php
<?php
/**
* DataContainer for shortcodes.
*
* @author Bart Stroeken
*/
class ShortcodeReference {
/**
* Shortcode
@jrfnl
jrfnl / bccalc.php
Last active Oct 17, 2019
Do simple reliable math calculations without the risk of wrong results using bcmath
View bccalc.php
<?php
/**
* Do simple reliable floating point calculations without the risk of wrong results.
*
* @see http://floating-point-gui.de/
* @see the big red warning on http://php.net/language.types.float.php
*
* In the rare case that the bcmath extension would not be loaded, it will return the
* normal calculation results.
*
@jrfnl
jrfnl / functions-add-icons.php
Created May 26, 2014
Easily add favicon and apple touch and Windows8 icons to the html page header of a WordPress website
View functions-add-icons.php
<?php
/**
* Add favicon and apple touch and Windows8 icons to the html page header of a WordPress website
*
* Add the favicon link properly to the page header so it will work in all browsers
* Add apple touch icons
* Add the Windows8 icons
* Presumes you will add the icons in the theme directory in a subfolder '/images/icons/'
* - adjust if you use another folder.
@jrfnl
jrfnl / _readme.md
Last active May 28, 2021
PHPUnit xslt
View _readme.md

###PHPUnit logfile XLST template

This fileset provides an easy way to view the PHPUnit XML (JUnit) logfiles in a human readable manner using a web browser.

Use this either in combination with the accompanying html file or add the following tag straight after the xml opening tag of the logfile: <?xml-stylesheet type="text/xsl" href="phpunit.xslt"?>

The thresholds used for the colour-coding and whether or not to show detail for successfull tests can be changed by adjusting the variables at the top of the xslt file.

@jrfnl
jrfnl / contributors.html
Last active Jul 1, 2016
GitHub Pages Jekyll/Liquid snippet to display repo contributors.
View contributors.html
<div class="contributors">
{% for contributor in site.github.contributors %}
[![Avatar]({{ contributor.avatar_url }}){: style="width: 30px;"}]({{ contributor.html_url }}) [@{{ contributor.login }}]({{ contributor.html_url }})
{: .contributor }
{% else %}
This project would not be possible without the help of [our amazing contributors] on GitHub.
{% endfor %}
</div>
View Theme-Sniff-Issue-Format
_____Issue Title____
[New sniff] Short rule description (for rules which have to be created from scratch)
[Implement sniff] Short rule description (for rules which exist in WPCS and need to be added to the ruleset)
_____Issue Content____
#### Rule type:
Error / Warning
#### Rule:
@jrfnl
jrfnl / 20180611-phpcs-run-src-only-i18n-translatorscomments.txt
Created Jun 13, 2018
201806 WCEU list of translator comments issues in WP Core
View 20180611-phpcs-run-src-only-i18n-translatorscomments.txt
FILE: src\wp-admin\about.php
--------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
--------------------------------------------------------------------------------------------------------------
21 | WARNING | A gettext call containing placeholders was found, but was not accompanied by a "translators:"
| | comment on the line above to clarify the meaning of the placeholders.
| | (WordPress.WP.I18n.MissingTranslatorsComment)
23 | WARNING | A gettext call containing placeholders was found, but was not accompanied by a "translators:"
| | comment on the line above to clarify the meaning of the placeholders.
| | (WordPress.WP.I18n.MissingTranslatorsComment)