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( 'transition_post_status', 'mailia_pendingistä', 10, 3 ); | |
function mailia_pendingistä( $vanha_status, $uusi_status, $post_id ) { | |
if ( 'pending' === $uusi_status ) { | |
$post = get_post( $post_id ); | |
wp_mail( | |
get_bloginfo( 'admin_email' ), | |
'Uusi hyväksymistä odottava artikkeli', | |
"{$post->post_title}\n\n{$post->post_content}" |
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"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Ansi 0 Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.25332435965538025</real> |
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 | |
/** | |
* Fetches remote data with dual-layer caching. | |
* | |
* Uses wp_remote_get to fetch remote data. The data is cached twice: it's | |
* stored in a transient and an option. The transient is used as the main cache | |
* but if the transient has expired and the remote site doesn't respond, | |
* backup data from the option is returned. | |
* |
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
#!/bin/sh | |
# Test runner for running Phpunit tests against multiple WordPress versions. | |
# Will fetch and install different WordPress versions in this directory: | |
BASE_PATH=~/multiwptest | |
if [ ! -d $BASE_PATH ] | |
then | |
echo "ERROR: Test directory $BASE_PATH is missing." |
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
{ | |
"repositories": [ | |
{ | |
"type": "package", | |
"package": { | |
"name": "relevanssi/relevanssi-premium", | |
"version": "2.4.4", | |
"type": "wordpress-plugin", | |
"dist": { | |
"type": "zip", |
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 | |
/** | |
* Tests the relevanssi_no_image_attachments function and feature. | |
*/ | |
public function test_no_image_attachments() { | |
$this->delete_all_posts(); | |
$image_attachment = array( | |
'post_title' => 'cat gif', | |
'post_mime_type' => 'image/gif', | |
'post_type' => 'attachment', |
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
<phpunit | |
bootstrap="tests/bootstrap.php" | |
backupGlobals="false" | |
colors="true" | |
convertErrorsToExceptions="true" | |
convertNoticesToExceptions="true" | |
convertWarningsToExceptions="true" | |
> | |
<php> | |
<ini name="display_errors" value="true"/> |
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
Rakas Karl, olen pahoillani, etten koskaan vastannut sinulle. Haluan että tiedät tämän: | |
se johtui pelosta, elämisen pelosta. Ajattein, että en pystyisi elämään odotusten mukaisesti. | |
Ajattelin, että ihminen tarvitsee tabun. En usko siihen enää. Nyt tiedän, että ihminen | |
tarvitsee ihmettä, arjen yläpuolelle nousevaa. Rakkautta. Yhteyttä. Suggestiota. Kaikkea sitä | |
mitä me olimme. | |
Rakastin ja rakastan sinua enemmän kuin mitään koskaan. Anna anteeksi. | |
Mutta ajattele, jos onnistun, saamme elää ikuisesti yhdessä. Ikuisesti! Unohtaminen on | |
kuolemista. Sinä et unohda ikinä. Et unohda meitä. |
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 | |
/** | |
* This will lift all the product categories in the results on top of the results. | |
*/ | |
add_filter( 'relevanssi_hits_filter', 'rlv_lift_category', 20 ); | |
function rlv_lift_category( $hits ) { | |
$categories = array(); | |
$other_posts = array(); | |
foreach ( $hits[0] as $hit ) { |
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 | |
/** | |
* Attachment processing intermediary to work between Relevanssi and a Tika server. | |
* | |
* Installation instructions: | |
* 1. Save this as index.php. | |
* 2. Change the Tika server URL in the constructor to point to your own Tika server. | |
* 3. Upload this file in a directory on your server. | |
* | |
* @author Mikko Saari ([email protected]) |