Add upstream

This commit is contained in:
root
2019-10-24 00:12:05 +02:00
parent 85d41e4216
commit ac980f592c
3504 changed files with 1049983 additions and 29971 deletions

View File

@@ -0,0 +1 @@
.progress-container{position:absolute;width:100%;height:100%;background:rgba(255,255,255,0.8);top:0;left:0;z-index:90000000000}@-webkit-keyframes load{0%{stroke-dashoffset:0}50%{stroke-dashoffset:630}100%{stroke-dashoffset:0}}@keyframes load{0%{stroke-dashoffset:0}50%{stroke-dashoffset:630}100%{stroke-dashoffset:0}}.progress-container .progress{position:relative;display:inline-block;padding:0;text-align:center;display:block;margin-top:15%}.progress-container .progress .dashicons.dashicons-yes{font-size:170px;position:relative;right:174px;font-weight:200;visibility:hidden}.progress-container .progress>li{display:inline-block;position:relative;text-align:center;color:#93A2AC;font-family:Lato;font-weight:100;margin:2rem}.progress-container .progress svg{width:10rem;height:10rem}.progress-container .progress svg:nth-child(2){position:absolute;left:0;top:0;transform:rotate(-90deg);-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-ms-transform:rotate(-90deg)}.progress-container .progress svg:nth-child(2) path{fill:none;stroke-width:7;stroke-dasharray:629;stroke:rgba(255,255,255,0.9);-webkit-animation:load 5s;animation:load 5s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.progress-container.success .progress .dashicons.dashicons-yes{visibility:visible}.progress-container.success .progress svg:nth-child(2) path{stroke:rgba(255,255,255,0)}.attachments-browser.fap-media .media-sidebar .lh-logo{visibility:visible !important;position:absolute;width:267px;bottom:25px}.attachments-browser.fap-media .media-sidebar .lh-logo img{max-width:215px;display:block;margin:auto}.attachments-browser.fap-media .media-sidebar .lh-logo:before{content:"powered by";display:block;text-align:center;font-size:10px}.broadcast{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;adjust-items:center;-webkit-flex-flow:column;-ms-flex-flow:column;flex-flow:column;position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;background-color:rgba(255,255,255,0.9);z-index:99999}.broadcast p{padding-left:30%;padding-right:30%;font-weight:bold;font-size:24px;line-height:1.5em;text-align:center}.broadcast a.close_broadcast{display:inline-block;padding:8px 20px;background-color:#008ec2!important;color:#fff;cursor:pointer;border-radius:4px}.broadcast.closed{display:none}

View File

@@ -0,0 +1,38 @@
<?php
/**
* @package lh_fap
*/
/*
Plugin Name: free-images.cc Importer
Plugin URI: http://www.free-images.cc/plugin
Description: This plugin integrates the free-images.cc image library into your media browser. With this you have beautiful, free imagery available at the tip of your fingers.
Author: Luehrsen // Heinrich
Author URI: http://www.luehrsen-heinrich.de
Version: 0.6.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: free, images, image, pictures, media, import, creative commons
Domain Path: /lang
Text Domain: lhf
*/
// Make sure we don't expose any info if called directly
if ( !function_exists( 'add_action' ) ) {
echo 'Hi there! I\'m just a plugin, not much I can do when called directly.';
exit;
}
define( 'LHFAP__PLUGIN_URL', plugin_dir_url( __FILE__ ) );
define( 'LHFAP__PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
define( 'LHFAP__PLUGIN_FILE', ( __FILE__ ) );
// Require needed files
require_once( LHFAP__PLUGIN_DIR . "/inc/lhfap.core.php" ); // The actual core of the plugin
require_once( LHFAP__PLUGIN_DIR . "/inc/lhfap.admin.php" ); // The administrational backend functions of the plugin
require_once( LHFAP__PLUGIN_DIR . "/inc/lhfap.import.php" ); // The administrational backend functions of the plugin
require_once( LHFAP__PLUGIN_DIR . "/inc/lhfap.templates.php" ); // The templates for our media frame view
// Initialize the class
$lh_fap = new LH_Fap_Plugin();

View File

@@ -0,0 +1,197 @@
<svg version="1.1" id="lh_logo_svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="294px" height="44px" viewBox="0 0 294 44" xml:space="preserve">
<g>
<g clip-path="logo">
<path class="lh-blue-BG" clip-path="url(#SVGID_2_)" fill="#1564A1" d="M160.71,23.993l7.938-20.976h125.02v20.976 M189.207,21.047v-1.496
l-1.123-0.221c-0.264-0.065-0.308-0.242-0.308-0.395V8.505c0-0.153,0.044-0.33,0.308-0.396l1.123-0.22V6.393h-5.172v1.496
l1.145,0.22c0.264,0.066,0.309,0.243,0.309,0.396v4.159h-8.34V8.505c0-0.153,0.045-0.33,0.309-0.396l1.122-0.22V6.393h-5.171v1.496
l1.145,0.22c0.264,0.066,0.308,0.243,0.308,0.396v10.43c0,0.153-0.044,0.33-0.308,0.395l-1.145,0.221v1.496h5.171v-1.496
l-1.122-0.221c-0.264-0.065-0.309-0.242-0.309-0.395v-4.467h8.34v4.467c0,0.153-0.045,0.33-0.309,0.395l-1.145,0.221v1.496H189.207
z M203.836,21.047v-1.959h-8.075V14.49h7.812v-1.914h-7.812V8.352h8.075V6.393H192.02v1.496l1.145,0.22
c0.264,0.066,0.309,0.243,0.309,0.396v10.43c0,0.153-0.045,0.33-0.309,0.395l-1.145,0.221v1.496H203.836z M211.49,21.047v-1.496
l-1.122-0.221c-0.263-0.065-0.308-0.242-0.308-0.395V8.505c0-0.153,0.045-0.33,0.308-0.396l1.122-0.22V6.393h-5.17v1.496
l1.144,0.22c0.265,0.066,0.309,0.243,0.309,0.396v10.43c0,0.153-0.044,0.33-0.309,0.395l-1.144,0.221v1.496H211.49z M230.721,7.889
V6.393h-5.018v1.496l1.145,0.22c0.264,0.066,0.308,0.243,0.308,0.396v10.056c0,0.351-0.044,0.616-0.462,0.616
c-0.264,0-0.374-0.132-0.506-0.418l-5.854-12.366h-6.028v1.496l1.144,0.22c0.265,0.066,0.309,0.243,0.309,0.396v10.43
c0,0.153-0.044,0.33-0.309,0.395l-1.144,0.221v1.496h4.995v-1.496l-1.123-0.221c-0.264-0.065-0.308-0.242-0.308-0.395V8.682
c0-0.375,0.044-0.595,0.462-0.595c0.286,0,0.374,0.11,0.506,0.418l5.897,12.542h4.532V8.505c0-0.153,0.045-0.33,0.309-0.396
L230.721,7.889z M237.274,14.645h4.378v2.265l2.751,4.137h3.234v-1.496l-0.858-0.198c-0.484-0.111-0.748-0.176-1.012-0.572
l-2.377-3.499c-0.109-0.154-0.197-0.264-0.197-0.44c0-0.352,0.264-0.397,0.572-0.44c0.836-0.087,1.693-0.375,2.266-1.012
c0.616-0.683,0.924-1.628,0.924-2.882c0-3.037-1.144-4.115-4.532-4.115h-8.89v1.496l1.145,0.22
c0.264,0.066,0.309,0.243,0.309,0.396v10.43c0,0.153-0.045,0.33-0.309,0.395l-1.145,0.221v1.496h5.172v-1.496l-1.123-0.221
c-0.264-0.065-0.308-0.242-0.308-0.395V14.645z M244.579,10.529c0,0.705-0.022,1.277-0.418,1.672
c-0.353,0.309-1.034,0.529-2.509,0.529h-4.378V8.329h4.378c1.475,0,2.156,0.198,2.509,0.529
C244.557,9.253,244.579,9.848,244.579,10.529 M255.314,21.047v-1.496l-1.122-0.221c-0.265-0.065-0.308-0.242-0.308-0.395V8.505
c0-0.153,0.043-0.33,0.308-0.396l1.122-0.22V6.393h-5.171v1.496l1.144,0.22c0.265,0.066,0.309,0.243,0.309,0.396v10.43
c0,0.153-0.044,0.33-0.309,0.395l-1.144,0.221v1.496H255.314z M270.363,20.563l-0.309-1.87c0,0-2.597,0.506-4.885,0.506
c-4.334,0-4.775-1.232-4.775-5.479c0-4.423,0.441-5.435,4.842-5.435c2.288,0,4.818,0.528,4.818,0.528l0.309-1.957
c0,0-2.575-0.639-5.392-0.639c-5.148,0-6.931,1.32-6.931,7.503c0,6.182,1.782,7.481,6.931,7.481
C267.788,21.201,270.363,20.563,270.363,20.563 M288.668,21.047v-1.496l-1.123-0.221c-0.264-0.065-0.308-0.242-0.308-0.395V8.505
c0-0.153,0.044-0.33,0.308-0.396l1.123-0.22V6.393h-5.172v1.496l1.145,0.22c0.264,0.066,0.309,0.243,0.309,0.396v4.159h-8.34V8.505
c0-0.153,0.045-0.33,0.309-0.396l1.122-0.22V6.393h-5.171v1.496l1.145,0.22c0.264,0.066,0.308,0.243,0.308,0.396v10.43
c0,0.153-0.044,0.33-0.308,0.395l-1.145,0.221v1.496h5.171v-1.496l-1.122-0.221c-0.264-0.065-0.309-0.242-0.309-0.395v-4.467h8.34
v4.467c0,0.153-0.045,0.33-0.309,0.395l-1.145,0.221v1.496H288.668z"/>
<path class="lh-blue-BG" clip-path="url(#SVGID_2_)" fill="#1564A1" d="M141.434,3.017l-7.937,20.977H0V3.017 M14.454,21.047v-1.98H7.149V8.505
c0-0.153,0.044-0.33,0.308-0.395l1.122-0.221V6.393h-5.17v1.496L4.553,8.11c0.264,0.065,0.308,0.242,0.308,0.395v10.43
c0,0.153-0.044,0.33-0.308,0.395l-1.144,0.221v1.496H14.454z M31.791,7.889V6.393H26.62v1.496l1.144,0.221
c0.264,0.065,0.309,0.242,0.309,0.395v10.254c0,0-1.937,0.506-4.445,0.506c-3.037,0-3.543-0.572-3.543-3.63v-7.13
c0-0.153,0.044-0.33,0.308-0.395l1.122-0.221V6.393h-5.17v1.496l1.144,0.221c0.264,0.065,0.308,0.242,0.308,0.395v7.415
c0,4.049,1.056,5.282,5.633,5.282c0.616,0,1.826-0.111,1.826-0.111l1.826-1.188c0.198-0.132,0.352-0.264,0.594-0.264
c0.419,0,0.463,0.309,0.506,0.484l0.154,0.924h3.455v-1.496l-1.122-0.221c-0.264-0.065-0.308-0.242-0.308-0.395V8.505
c0-0.153,0.044-0.33,0.308-0.395L31.791,7.889z M46.397,21.047v-1.959h-8.075v-4.597h7.811v-1.915h-7.811V8.352h8.075V6.393H34.582
v1.496l1.144,0.221c0.265,0.065,0.309,0.242,0.309,0.395v10.43c0,0.153-0.044,0.33-0.309,0.395l-1.144,0.221v1.496H46.397z
M64.68,21.047v-1.496l-1.122-0.221c-0.264-0.065-0.308-0.242-0.308-0.395V8.505c0-0.153,0.044-0.33,0.308-0.395l1.122-0.221V6.393
h-5.17v1.496l1.144,0.221c0.264,0.065,0.308,0.242,0.308,0.395v4.159h-8.339V8.505c0-0.153,0.044-0.33,0.308-0.395l1.122-0.221
V6.393h-5.171v1.496l1.144,0.221c0.264,0.065,0.308,0.242,0.308,0.395v10.43c0,0.153-0.044,0.33-0.308,0.395l-1.144,0.221v1.496
h5.171v-1.496l-1.122-0.221c-0.264-0.065-0.308-0.242-0.308-0.395v-4.467h8.339v4.467c0,0.153-0.044,0.33-0.308,0.395l-1.144,0.221
v1.496H64.68z M71.235,14.645h4.378v2.265l2.751,4.137h3.234v-1.496l-0.858-0.198c-0.484-0.11-0.748-0.176-1.012-0.571
l-2.377-3.499c-0.109-0.155-0.198-0.265-0.198-0.441c0-0.351,0.264-0.396,0.572-0.439c0.836-0.088,1.695-0.375,2.267-1.013
c0.616-0.683,0.924-1.628,0.924-2.882c0-3.037-1.144-4.115-4.533-4.115h-8.889v1.496l1.144,0.221
c0.264,0.065,0.308,0.242,0.308,0.395v10.43c0,0.153-0.044,0.33-0.308,0.395l-1.144,0.221v1.496h5.171v-1.496l-1.123-0.221
c-0.263-0.065-0.307-0.242-0.307-0.395V14.645z M78.539,10.53c0,0.704-0.022,1.276-0.418,1.671
c-0.352,0.309-1.034,0.529-2.508,0.529h-4.378V8.329h4.378c1.474,0,2.156,0.199,2.508,0.529
C78.517,9.253,78.539,9.848,78.539,10.53 M89.979,21.202c3.476,0,5.721-0.594,5.721-4.578c0-4.114-2.685-4.005-5.897-4.158
c-2.025-0.089-3.521,0.023-3.521-2.156c0-2.2,2.112-2.112,3.829-2.112c1.914,0,4.488,0.505,4.488,0.505l0.309-1.914
c0,0-2.443-0.55-5.171-0.55c-3.895,0-5.721,0.924-5.721,4.357c0,3.982,2.64,3.916,5.941,4.137c2.398,0.153,3.432-0.045,3.432,2.244
c0,2.244-1.98,2.244-3.674,2.244c-2.289,0-5.127-0.551-5.127-0.551l-0.264,1.938C84.324,20.608,86.92,21.202,89.979,21.202
M110.22,21.047v-1.959h-8.076v-4.597h7.811v-1.915h-7.811V8.352h8.076V6.393H98.404v1.496l1.144,0.221
c0.264,0.065,0.308,0.242,0.308,0.395v10.43c0,0.153-0.044,0.33-0.308,0.395l-1.144,0.221v1.496H110.22z M129.118,7.889V6.393
h-5.017v1.496l1.144,0.221c0.264,0.065,0.308,0.242,0.308,0.395v10.056c0,0.351-0.044,0.616-0.462,0.616
c-0.264,0-0.374-0.132-0.506-0.418l-5.853-12.366h-6.029v1.496l1.144,0.221c0.265,0.065,0.309,0.242,0.309,0.395v10.43
c0,0.153-0.044,0.33-0.309,0.395l-1.144,0.221v1.496h4.995v-1.496l-1.122-0.221c-0.264-0.065-0.308-0.242-0.308-0.395V8.682
c0-0.375,0.044-0.595,0.462-0.595c0.286,0,0.374,0.111,0.506,0.418l5.897,12.542h4.532V8.505c0-0.153,0.045-0.33,0.308-0.395
L129.118,7.889z"/>
<polygon class="lh-slashes" clip-path="url(#SVGID_2_)" fill="#010202" points="147.806,0 151.838,0 141.219,27.676 137.186,27.676 "/>
<polygon class="lh-slashes" clip-path="url(#SVGID_2_)" fill="#010202" points="160.828,0 164.861,0 154.242,27.676 150.21,27.676 "/>
</g>
<g clip-path="claim">
<path class="lh-claim" fill="#676767" d="M10.555,42.794l0.475-0.105c0.119-0.026,0.211-0.04,0.211-0.158c0-0.066-0.013-0.106-0.053-0.212
l-0.449-1.161H6.16l-0.476,1.188c-0.04,0.093-0.053,0.133-0.053,0.186c0,0.118,0.093,0.145,0.225,0.171l0.462,0.093v0.897H3.375
v-0.897l0.607-0.132c0.198-0.04,0.264-0.132,0.33-0.304l2.626-6.124c0.066-0.159,0.026-0.277-0.145-0.304l-0.7-0.119v-0.91h3.538
l2.97,7.457c0.105,0.237,0.185,0.264,0.422,0.316l0.554,0.119v0.897h-3.022V42.794z M8.787,36.194
c-0.079-0.198-0.119-0.304-0.317-0.304c-0.198,0-0.237,0.105-0.317,0.304l-1.557,3.881h3.722L8.787,36.194z"/>
<path class="lh-claim" fill="#676767" d="M21.062,43.691l-0.093-0.555c-0.026-0.105-0.053-0.29-0.303-0.29c-0.146,0-0.238,0.079-0.356,0.158
l-1.096,0.713c0,0-0.607,0.066-0.977,0.066c-2.996,0-3.867-0.739-3.867-4.475c0-3.775,1.082-4.487,4.158-4.487
c1.689,0,3.366,0.436,3.366,0.436l-0.172,1.174c0,0-1.861-0.356-3.3-0.356c-2.006,0-2.64,0.277-2.64,3.234
c0,2.996,0.475,3.286,2.547,3.286c1.214,0,2.099-0.172,2.429-0.251v-3.432h1.386v4.778H21.062z"/>
<path class="lh-claim" fill="#676767" d="M23.859,43.691v-0.897l0.687-0.132c0.158-0.04,0.185-0.146,0.185-0.238v-6.256
c0-0.093-0.026-0.198-0.185-0.237l-0.687-0.132v-0.897h7.088v1.174h-4.844v2.534h4.686v1.148h-4.686v2.759h4.844v1.175H23.859z"/>
<path class="lh-claim" fill="#676767" d="M41.599,35.931c-0.159,0.039-0.185,0.145-0.185,0.237v7.523h-2.719l-3.538-7.523
c-0.079-0.185-0.132-0.251-0.303-0.251c-0.251,0-0.277,0.132-0.277,0.356v6.15c0,0.093,0.026,0.198,0.185,0.238l0.673,0.132v0.897
h-2.996v-0.897l0.687-0.132c0.158-0.04,0.185-0.146,0.185-0.238v-6.256c0-0.093-0.026-0.198-0.185-0.237l-0.687-0.132v-0.897
h3.617l3.511,7.417c0.079,0.172,0.145,0.251,0.304,0.251c0.25,0,0.277-0.158,0.277-0.369v-6.032c0-0.093-0.026-0.198-0.185-0.237
l-0.687-0.132v-0.897h3.009v0.897L41.599,35.931z"/>
<path class="lh-claim" fill="#676767" d="M47.854,36.089v6.335c0,0.093,0.026,0.198,0.185,0.238l0.686,0.132v0.897h-3.115v-0.897l0.686-0.132
c0.159-0.04,0.185-0.146,0.185-0.238v-6.335h-3.287v-1.188h7.946v1.188H47.854z"/>
<path class="lh-claim" fill="#676767" d="M60.697,35.931c-0.158,0.039-0.185,0.145-0.185,0.237v6.256c0,0.093,0.026,0.198,0.185,0.238l0.673,0.132
v0.897h-2.072l-0.092-0.555c-0.026-0.105-0.053-0.29-0.304-0.29c-0.145,0-0.237,0.079-0.356,0.158l-1.095,0.713
c0,0-0.726,0.066-1.096,0.066c-2.745,0-3.379-0.739-3.379-3.168v-4.448c0-0.093-0.026-0.198-0.185-0.237l-0.687-0.132v-0.897
h3.102v0.897l-0.673,0.132c-0.158,0.039-0.185,0.145-0.185,0.237v4.276c0,1.835,0.304,2.178,2.125,2.178
c1.505,0,2.667-0.304,2.667-0.304v-6.15c0-0.093-0.026-0.198-0.185-0.237l-0.686-0.132v-0.897h3.102v0.897L60.697,35.931z"/>
<path class="lh-claim" fill="#676767" d="M65.29,42.424c0,0.093,0.026,0.198,0.185,0.238l0.673,0.132v0.897h-3.102v-0.897l0.687-0.132
c0.158-0.04,0.185-0.146,0.185-0.238v-6.256c0-0.093-0.026-0.198-0.185-0.237l-0.687-0.132v-0.897h5.333
c2.032,0,2.719,0.646,2.719,2.468c0,0.752-0.185,1.32-0.554,1.729c-0.343,0.383-0.858,0.554-1.359,0.606
c-0.185,0.026-0.343,0.053-0.343,0.265c0,0.105,0.053,0.171,0.119,0.264l1.425,2.099c0.159,0.237,0.317,0.277,0.607,0.343
l0.515,0.119v0.897h-1.94l-1.649-2.481v-1.359H65.29V42.424z M69.421,36.379c-0.211-0.197-0.62-0.316-1.504-0.316H65.29v2.64
h2.627c0.884,0,1.293-0.132,1.504-0.316c0.238-0.238,0.251-0.581,0.251-1.003C69.672,36.974,69.659,36.617,69.421,36.379z"/>
<path class="lh-claim" fill="#676767" d="M78.199,36.075v2.601h4.409v1.175h-4.409v2.573c0,0.093,0.026,0.198,0.185,0.238l0.673,0.132v0.897h-3.102
v-0.897l0.687-0.132c0.158-0.04,0.185-0.146,0.185-0.238v-6.256c0-0.093-0.026-0.198-0.185-0.237l-0.687-0.132v-0.897h6.811v1.174
H78.199z"/>
<path class="lh-claim" fill="#676767" d="M92.559,35.931c-0.158,0.039-0.185,0.145-0.185,0.237v6.256c0,0.093,0.026,0.198,0.185,0.238l0.673,0.132
v0.897H91.16l-0.092-0.555c-0.026-0.105-0.053-0.29-0.304-0.29c-0.145,0-0.237,0.079-0.356,0.158l-1.095,0.713
c0,0-0.726,0.066-1.096,0.066c-2.745,0-3.379-0.739-3.379-3.168v-4.448c0-0.093-0.026-0.198-0.185-0.237l-0.687-0.132v-0.897
h3.102v0.897l-0.673,0.132c-0.158,0.039-0.185,0.145-0.185,0.237v4.276c0,1.835,0.304,2.178,2.125,2.178
c1.505,0,2.667-0.304,2.667-0.304v-6.15c0-0.093-0.026-0.198-0.185-0.237l-0.686-0.132v-0.897h3.102v0.897L92.559,35.931z
M86.897,33.897V32.75h1.333v1.147H86.897z M89.141,33.897V32.75h1.333v1.147H89.141z"/>
<path class="lh-claim" fill="#676767" d="M97.152,42.424c0,0.093,0.026,0.198,0.185,0.238l0.673,0.132v0.897h-3.102v-0.897l0.687-0.132
c0.158-0.04,0.185-0.146,0.185-0.238v-6.256c0-0.093-0.026-0.198-0.185-0.237l-0.687-0.132v-0.897h5.333
c2.032,0,2.719,0.646,2.719,2.468c0,0.752-0.185,1.32-0.554,1.729c-0.343,0.383-0.858,0.554-1.359,0.606
c-0.185,0.026-0.343,0.053-0.343,0.265c0,0.105,0.053,0.171,0.119,0.264l1.425,2.099c0.159,0.237,0.317,0.277,0.607,0.343
l0.515,0.119v0.897h-1.94l-1.649-2.481v-1.359h-2.627V42.424z M101.284,36.379c-0.211-0.197-0.62-0.316-1.504-0.316h-2.627v2.64
h2.627c0.884,0,1.293-0.132,1.504-0.316c0.238-0.238,0.251-0.581,0.251-1.003C101.535,36.974,101.521,36.617,101.284,36.379z"/>
<path class="lh-claim" fill="#676767" d="M119.05,35.799l-0.687,0.132c-0.158,0.039-0.185,0.145-0.185,0.237v6.256c0,0.093,0.026,0.198,0.185,0.238
l0.687,0.132v0.897h-3.115v-0.897l0.687-0.132c0.158-0.04,0.185-0.146,0.185-0.238v-6.15c0-0.211-0.04-0.356-0.277-0.356
c-0.211,0-0.264,0.146-0.343,0.304l-1.94,4.514h-1.729l-1.993-4.566c-0.066-0.132-0.132-0.251-0.303-0.251
c-0.251,0-0.277,0.146-0.277,0.356v6.15c0,0.093,0.026,0.198,0.185,0.238l0.673,0.132v0.897h-2.983v-0.897l0.687-0.132
c0.158-0.04,0.185-0.146,0.185-0.238v-6.256c0-0.093-0.026-0.198-0.185-0.237l-0.687-0.132v-0.897h3.59l1.861,4.526
c0.026,0.04,0.053,0.093,0.132,0.093c0.066,0,0.105-0.053,0.119-0.093l1.834-4.526h3.696V35.799z"/>
<path class="lh-claim" fill="#676767" d="M120.739,43.691v-0.897l0.687-0.132c0.158-0.04,0.185-0.146,0.185-0.238v-6.256
c0-0.093-0.026-0.198-0.185-0.237l-0.687-0.132v-0.897h7.088v1.174h-4.844v2.534h4.686v1.148h-4.686v2.759h4.844v1.175H120.739z"
/>
<path class="lh-claim" fill="#676767" d="M134.308,43.691h-4.989v-0.897l0.687-0.132c0.158-0.04,0.185-0.146,0.185-0.238v-6.256
c0-0.093-0.026-0.198-0.185-0.237l-0.687-0.132v-0.897h4.989c3.537,0,3.788,1.821,3.788,4.382S137.845,43.691,134.308,43.691z
M134.281,36.062h-2.719v6.468h2.719c2.375,0,2.402-1.268,2.402-3.234C136.683,37.316,136.657,36.062,134.281,36.062z"/>
<path class="lh-claim" fill="#676767" d="M139.732,43.691v-0.897l0.687-0.132c0.158-0.04,0.185-0.146,0.185-0.238v-6.256
c0-0.093-0.026-0.198-0.185-0.237l-0.687-0.132v-0.897h3.102v0.897l-0.673,0.132c-0.159,0.039-0.185,0.145-0.185,0.237v6.256
c0,0.093,0.026,0.198,0.185,0.238l0.673,0.132v0.897H139.732z"/>
<path class="lh-claim" fill="#676767" d="M144.523,43.691v-0.897l0.687-0.132c0.158-0.04,0.185-0.146,0.185-0.238v-6.256
c0-0.093-0.026-0.198-0.185-0.237l-0.687-0.132v-0.897h7.088v1.174h-4.844v2.534h4.686v1.148h-4.686v2.759h4.844v1.175H144.523z"
/>
<path class="lh-claim" fill="#676767" d="M162.263,35.931c-0.158,0.039-0.185,0.145-0.185,0.237v7.523h-2.72l-3.537-7.523
c-0.079-0.185-0.132-0.251-0.304-0.251c-0.25,0-0.276,0.132-0.276,0.356v6.15c0,0.093,0.026,0.198,0.185,0.238l0.673,0.132v0.897
h-2.996v-0.897l0.687-0.132c0.158-0.04,0.185-0.146,0.185-0.238v-6.256c0-0.093-0.026-0.198-0.185-0.237l-0.687-0.132v-0.897
h3.616l3.511,7.417c0.08,0.172,0.146,0.251,0.304,0.251c0.251,0,0.277-0.158,0.277-0.369v-6.032c0-0.093-0.026-0.198-0.185-0.237
l-0.687-0.132v-0.897h3.01v0.897L162.263,35.931z"/>
<path class="lh-claim" fill="#676767" d="M172.875,35.799l-0.674,0.185c-0.211,0.053-0.329,0.105-0.475,0.251l-3.062,2.996l3.313,3.102
c0.277,0.264,0.304,0.29,0.633,0.356l0.476,0.092v0.911h-3.26v-0.897l0.383-0.066c0.132-0.026,0.25-0.053,0.25-0.211
c0-0.079-0.053-0.146-0.105-0.185l-2.468-2.31c-0.172-0.146-0.344-0.317-0.581-0.317c-0.33,0-0.422,0.186-0.422,0.488v2.23
c0,0.093,0.026,0.198,0.185,0.238l0.673,0.132v0.897h-3.102v-0.897l0.687-0.132c0.158-0.04,0.185-0.146,0.185-0.238v-6.256
c0-0.093-0.026-0.198-0.185-0.237l-0.687-0.132v-0.897h3.102v0.897l-0.673,0.132c-0.158,0.039-0.185,0.145-0.185,0.237v2.218
c0,0.304,0.092,0.488,0.422,0.488c0.237,0,0.423-0.158,0.581-0.317l2.376-2.349c0.053-0.053,0.079-0.093,0.079-0.172
c0-0.132-0.093-0.172-0.212-0.185l-0.369-0.053v-0.897h3.115V35.799z"/>
<path class="lh-claim" fill="#676767" d="M178.049,43.784c-3.512,0-3.907-0.964-3.907-4.475c0-3.775,0.541-4.501,3.894-4.501
c3.524,0,3.881,0.95,3.881,4.501S181.546,43.784,178.049,43.784z M178.035,35.957c-2.23,0-2.481,0.33-2.481,3.353
c0,2.864,0.185,3.312,2.495,3.312c2.362,0,2.454-0.475,2.454-3.312C180.503,36.551,180.477,35.957,178.035,35.957z"/>
<path class="lh-claim" fill="#676767" d="M194.785,35.799l-0.687,0.132c-0.158,0.039-0.185,0.145-0.185,0.237v6.256
c0,0.093,0.026,0.198,0.185,0.238l0.687,0.132v0.897h-3.115v-0.897l0.687-0.132c0.158-0.04,0.185-0.146,0.185-0.238v-6.15
c0-0.211-0.039-0.356-0.277-0.356c-0.211,0-0.264,0.146-0.343,0.304l-1.94,4.514h-1.729l-1.993-4.566
c-0.066-0.132-0.132-0.251-0.304-0.251c-0.251,0-0.277,0.146-0.277,0.356v6.15c0,0.093,0.026,0.198,0.185,0.238l0.674,0.132v0.897
h-2.983v-0.897l0.687-0.132c0.158-0.04,0.185-0.146,0.185-0.238v-6.256c0-0.093-0.026-0.198-0.185-0.237l-0.687-0.132v-0.897h3.59
l1.861,4.526c0.026,0.04,0.053,0.093,0.132,0.093c0.066,0,0.105-0.053,0.119-0.093l1.834-4.526h3.696V35.799z"/>
<path class="lh-claim" fill="#676767" d="M207.707,35.799l-0.687,0.132c-0.158,0.039-0.185,0.145-0.185,0.237v6.256
c0,0.093,0.026,0.198,0.185,0.238l0.687,0.132v0.897h-3.115v-0.897l0.687-0.132c0.158-0.04,0.185-0.146,0.185-0.238v-6.15
c0-0.211-0.039-0.356-0.277-0.356c-0.211,0-0.264,0.146-0.343,0.304l-1.94,4.514h-1.729l-1.993-4.566
c-0.066-0.132-0.132-0.251-0.304-0.251c-0.251,0-0.277,0.146-0.277,0.356v6.15c0,0.093,0.026,0.198,0.185,0.238l0.674,0.132v0.897
h-2.983v-0.897l0.687-0.132c0.158-0.04,0.185-0.146,0.185-0.238v-6.256c0-0.093-0.026-0.198-0.185-0.237l-0.687-0.132v-0.897h3.59
l1.861,4.526c0.026,0.04,0.053,0.093,0.132,0.093c0.066,0,0.105-0.053,0.119-0.093l1.834-4.526h3.696V35.799z"/>
<path class="lh-claim" fill="#676767" d="M218.042,35.931c-0.158,0.039-0.185,0.145-0.185,0.237v6.256c0,0.093,0.026,0.198,0.185,0.238l0.673,0.132
v0.897h-2.072l-0.093-0.555c-0.026-0.105-0.053-0.29-0.303-0.29c-0.146,0-0.238,0.079-0.356,0.158l-1.096,0.713
c0,0-0.726,0.066-1.096,0.066c-2.745,0-3.379-0.739-3.379-3.168v-4.448c0-0.093-0.026-0.198-0.185-0.237l-0.687-0.132v-0.897
h3.102v0.897l-0.673,0.132c-0.158,0.039-0.185,0.145-0.185,0.237v4.276c0,1.835,0.304,2.178,2.125,2.178
c1.505,0,2.666-0.304,2.666-0.304v-6.15c0-0.093-0.026-0.198-0.185-0.237l-0.687-0.132v-0.897h3.102v0.897L218.042,35.931z"/>
<path class="lh-claim" fill="#676767" d="M229.552,35.931c-0.158,0.039-0.185,0.145-0.185,0.237v7.523h-2.72l-3.537-7.523
c-0.079-0.185-0.132-0.251-0.304-0.251c-0.25,0-0.276,0.132-0.276,0.356v6.15c0,0.093,0.026,0.198,0.185,0.238l0.673,0.132v0.897
h-2.996v-0.897l0.687-0.132c0.158-0.04,0.185-0.146,0.185-0.238v-6.256c0-0.093-0.026-0.198-0.185-0.237l-0.687-0.132v-0.897
h3.616l3.511,7.417c0.08,0.172,0.146,0.251,0.304,0.251c0.251,0,0.277-0.158,0.277-0.369v-6.032c0-0.093-0.026-0.198-0.185-0.237
l-0.687-0.132v-0.897h3.01v0.897L229.552,35.931z"/>
<path class="lh-claim" fill="#676767" d="M231.928,43.691v-0.897l0.687-0.132c0.158-0.04,0.185-0.146,0.185-0.238v-6.256
c0-0.093-0.026-0.198-0.185-0.237l-0.687-0.132v-0.897h3.102v0.897l-0.673,0.132c-0.158,0.039-0.185,0.145-0.185,0.237v6.256
c0,0.093,0.026,0.198,0.185,0.238l0.673,0.132v0.897H231.928z"/>
<path class="lh-claim" fill="#676767" d="M244.955,35.799l-0.674,0.185c-0.211,0.053-0.329,0.105-0.475,0.251l-3.062,2.996l3.313,3.102
c0.277,0.264,0.304,0.29,0.633,0.356l0.476,0.092v0.911h-3.26v-0.897l0.383-0.066c0.132-0.026,0.25-0.053,0.25-0.211
c0-0.079-0.053-0.146-0.105-0.185l-2.468-2.31c-0.172-0.146-0.344-0.317-0.581-0.317c-0.33,0-0.422,0.186-0.422,0.488v2.23
c0,0.093,0.026,0.198,0.185,0.238l0.673,0.132v0.897h-3.102v-0.897l0.687-0.132c0.158-0.04,0.185-0.146,0.185-0.238v-6.256
c0-0.093-0.026-0.198-0.185-0.237l-0.687-0.132v-0.897h3.102v0.897l-0.673,0.132c-0.158,0.039-0.185,0.145-0.185,0.237v2.218
c0,0.304,0.092,0.488,0.422,0.488c0.237,0,0.423-0.158,0.581-0.317l2.376-2.349c0.053-0.053,0.079-0.093,0.079-0.172
c0-0.132-0.093-0.172-0.212-0.185l-0.369-0.053v-0.897h3.115V35.799z"/>
<path class="lh-claim" fill="#676767" d="M252.609,42.794l0.476-0.105c0.119-0.026,0.211-0.04,0.211-0.158c0-0.066-0.013-0.106-0.053-0.212
l-0.448-1.161h-4.58l-0.476,1.188c-0.039,0.093-0.053,0.133-0.053,0.186c0,0.118,0.093,0.145,0.225,0.171l0.462,0.093v0.897
h-2.943v-0.897l0.607-0.132c0.197-0.04,0.264-0.132,0.33-0.304l2.626-6.124c0.066-0.159,0.026-0.277-0.145-0.304l-0.7-0.119v-0.91
h3.537l2.97,7.457c0.106,0.237,0.186,0.264,0.423,0.316l0.555,0.119v0.897h-3.023V42.794z M250.841,36.194
c-0.079-0.198-0.118-0.304-0.316-0.304s-0.237,0.105-0.316,0.304l-1.558,3.881h3.722L250.841,36.194z"/>
<path class="lh-claim" fill="#676767" d="M260.358,36.089v6.335c0,0.093,0.026,0.198,0.185,0.238l0.687,0.132v0.897h-3.115v-0.897l0.687-0.132
c0.158-0.04,0.185-0.146,0.185-0.238v-6.335h-3.286v-1.188h7.945v1.188H260.358z"/>
<path class="lh-claim" fill="#676767" d="M264.556,43.691v-0.897l0.687-0.132c0.158-0.04,0.185-0.146,0.185-0.238v-6.256
c0-0.093-0.026-0.198-0.185-0.237l-0.687-0.132v-0.897h3.102v0.897l-0.673,0.132c-0.158,0.039-0.185,0.145-0.185,0.237v6.256
c0,0.093,0.026,0.198,0.185,0.238l0.673,0.132v0.897H264.556z"/>
<path class="lh-claim" fill="#676767" d="M273.201,43.784c-3.512,0-3.907-0.964-3.907-4.475c0-3.775,0.541-4.501,3.894-4.501
c3.524,0,3.881,0.95,3.881,4.501S276.698,43.784,273.201,43.784z M273.188,35.957c-2.23,0-2.481,0.33-2.481,3.353
c0,2.864,0.185,3.312,2.495,3.312c2.362,0,2.454-0.475,2.454-3.312C275.655,36.551,275.629,35.957,273.188,35.957z"/>
<path class="lh-claim" fill="#676767" d="M287.865,35.931c-0.158,0.039-0.185,0.145-0.185,0.237v7.523h-2.72l-3.537-7.523
c-0.079-0.185-0.132-0.251-0.304-0.251c-0.25,0-0.276,0.132-0.276,0.356v6.15c0,0.093,0.026,0.198,0.185,0.238l0.673,0.132v0.897
h-2.996v-0.897l0.687-0.132c0.158-0.04,0.185-0.146,0.185-0.238v-6.256c0-0.093-0.026-0.198-0.185-0.237l-0.687-0.132v-0.897
h3.616l3.511,7.417c0.08,0.172,0.146,0.251,0.304,0.251c0.251,0,0.277-0.158,0.277-0.369v-6.032c0-0.093-0.026-0.198-0.185-0.237
l-0.687-0.132v-0.897h3.01v0.897L287.865,35.931z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 22 KiB

View File

@@ -0,0 +1,78 @@
<?php
/*
* @package lh_fap
*/
class LH_Fap_Admin {
/**
* Construct the function.
*
* @access public
* @return void
*/
public function __construct(){
$this->action_dispatcher();
$this->filter_dispatcher();
}
/**
* Contains all called actions used by the plugin core.
*
* @access private
* @return void
*/
private function action_dispatcher(){
/* PHP Solution */
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
//add_action( 'fap_media_tab_content', array( $this, 'custom_media_tab_content' ) );
/* /PHP */
}
/**
* Contains all called filters used by the plugin core.
*
* @access private
* @return void
*/
private function filter_dispatcher(){
/* PHP Solution */
//add_filter( 'fap_media_tab', array( $this, 'custom_media_tab' ) );
/* /PHP */
/* Backbone-JS Solution */
add_filter( 'media_view_strings', array( $this, 'fap_media_localisation'), 10, 2 );
/* /BBJS */
//add_filter( 'media_upload_tabs', array($this, 'custom_media_upload_tab_name') );
}
public function fap_media_localisation($strings, $post){
$strings['menuTitle'] = __('Free Images', 'fap');
$strings['addToLibrary'] = __('Insert into Library', 'fap');
$strings['pluginUrl'] = LHFAP__PLUGIN_URL;
return $strings;
}
/**
* Enqueue the neccecary scripts in the admin panel.
*
* @access public
* @return void
*/
public function enqueue_scripts(){
global $pagenow, $post_type;
$screen = get_current_screen();
if( $pagenow === "post.php" || $pagenow === "post-new.php" ) {
// Only load the scripts when we ACTUALLY need them.
wp_register_script( 'lh_fap_admin', LHFAP__PLUGIN_URL . 'js/fap.min.js', array("jquery"), NULL, true);
wp_enqueue_script( 'lh_fap_admin' );
wp_register_style( 'lh_fap_style', LHFAP__PLUGIN_URL . 'css/admin.css', NULL, 1, 'all' );
wp_enqueue_style( 'lh_fap_style' );
}
//wp_register_style( 'lh_event_admin', LHEVENT__PLUGIN_URL . 'css/admin.css', NULL, 1, 'all');
//wp_enqueue_style( 'lh_event_admin' );
}
}

View File

@@ -0,0 +1,49 @@
<?php
/*
* @package lh_fap
*/
class LH_Fap_Plugin {
/**
* Construct the function.
*
* @access public
* @return void
*/
public function __construct(){
$this->action_dispatcher();
$this->filter_dispatcher();
if(is_admin()){
// Initialize the admin stuff
$this->admin = new LH_Fap_Admin();
// Initialize the importer
$this->importer = new LH_Fap_Import();
}
}
/**
* Contains all called actions used by the plugin core.
*
* @access private
* @return void
*/
private function action_dispatcher(){
add_action( 'init', array($this, 'do_stuff_on_init') );
}
/**
* Contains all called filters used by the plugin core.
*
* @access private
* @return void
*/
private function filter_dispatcher(){}
public function do_stuff_on_init(){
// i18n
load_plugin_textdomain('lhf', false, dirname(plugin_basename(LHFAP__PLUGIN_FILE)) . '/lang' );
}
}

View File

@@ -0,0 +1,214 @@
<?php
/*
* @package lh_fap
*/
/**
* The importer class that handles the sideloading of the images from the api endpoint.
*/
class LH_Fap_Import {
private $_apiUrl = "http://www.free-images.cc/wp-json";
/**
* The constructor of this class.
*
* @access public
* @return void
*/
public function __construct(){
$this->action_dispatcher();
$this->filter_dispatcher();
}
/**
* The function that dispatches all used actions by this class.
*
* @access private
* @return void
*/
private function action_dispatcher(){
add_action('wp_ajax_import_image', array( $this, 'import_image' ) );
add_action('wp_ajax_list_images', array( $this, 'list_images' ) );
}
/**
* The function that dispatches all used filters by this class.
*
* @access private
* @return void
*/
private function filter_dispatcher(){
}
/**
* The ajax call, that actually imports the image.
*
* @access public
* @return void
*/
public function import_image(){
$image_id = isset($_GET['image_id']) ? intval($_REQUEST['image_id']) : null;
$post_id = isset($_GET['post_id']) ? intval($_REQUEST['post_id']) : null;
$response = array(
"error" => true,
"msg" => __("An unknown error occured!", "lhf"),
);
// If the current user cannot upload files, die with an error message
if(!current_user_can("upload_files")){
http_response_code(401);
$response['msg'] = __("I'm sorry Dave, I'm afraid I can't do that. (Insufficient permissions!)", "lhf");
$this->json_response($response);
die();
}
if(!$image_id){
http_response_code(401);
$this->json_response($response);
die();
}
if($image_id){
// Check if we already have an image with that FAP ID in the database
$qry = new WP_Query(array(
"post_type" => 'attachment',
'post_status' => 'any',
"meta_query" => array(
array(
"key" => '_fap_id',
"value" => $image_id,
),
),
));
// If that query returns any results, die with the error message, including
if($qry->have_posts()){
http_response_code(400);
$response['msg'] = __("An image with that ID is already in the database!", "lhf");
$response['attachment_id'] = $qry->posts[0]->ID;
$this->json_response($response);
die();
}
// Download the data from the api
$json_data = $this->curl_download($this->_apiUrl . "/image/" . $image_id . "/");
if($json_data['header']['http_code'] !== 200){
http_response_code($json_data['header']['http_code']);
$response['msg'] = __("An image with that ID could not be retrieved!", "lhf");
$this->json_response($response);
die();
}
// At this point we should have working data from our API
$body = json_decode($json_data['body']);
$id = $this->add_to_library($body->data[0], $post_id);
if($id){
$response = array(
"error" => false,
"msg" => __("The image has been successfully added.", "lhf"),
"image_id" => $id,
);
}
}
$this->json_response($response);
die();
}
public function list_images(){
$response = array(
"success" => false,
);
$search_term = isset($_GET['s']) ? ($_REQUEST['s']) : null;
$paged = isset($_GET['paged']) ? intval($_REQUEST['paged']) : null;
$api_url = $this->_apiUrl . "/image/";
$api_url = add_query_arg(array(
"paged" => $paged,
"s" => $search_term,
), $api_url);
$json_data = $this->curl_download($api_url);
if($json_data){
$response = json_decode($json_data['body']);
}
$this->json_response($response);
die();
}
/**
* add_to_library function.
*
* @access private
* @param mixed $data
* @return void
*/
private function add_to_library($data, $post_id){
if(isset($data->url) && !filter_var($data->url, FILTER_VALIDATE_URL) === false){
// The download URL is legal
$tmp = download_url( $data->url );
if( is_wp_error( $tmp ) ){
// download failed, handle error
}
$desc = $data->title;
$file_array = array();
// Set variables for storage
// fix file filename for query strings
preg_match('/[^\?]+\.(jpg|jpeg|gif|png)/i', $data->url, $matches);
$file_array['name'] = basename($matches[0]);
$file_array['tmp_name'] = $tmp;
// If error storing temporarily, unlink
if ( is_wp_error( $tmp ) ) {
@unlink($file_array['tmp_name']);
$file_array['tmp_name'] = '';
}
$post_data = array(
'post_content' => sprintf(__("by %s via free-images.cc", "lhf"), $data->author),
);
// do the validation and storage stuff
$id = media_handle_sideload( $file_array, $post_id, $desc, $post_data );
// If error storing permanently, unlink
if ( is_wp_error($id) ) {
@unlink($file_array['tmp_name']);
return $id;
} else {
$res = update_post_meta($id, '_fap_id', $data->id);
}
return $id;
}
return false;
}
/**
* Make sure we have a legal json response.
*
* @access private
* @param mixed $response
* @return void
*/
private function json_response($response){
header('Content-Type: application/json');
echo json_encode($response);
}
/**
* Handle the downloading of the url.
*
* @access private
* @param mixed $url
* @return void
*/
private function curl_download($url){
// is cURL installed yet?
if (!function_exists('curl_init')){
die('Sorry cURL is not installed!');
}
// OK cool - then let's create a new cURL resource handle
$ch = curl_init();
// Now set some options (most are optional)
// Set URL to download
curl_setopt($ch, CURLOPT_URL, $url);
// Set a referer
curl_setopt($ch, CURLOPT_REFERER, get_bloginfo("url"));
// User agent
curl_setopt($ch, CURLOPT_USERAGENT, "MozillaXYZ/1.0");
// Include header in result? (0 = yes, 1 = no)
curl_setopt($ch, CURLOPT_HEADER, 0);
// Should cURL return or print out the data? (true = return, false = print)
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// Timeout in seconds
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
// Download the given URL, and return output
$output = curl_exec($ch);
// Get the connection info
$info = curl_getinfo($ch);
// Close the cURL resource, and free system resources
curl_close($ch);
return array(
"body" => $output,
"header" => $info,
);
}
}

View File

@@ -0,0 +1,120 @@
<?php
function fap_mediaview_templates() {
?>
<script type="text/html" id="tmpl-fap-image-upload">
<div class="progress-container">
<ul class="progress">
<li data-name="CSS Skill" data-percent="100%">
<svg viewBox="-10 -10 220 220">
<g fill="none" stroke-width="6" transform="translate(100,100)">
<path d="M 0,-100 A 100,100 0 0,1 86.6,-50" stroke="url(#cl1)"/>
<path d="M 86.6,-50 A 100,100 0 0,1 86.6,50" stroke="url(#cl2)"/>
<path d="M 86.6,50 A 100,100 0 0,1 0,100" stroke="url(#cl3)"/>
<path d="M 0,100 A 100,100 0 0,1 -86.6,50" stroke="url(#cl4)"/>
<path d="M -86.6,50 A 100,100 0 0,1 -86.6,-50" stroke="url(#cl5)"/>
<path d="M -86.6,-50 A 100,100 0 0,1 0,-100" stroke="url(#cl6)"/>
</g>
</svg>
<svg viewBox="-10 -10 220 220">
<path d="M200,100 C200,44.771525 155.228475,0 100,0 C44.771525,0 0,44.771525 0,100 C0,155.228475 44.771525,200 100,200 C155.228475,200 200,155.228475 200,100 Z" stroke-dashoffset="629"></path>
</svg>
<span class="dashicons dashicons-yes"></span>
</li>
</ul>
<!-- Defining Angle Gradient Colors -->
<svg width="0" height="0">
<defs>
<linearGradient id="cl1" gradientUnits="objectBoundingBox" x1="0" y1="0" x2="1" y2="1">
<stop stop-color="#e67724"/>
<stop offset="100%" stop-color="#e7642f"/>
</linearGradient>
<linearGradient id="cl2" gradientUnits="objectBoundingBox" x1="0" y1="0" x2="0" y2="1">
<stop stop-color="#e7642f"/>
<stop offset="100%" stop-color="#e85139"/>
</linearGradient>
<linearGradient id="cl3" gradientUnits="objectBoundingBox" x1="1" y1="0" x2="0" y2="1">
<stop stop-color="#e85139"/>
<stop offset="100%" stop-color="#e85139"/>
</linearGradient>
<linearGradient id="cl4" gradientUnits="objectBoundingBox" x1="1" y1="1" x2="0" y2="0">
<stop stop-color="#e85139"/>
<stop offset="100%" stop-color="#e7652e"/>
</linearGradient>
<linearGradient id="cl5" gradientUnits="objectBoundingBox" x1="0" y1="1" x2="0" y2="0">
<stop stop-color="#e7652e"/>
<stop offset="100%" stop-color="#e67824"/>
</linearGradient>
<linearGradient id="cl6" gradientUnits="objectBoundingBox" x1="0" y1="1" x2="1" y2="0">
<stop stop-color="#e67824"/>
<stop offset="100%" stop-color="#e67724"/>
</linearGradient>
</defs>
</svg>
</div>
</script>
<script type="text/html" id="tmpl-fap-image-details">
<h3>
<?php _e('Attachment Details'); ?>
</h3>
<div class="attachment-info">
<div class="thumbnail thumbnail-{{ data.type }}">
<# if ( 'image' === data.type && data.sizes ) { #>
<img src="{{ data.size.url }}" draggable="false" />
<# } else { #>
<img src="{{ data.icon }}" class="icon" draggable="false" />
<# } #>
</div>
<div class="details">
<div class="filename">{{ data.filename }}</div>
<div class="uploaded">{{ data.dateFormatted }}</div>
<div class="file-size">{{ data.filesizeHumanReadable }}</div>
<# if ( 'image' === data.type && ! data.uploading ) { #>
<# if ( data.width && data.height ) { #>
<div class="dimensions">{{ data.width }} &times; {{ data.height }}</div>
<a href="{{ data.link }}?utm_source=fap-plugin&utm_medium=preview&utm_campaign=media-preview&utm_term=preview" target="_blank">Preview</a>
<# } #>
<# } #>
<# if ( data.fileLength ) { #>
<div class="file-length"><?php _e( 'Length:' ); ?> {{ data.fileLength }}</div>
<# } #>
<div class="compat-meta">
<# if ( data.compat && data.compat.meta ) { #>
{{{ data.compat.meta }}}
<# } #>
</div>
</div>
</div>
<label class="setting" data-setting="url">
<span class="name"><?php _e('URL'); ?></span>
<input type="text" value="{{ data.size.url }}" readonly />
</label>
<# var maybeReadOnly = data.can.save || data.allowLocalEdits ? '' : 'readonly'; #>
<label class="setting" data-setting="title">
<span class="name"><?php _e('Title'); ?></span>
<input type="text" value="{{ data.title }}" {{ maybeReadOnly }} />
</label>
</script>
<script type="text/html" id="tmpl-lh-logo">
<div class="lh-logo">
<a href="http://www.luehrsen-heinrich.de/?utm_source=fap-plugin&utm_medium=banner&utm_campaign=media-banner&utm_term=banner" target="_blank">
<img src="<?=LHFAP__PLUGIN_URL?>img/lh_logo_head.svg" alt="Luehrsen // Heinrich GmbH" title="Luehrsen // Heinrich GmbH">
</a>
</div>
</script>
<?php
}
add_action('print_media_templates', 'fap_mediaview_templates');

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,85 @@
=== free-images.cc Importer ===
Contributors: luehrsen, ckanitz
Donate link: https://www.paypal.com/de/cgi-bin/webscr?cmd=_xclick&business=paypal@luehrsen-heinrich.de&item_name=free-images.cc%20Donation&currency_code=EUR
Tags: free, images, image, pictures, media, import, creative commons, free-images, free images
Requires at least: 4.0
Tested up to: 4.4
Stable tag: 0.6.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
This plugin integrates the free-images.cc image library directly into your media browser.
== Description ==
Unfortunatly the free-images.cc importer will be shut down on 1st August 2017. We have decided to discontinue our plugin, because we do not find the time to keep it up to date and we do not want to burden you with an outdated, maybe insecure plugin.
Our website ( http://free-images.cc ), however, will stay online and provide marvelous cc0 licenced images for you.
Thank you all for your support! :)
------
Over the last years the creative commons movement gained traction and more and more artists followed the trend of committing their work to public domain. We believe that this will contribute to making the web a better, more beautiful place.
But we dont want to be one of many. There are several aspects, that will make [free-images.cc](http://www.free-images.cc) superior to many other sites out there. Not only do we curate the images and publish only the creme de la creme. Every image is carefully tagged for better discoverability and every photographer is named and honored.
Every free image uploaded here will be under the CC0 Public Domain license. So every image will be free to use for whatever purpose you want!
We are always keen for improvement and new artists, that publish their work under the creative commons public domain license. If you have any feedback or tips for great, free images, drop us a mail at contact@free-images.cc!
This plugin is brought to you by the awesome folks at [Luehrsen // Heinrich](http://www.luehrsen-heinrich.de).
== Installation ==
1. Upload the fap_importer folder to the /wp-content/plugins/ directory
2. Activate the 'free-images.cc Importer' plugin through the 'Plugins' menu in WordPress
3. Import your first image in the admin media screen
== Frequently Asked Questions ==
= Where are these images coming from? =
All of our images are coming from incredibly talented photographers from all over the world. The released their work to public domain and that allows us to add it to the library, to bring these works directly into your WordPress backend.
= Why are these images free? =
Because they are released under the [CC0 Public Domain license](https://creativecommons.org/publicdomain/zero/1.0/). The photographer made them free to use for everyone around the world.
= Are there any restrictions on the usage? =
Technically no. That means, that you can do whatever you want with these images without having to give attribution to the photographer or free-images.cc.
We just kindly ask you not to use these images for pornographic, criminal, defamatory or degrading purposes.
== Screenshots ==
1. The "free images" tab shows up directly in your media browser.
== Changelog ==
= 0.6.2 =
Unfortunatly the free-images.cc importer will be shut down on 1st August 2017. We have decided to discontinue our plugin, because we do not find the time to keep it up to date and we do not want to burden you with an outdated, maybe insecure plugin.
Our website ( http://free-images.cc ), however, will stay online and provide marvelous cc0 licenced images for you.
Thank you all for your support! :)
= 0.6.0 =
Added a live-search.
Added lazy load depending on the viewport.
Added a preview button within the sidebar.
Implemented client-caching to prevent long loads and/or timeouts.
Rewrote part of the JS-Core for a better workflow.
Changed template behavior.
Fixed a bug where our upload-spinner appeared in new opened media-frames sometimes.
= 0.5.2 =
Frame reload fix to ensure a reload of the local media collection.
Small template changes.
= 0.5.1 =
Template fix to work proper with php shorttag.
= 0.5 =
Initial Release