Function:
function shorten_text($text, $max_length = 140, $cut_off = '...', $keep_word = false)
{
if(strlen($text) <= $max_length) {
return $text;
}
if(strlen($text) > $max_length) {
| // Copyright 2014–2017, Eric Holk | |
| // | |
| // Licensed under the Apache License, Version 2.0 (the "License"); | |
| // you may not use this file except in compliance with the License. | |
| // You may obtain a copy of the License at | |
| // | |
| // http://www.apache.org/licenses/LICENSE-2.0 | |
| // | |
| // Unless required by applicable law or agreed to in writing, software | |
| // distributed under the License is distributed on an "AS IS" BASIS, |
| <div class="pagination size1of1 unit"> | |
| <?php if($paged == 1): ?> | |
| <span class="current"><?php echo $paged ?></span> | |
| <?php else: ?> | |
| <a class="prev" href="?page=<?php echo ($current_page - 1) ?>">Prev</a> | |
| <?php if ($current_page > 2): ?> | |
| <a href="?page=1">1</a> | |
| <?php endif ?> | |
| <?php if ($current_page > 3): ?> | |
| <span class="dots">...</span> |
| <div class="countdown" data-datetime="<?php echo time() ?>"> | |
| <span class="days">0</span> days | |
| <span class="hours">0</span> hours | |
| <span class="minutes">0</span> minutes | |
| <span class="seconds">0</span> seconds | |
| </div> | |
| <script> | |
| (function() | |
| { |
Function:
function shorten_text($text, $max_length = 140, $cut_off = '...', $keep_word = false)
{
if(strlen($text) <= $max_length) {
return $text;
}
if(strlen($text) > $max_length) {
| <?php | |
| /** | |
| * simple method to encrypt or decrypt a plain text string | |
| * initialization vector(IV) has to be the same when encrypting and decrypting | |
| * | |
| * @param string $action: can be 'encrypt' or 'decrypt' | |
| * @param string $string: string to encrypt or decrypt | |
| * | |
| * @return string | |
| */ |
| <?php | |
| /* | |
| 1.- Create an App. | |
| 2.- Go to: https://developers.facebook.com/tools/explorer/ | |
| + Select your new created app on the right top. | |
| + Select "Get App Token" |
error
ambient\fallscream
ambient\opera
ambient\tankidle2
ambient\waterrun
ambient\water_splash1
ambient\water_splash2
ambient\water_splash3
ambient\animal\bird1
| Copy this code to function.php | |
| //Sitemap XML | |
| /* | |
| function to create sitemap.xml file in root directory of site | |
| */ |
| // https://codepen.io/cmykw/pen/gemxJm | |
| // layout | |
| <nav/> | |
| // style | |
| <style> | |
| body { min-height: 200vh; } | |
| nav { |