{% directory_list directory:products/tea iterator:item sort:descending %}
{{ item }}
{% enddirectory_list %}
| <?php | |
| class Last_Tweets extends WP_Widget { | |
| /** | |
| * Register widget with WordPress. | |
| */ | |
| function __construct() { | |
| parent::__construct( | |
| 'Last-post', // Base ID | |
| __('Lyra Network - Last Tweets', 'twentyfifteen'), // Name |
| function stf_redirect_to_post(){ | |
| global $wp_query; | |
| if( is_archive() && $wp_query->post_count == 1 ){ | |
| the_post(); | |
| $post_url = get_permalink(); | |
| // Redirect to post page | |
| wp_redirect( $post_url ); | |
| } | |
| } | |
| add_action('template_redirect', 'stf_redirect_to_post'); |
| <?php | |
| /** | |
| * | |
| * Description : lockdown wordpress rights | |
| * version 1.0 | |
| * | |
| */ | |
| $mode = ''; | |
| $path_rights = array( | |
| array( |
| <?php | |
| if(!class_exists('WP_List_Table')) require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' ); | |
| /** | |
| * Extended class for displaying a list of items in an HTML table. | |
| * | |
| * @usage | |
| * // be sure to modify the display_rows function to customize the output of the rows | |
| * $args = array( |
| /** | |
| * 1/ onLoad, retrieve session storage data (ALL OF IT !!! - so carefull) | |
| * 2/ the key === input/select ID | |
| * 3/ set the value | |
| */ | |
| window.onload = function () { | |
| if (sessionStorage) { | |
| for (i = 0; i < sessionStorage.length; i++) { | |
| var key = sessionStorage.key(i); | |
| var value = sessionStorage[key]; |
| <?php | |
| /** | |
| * Created by PhpStorm. | |
| * User: david1 | |
| * Date: 07/05/2017 | |
| * Time: 13:32 | |
| */ | |
| /** | |
| * Adds Foo_Widget widget. | |
| */ |