Plugin Directory

Changeset 2168926

Timestamp:
10/06/2019 06:16:38 AM (5 years ago)
Author:
jrtashjian
Message:

Pushing

Location:
curatewp-related-posts/trunk
Files:
5 added
7 edited

Legend:

Unmodified
Added
Removed
  • curatewp-related-posts/trunk/curatewp-related-posts.php

    r2123583 r2168926  
    55Plugin URI: https://curatewp.com/
    66Description: Display related posts within the current post, in a widget, and in your theme.
    7 Version: 1.0.1
     7Version: 1.
    88Author: JR Tashjian
    99Author URI: https://jrtashjian.com
  • curatewp-related-posts/trunk/includes/Core.php

    r2063444 r2168926  
    108108            wp_enqueue_style(
    109109                'cwprp-layouts',
    110                 CWPRP_PLUGIN_URL . 'assets/dist/layouts.build.css',
     110                CWPRP_PLUGIN_URL . '.css',
    111111                array(),
    112112                CWPRP_VERSION
     
    127127        }
    128128
    129         wp_register_style(
    130             'cwprp-block',
    131             CWPRP_PLUGIN_URL . 'assets/dist/block.build.css',
    132             array(),
    133             CWPRP_VERSION
    134         );
     129        $asset_file = include CWPRP_PLUGIN_DIR . '/build/index.asset.php';
    135130
    136131        wp_register_script(
    137132            'cwprp-block',
    138             CWPRP_PLUGIN_URL . 'assets/dist/block.build.js',
    139             array( 'wp-blocks', 'wp-i18n', 'wp-components', 'wp-data', 'wp-editor', 'wp-element' ),
    140             CWPRP_VERSION,
     133            CWPRP_PLUGIN_URL . '.js',
     134            ,
     135            ,
    141136            true // Enqueue script in the footer.
    142137        );
     
    151146                    'title'       => array( 'type' => 'string' ),
    152147                    'description' => array( 'type' => 'string' ),
    153                     'in_category' => array( 'type' => 'boolean' ),
    154                     'in_tag'      => array( 'type' => 'boolean' ),
    155                     'number'      => array( 'type' => 'integer' ),
    156                     'orderby'     => array( 'type' => 'string' ),
    157                     'order'       => array( 'type' => 'string' ),
     148                    'in_category' => array(
     149                        'type'    => 'boolean',
     150                        'default' => true,
     151                    ),
     152                    'in_tag'      => array(
     153                        'type'    => 'boolean',
     154                        'default' => false,
     155                    ),
     156                    'number'      => array(
     157                        'type'    => 'integer',
     158                        'default' => 5,
     159                    ),
     160                    'orderby'     => array(
     161                        'type'    => 'string',
     162                        'default' => 'rand',
     163                    ),
     164                    'order'       => array(
     165                        'type'    => 'string',
     166                        'default' => '',
     167                    ),
    158168                ),
    159169                'render_callback' => array( get_called_class(), 'render_block_related_posts' ),
  • curatewp-related-posts/trunk/includes/template-functions.php

    r2123583 r2168926  
    110110
    111111    <div class="<?php echo esc_attr( join( ' ', array_filter( $classes ) ) ); ?>">
    112         <div class="curatewp-section-header">
    113             <?php if ( ! empty( $args['title'] ) ) : ?>
     112        <>
     113            <>
    114114                <h3 class="curatewp-section-header__title"><?php echo esc_html( $args['title'] ); ?></h3>
    115             <?php endif; ?>
    116115
    117             <?php if ( ! empty( $args['description'] ) ) : ?>
    118                 <p class="curatewp-section-header__description"><?php echo esc_html( $args['description'] ); ?></p>
    119             <?php endif; ?>
    120         </div>
    121 
    122         <?php if ( ! empty( $related_posts ) ) : ?>
    123             <div class="curatewp-section-collection curatewp-section-collection--default">
    124 
    125                 <?php foreach ( $related_posts as $related_post_id ) : ?>
    126                     <div <?php post_class( 'curatewp-card curatewp-card--wide curatewp-grid--whole', $related_post_id ); ?>>
    127 
    128                         <?php
    129                         if ( has_post_thumbnail( $related_post_id ) ) :
    130                             $curatewp_post_thumbnail_url = wp_get_attachment_url( get_post_thumbnail_id( $related_post_id ) );
    131                             ?>
    132                             <div class="curatewp-card__image" style="background-image:url(<?php echo esc_url( $curatewp_post_thumbnail_url ); ?>);"></div>
    133                         <?php endif; ?>
    134 
    135                         <div class="curatewp-card__content">
    136                             <h4 class="curatewp-card__title">
    137                                 <a href="<?php the_permalink( $related_post_id ); ?>">
    138                                     <?php echo esc_html( get_the_title( $related_post_id ) ); ?>
    139                                 </a>
    140                             </h4>
    141                             <div class="curatewp-card__date">
    142                                 <?php echo esc_html( get_the_date( '', $related_post_id ) ); ?>
    143                             </div>
    144                         </div>
    145 
    146                     </div>
    147                 <?php endforeach; ?>
    148 
     116                <?php if ( ! empty( $args['description'] ) ) : ?>
     117                    <p class="curatewp-section-header__description"><?php echo esc_html( $args['description'] ); ?></p>
     118                <?php endif; ?>
    149119            </div>
    150120        <?php endif; ?>
     121
     122
     123
     124
     125
     126
     127
     128
     129
     130
     131
     132
     133
     134
     135
     136
     137
     138
     139
     140
     141
     142
     143
     144
     145
     146
     147
     148
    151149    </div>
    152150
  • curatewp-related-posts/trunk/readme.txt

    r2123583 r2168926  
    33Tags: curatewp, curation, related, related posts, related content, recommended, engagement, similar, similar posts, gutenberg, block, shortcode
    44Requires at least: 4.9.8
    5 Tested up to: 5.2.2
     5Tested up to: 5.2.
    66Requires PHP: 5.6
    7 Stable tag: 1.0.1
     7Stable tag: 1.
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    3535== Changelog ==
    3636
    37 = 1.0.1 =
    38 * Block no longer hangs on loading when no related posts are found.
    39 * Disabled click events on links while editing a post.
    40 * Added support for WP 5.2.2
    41 
    42 = 1.0.0 =
    43 * Initial release.
     37* The section title and description is deprecated within the block
     38* Added support for WP 5.2.3
     39* Added support for Gutenberg 6.6.0
  • curatewp-related-posts/trunk/vendor/autoload.php

    r2063444 r2168926  
    55require_once __DIR__ . '/composer/autoload_real.php';
    66
    7 return ComposerAutoloaderInit40f7e0e5fbc93216b93f32e637f29cf8::getLoader();
     7return ComposerAutoloaderInit::getLoader();
  • curatewp-related-posts/trunk/vendor/composer/autoload_real.php

    r2063444 r2168926  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInit40f7e0e5fbc93216b93f32e637f29cf8
     5class ComposerAutoloaderInit
    66{
    77    private static $loader;
     
    2020        }
    2121
    22         spl_autoload_register(array('ComposerAutoloaderInit40f7e0e5fbc93216b93f32e637f29cf8', 'loadClassLoader'), true, true);
     22        spl_autoload_register(array('ComposerAutoloaderInit', 'loadClassLoader'), true, true);
    2323        self::$loader = $loader = new \Composer\Autoload\ClassLoader();
    24         spl_autoload_unregister(array('ComposerAutoloaderInit40f7e0e5fbc93216b93f32e637f29cf8', 'loadClassLoader'));
     24        spl_autoload_unregister(array('ComposerAutoloaderInit', 'loadClassLoader'));
    2525
    2626        $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
     
    2828            require_once __DIR__ . '/autoload_static.php';
    2929
    30             call_user_func(\Composer\Autoload\ComposerStaticInit40f7e0e5fbc93216b93f32e637f29cf8::getInitializer($loader));
     30            call_user_func(\Composer\Autoload\ComposerStaticInit::getInitializer($loader));
    3131        } else {
    3232            $map = require __DIR__ . '/autoload_namespaces.php';
  • curatewp-related-posts/trunk/vendor/composer/autoload_static.php

    r2063444 r2168926  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInit40f7e0e5fbc93216b93f32e637f29cf8
     7class ComposerStaticInit
    88{
    99    public static $prefixLengthsPsr4 = array (
     
    2424    {
    2525        return \Closure::bind(function () use ($loader) {
    26             $loader->prefixLengthsPsr4 = ComposerStaticInit40f7e0e5fbc93216b93f32e637f29cf8::$prefixLengthsPsr4;
    27             $loader->prefixDirsPsr4 = ComposerStaticInit40f7e0e5fbc93216b93f32e637f29cf8::$prefixDirsPsr4;
     26            $loader->prefixLengthsPsr4 = ComposerStaticInit::$prefixLengthsPsr4;
     27            $loader->prefixDirsPsr4 = ComposerStaticInit::$prefixDirsPsr4;
    2828
    2929        }, null, ClassLoader::class);
Note: See TracChangeset for help on using the changeset viewer.