Version Description
(12-October-2021) =
* Bugfix: Support for drop-in caches. Resolves Undefined variable: found
warnings.
* Bugfix: Add missing string for translations
* Bugfix: Workaround for WordPress ca-bundle.crt issue
* Bugfix: Properly update the template preview in YARPP's admin console when Thumbnail size selection is updated
* Bugfix: Use dummy example thumbnail in previews
* Enhancement: For RSS Feed Display Options use dropdown select for thumbnail sizes instead of radio buttons
Download this release
Release Info
Developer | jeffparker |
Plugin | Yet Another Related Posts Plugin (YARPP) |
Version | 5.27.6 |
Comparing to | |
See all releases |
Code changes from version 5.27.5 to 5.27.6
- classes/YARPP_Core.php +6 -6
- classes/YARPP_DB_Options.php +1 -1
- classes/YARPP_DB_Schema.php +16 -17
- classes/YARPP_Meta_Box.php +9 -7
- classes/YARPP_Meta_Box_Display_Feed.php +3 -10
- classes/YARPP_Meta_Box_Display_Web.php +3 -3
- classes/YARPP_Meta_Box_Relatedness.php +18 -7
- classes/YARPP_Shortcode.php +1 -4
- includes/phtmls/yarpp_meta_box_checkbox.phtml +5 -5
- includes/yarpp_options.php +2 -2
- js/block.min.js +1 -1
- js/options_basic.min.js +1 -1
- readme.txt +11 -3
- src/css/public/options_basic.css +2 -2
- src/js/options_basic.js +19 -27
- style/options_basic.css +1 -1
- yarpp.php +2 -2
classes/YARPP_Core.php
CHANGED
@@ -391,7 +391,7 @@ class YARPP {
|
|
391 |
* DIAGNOSTICS
|
392 |
*
|
393 |
* @since 4.0 Moved into separate functions. Note return value types can differ.
|
394 |
-
* @since 5.2.0 consider using $this->db_schema->
|
395 |
* $this->db_schema->database_supports_fulltext_indexes() instead
|
396 |
*/
|
397 |
public function diagnostic_myisam_posts() {
|
@@ -1625,7 +1625,7 @@ class YARPP {
|
|
1625 |
sprintf(
|
1626 |
__(
|
1627 |
"Powered by <a href='%s' title='WordPress Related Posts' target='_blank'>YARPP</a>.",
|
1628 |
-
'
|
1629 |
),
|
1630 |
'https://yarpp.com'
|
1631 |
) .
|
@@ -1787,10 +1787,10 @@ class YARPP {
|
|
1787 |
|
1788 |
$this->prep_query( $domain === 'rss' );
|
1789 |
|
1790 |
-
$this->demo_cache_bypass->end_demo_time();
|
1791 |
-
|
1792 |
$output = $this->get_template_content(null, $args, true);
|
1793 |
|
|
|
|
|
1794 |
if ( $echo ) {
|
1795 |
echo $output;
|
1796 |
}
|
@@ -2018,7 +2018,7 @@ class YARPP {
|
|
2018 |
}
|
2019 |
|
2020 |
$version = YARPP_VERSION;
|
2021 |
-
$remote = wp_remote_post( "https://yarpp.org/checkversion.php?format=php&version={$version}" );
|
2022 |
|
2023 |
if ( is_wp_error( $remote ) || wp_remote_retrieve_response_code( $remote ) != 200 || ! isset( $remote['body'] ) || ! is_array( $remote['body'] ) ) {
|
2024 |
$this->set_transient( 'yarpp_version_info', null, 60 * 60 );
|
@@ -2040,7 +2040,7 @@ class YARPP {
|
|
2040 |
return true;
|
2041 |
}
|
2042 |
|
2043 |
-
$remote = wp_remote_post( 'https://yarpp.org/optin/2/', array( 'body' => $this->optin_data() ) );
|
2044 |
|
2045 |
if ( is_wp_error( $remote )
|
2046 |
|| wp_remote_retrieve_response_code( $remote ) != 200
|
391 |
* DIAGNOSTICS
|
392 |
*
|
393 |
* @since 4.0 Moved into separate functions. Note return value types can differ.
|
394 |
+
* @since 5.2.0 consider using $this->db_schema->posts_table_database_engine() or
|
395 |
* $this->db_schema->database_supports_fulltext_indexes() instead
|
396 |
*/
|
397 |
public function diagnostic_myisam_posts() {
|
1625 |
sprintf(
|
1626 |
__(
|
1627 |
"Powered by <a href='%s' title='WordPress Related Posts' target='_blank'>YARPP</a>.",
|
1628 |
+
'yet-another-related-posts-plugin'
|
1629 |
),
|
1630 |
'https://yarpp.com'
|
1631 |
) .
|
1787 |
|
1788 |
$this->prep_query( $domain === 'rss' );
|
1789 |
|
|
|
|
|
1790 |
$output = $this->get_template_content(null, $args, true);
|
1791 |
|
1792 |
+
$this->demo_cache_bypass->end_demo_time();
|
1793 |
+
|
1794 |
if ( $echo ) {
|
1795 |
echo $output;
|
1796 |
}
|
2018 |
}
|
2019 |
|
2020 |
$version = YARPP_VERSION;
|
2021 |
+
$remote = wp_remote_post( "https://yarpp.org/checkversion.php?format=php&version={$version}", array ( 'sslverify' => false ) );
|
2022 |
|
2023 |
if ( is_wp_error( $remote ) || wp_remote_retrieve_response_code( $remote ) != 200 || ! isset( $remote['body'] ) || ! is_array( $remote['body'] ) ) {
|
2024 |
$this->set_transient( 'yarpp_version_info', null, 60 * 60 );
|
2040 |
return true;
|
2041 |
}
|
2042 |
|
2043 |
+
$remote = wp_remote_post( 'https://yarpp.org/optin/2/', array( 'body' => $this->optin_data(), 'sslverify' => false ) );
|
2044 |
|
2045 |
if ( is_wp_error( $remote )
|
2046 |
|| wp_remote_retrieve_response_code( $remote ) != 200
|
classes/YARPP_DB_Options.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* about the default YARPP options' values or when to clear the cache. This is just a central way to get/set
|
6 |
* database options used by YARPP and to describe them.
|
7 |
*
|
8 |
-
* @
|
9 |
* @since 5.2.0
|
10 |
*/
|
11 |
class YARPP_DB_Options {
|
5 |
* about the default YARPP options' values or when to clear the cache. This is just a central way to get/set
|
6 |
* database options used by YARPP and to describe them.
|
7 |
*
|
8 |
+
* @package YARPP
|
9 |
* @since 5.2.0
|
10 |
*/
|
11 |
class YARPP_DB_Options {
|
classes/YARPP_DB_Schema.php
CHANGED
@@ -4,7 +4,6 @@
|
|
4 |
* Class for database schema inspection and changes.
|
5 |
*
|
6 |
* @package YARPP
|
7 |
-
* @author Mike Nelson
|
8 |
* @since 5.1.7
|
9 |
*/
|
10 |
class YARPP_DB_Schema {
|
@@ -20,13 +19,13 @@ class YARPP_DB_Schema {
|
|
20 |
* @return bool
|
21 |
*/
|
22 |
public function title_column_has_index() {
|
23 |
-
$result = wp_cache_get( self::CACHE_KEY_TITLE_INDEX, self::CACHE_GROUP, false
|
24 |
-
if (
|
25 |
global $wpdb;
|
26 |
$wpdb->get_results( "SHOW INDEX FROM {$wpdb->posts} WHERE Key_name = 'yarpp_title'" );
|
27 |
|
28 |
$result = $wpdb->num_rows >= 1;
|
29 |
-
wp_cache_set( self::CACHE_KEY_TITLE_INDEX, $result, self::CACHE_GROUP );
|
30 |
}
|
31 |
return $result;
|
32 |
}
|
@@ -37,13 +36,13 @@ class YARPP_DB_Schema {
|
|
37 |
* @return bool
|
38 |
*/
|
39 |
public function content_column_has_index() {
|
40 |
-
$result = wp_cache_get( self::CACHE_KEY_CONTENT_INDEX, self::CACHE_GROUP, false
|
41 |
-
if (
|
42 |
global $wpdb;
|
43 |
$wpdb->get_results( "SHOW INDEX FROM {$wpdb->posts} WHERE Key_name = 'yarpp_content'" );
|
44 |
|
45 |
$result = $wpdb->num_rows >= 1;
|
46 |
-
wp_cache_set( self::CACHE_KEY_CONTENT_INDEX, $result, self::CACHE_GROUP );
|
47 |
}
|
48 |
return $result;
|
49 |
}
|
@@ -55,18 +54,18 @@ class YARPP_DB_Schema {
|
|
55 |
* @return bool
|
56 |
*/
|
57 |
public function database_supports_fulltext_indexes() {
|
58 |
-
$result = wp_cache_get( self::CACHE_KEY_FULLTEXT_SUPPORT, self::CACHE_GROUP, false
|
59 |
-
if (
|
60 |
global $wpdb;
|
61 |
// Check if the database is a version that supports InnoDB fulltext indexes.
|
62 |
-
$innodb_fulltext_params = $wpdb->get_results( "
|
63 |
if ( ( count( $innodb_fulltext_params ) > 0 ) || ( $this->posts_table_database_engine() === 'MyISAM' ) ) {
|
64 |
$result = true;
|
65 |
} else {
|
66 |
// They don't seem to support full text indexes, sorry.
|
67 |
$result = false;
|
68 |
}
|
69 |
-
wp_cache_set( self::CACHE_KEY_FULLTEXT_SUPPORT, $result, self::CACHE_GROUP );
|
70 |
}
|
71 |
return $result;
|
72 |
}
|
@@ -78,8 +77,8 @@ class YARPP_DB_Schema {
|
|
78 |
* @return string|null
|
79 |
*/
|
80 |
public function posts_table_database_engine() {
|
81 |
-
$result = wp_cache_get( self::CACHE_KEY_POSTS_TABLE_DATABASE_ENGINE, self::CACHE_GROUP, false
|
82 |
-
if (
|
83 |
global $wpdb;
|
84 |
$tables = $wpdb->get_results( "SHOW TABLE STATUS WHERE Name = '{$wpdb->posts}'" );
|
85 |
foreach ( $tables as $table ) {
|
@@ -87,7 +86,7 @@ class YARPP_DB_Schema {
|
|
87 |
break;
|
88 |
}
|
89 |
|
90 |
-
wp_cache_set( self::CACHE_KEY_POSTS_TABLE_DATABASE_ENGINE, $result, self::CACHE_GROUP );
|
91 |
}
|
92 |
return $result;
|
93 |
}
|
@@ -134,8 +133,8 @@ class YARPP_DB_Schema {
|
|
134 |
* @return bool
|
135 |
*/
|
136 |
public function cache_table_exists() {
|
137 |
-
$exists = wp_cache_get( self::CACHE_KEY_TABLE_EXISTS, self::CACHE_GROUP, false
|
138 |
-
if (
|
139 |
global $wpdb;
|
140 |
// now check for the cache tables
|
141 |
$tabledata = $wpdb->get_col( 'SHOW TABLES LIKE "' . $wpdb->prefix . YARPP_TABLES_RELATED_TABLE . '"' );
|
@@ -144,7 +143,7 @@ class YARPP_DB_Schema {
|
|
144 |
} else {
|
145 |
$exists = false;
|
146 |
}
|
147 |
-
wp_cache_set( self::CACHE_KEY_TABLE_EXISTS, $exists, self::CACHE_GROUP );
|
148 |
}
|
149 |
return $exists;
|
150 |
}
|
4 |
* Class for database schema inspection and changes.
|
5 |
*
|
6 |
* @package YARPP
|
|
|
7 |
* @since 5.1.7
|
8 |
*/
|
9 |
class YARPP_DB_Schema {
|
19 |
* @return bool
|
20 |
*/
|
21 |
public function title_column_has_index() {
|
22 |
+
$result = wp_cache_get( self::CACHE_KEY_TITLE_INDEX, self::CACHE_GROUP, false );
|
23 |
+
if ( false === $result ) {
|
24 |
global $wpdb;
|
25 |
$wpdb->get_results( "SHOW INDEX FROM {$wpdb->posts} WHERE Key_name = 'yarpp_title'" );
|
26 |
|
27 |
$result = $wpdb->num_rows >= 1;
|
28 |
+
wp_cache_set( self::CACHE_KEY_TITLE_INDEX, $result, self::CACHE_GROUP, DAY_IN_SECONDS );
|
29 |
}
|
30 |
return $result;
|
31 |
}
|
36 |
* @return bool
|
37 |
*/
|
38 |
public function content_column_has_index() {
|
39 |
+
$result = wp_cache_get( self::CACHE_KEY_CONTENT_INDEX, self::CACHE_GROUP, false );
|
40 |
+
if ( false === $result ) {
|
41 |
global $wpdb;
|
42 |
$wpdb->get_results( "SHOW INDEX FROM {$wpdb->posts} WHERE Key_name = 'yarpp_content'" );
|
43 |
|
44 |
$result = $wpdb->num_rows >= 1;
|
45 |
+
wp_cache_set( self::CACHE_KEY_CONTENT_INDEX, $result, self::CACHE_GROUP, DAY_IN_SECONDS );
|
46 |
}
|
47 |
return $result;
|
48 |
}
|
54 |
* @return bool
|
55 |
*/
|
56 |
public function database_supports_fulltext_indexes() {
|
57 |
+
$result = wp_cache_get( self::CACHE_KEY_FULLTEXT_SUPPORT, self::CACHE_GROUP, false );
|
58 |
+
if ( false === $result ) {
|
59 |
global $wpdb;
|
60 |
// Check if the database is a version that supports InnoDB fulltext indexes.
|
61 |
+
$innodb_fulltext_params = $wpdb->get_results( "SHOW VARIABLES LIKE 'innodb_ft%';" );
|
62 |
if ( ( count( $innodb_fulltext_params ) > 0 ) || ( $this->posts_table_database_engine() === 'MyISAM' ) ) {
|
63 |
$result = true;
|
64 |
} else {
|
65 |
// They don't seem to support full text indexes, sorry.
|
66 |
$result = false;
|
67 |
}
|
68 |
+
wp_cache_set( self::CACHE_KEY_FULLTEXT_SUPPORT, $result, self::CACHE_GROUP, DAY_IN_SECONDS );
|
69 |
}
|
70 |
return $result;
|
71 |
}
|
77 |
* @return string|null
|
78 |
*/
|
79 |
public function posts_table_database_engine() {
|
80 |
+
$result = wp_cache_get( self::CACHE_KEY_POSTS_TABLE_DATABASE_ENGINE, self::CACHE_GROUP, false );
|
81 |
+
if ( false === $result ) {
|
82 |
global $wpdb;
|
83 |
$tables = $wpdb->get_results( "SHOW TABLE STATUS WHERE Name = '{$wpdb->posts}'" );
|
84 |
foreach ( $tables as $table ) {
|
86 |
break;
|
87 |
}
|
88 |
|
89 |
+
wp_cache_set( self::CACHE_KEY_POSTS_TABLE_DATABASE_ENGINE, $result, self::CACHE_GROUP, DAY_IN_SECONDS );
|
90 |
}
|
91 |
return $result;
|
92 |
}
|
133 |
* @return bool
|
134 |
*/
|
135 |
public function cache_table_exists() {
|
136 |
+
$exists = wp_cache_get( self::CACHE_KEY_TABLE_EXISTS, self::CACHE_GROUP, false );
|
137 |
+
if ( false === $exists ) {
|
138 |
global $wpdb;
|
139 |
// now check for the cache tables
|
140 |
$tabledata = $wpdb->get_col( 'SHOW TABLES LIKE "' . $wpdb->prefix . YARPP_TABLES_RELATED_TABLE . '"' );
|
143 |
} else {
|
144 |
$exists = false;
|
145 |
}
|
146 |
+
wp_cache_set( self::CACHE_KEY_TABLE_EXISTS, $exists, self::CACHE_GROUP, DAY_IN_SECONDS );
|
147 |
}
|
148 |
return $exists;
|
149 |
}
|
classes/YARPP_Meta_Box.php
CHANGED
@@ -11,11 +11,13 @@ class YARPP_Meta_Box {
|
|
11 |
global $yarpp;
|
12 |
$this->yarpp = $yarpp;
|
13 |
$this->template_text =
|
14 |
-
__(
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
|
|
|
|
19 |
}
|
20 |
|
21 |
private function offer_copy_templates() {
|
@@ -86,7 +88,6 @@ class YARPP_Meta_Box {
|
|
86 |
public function weight( $option, $desc ) {
|
87 |
$weight = (int) yarpp_get_option( "weight[$option]" );
|
88 |
|
89 |
-
/* Both require MyISAM fulltext indexing: */
|
90 |
$fulltext = $this->yarpp->db_schema->database_supports_fulltext_indexes() ? '' : ' readonly="readonly" disabled="disabled"';
|
91 |
|
92 |
echo "<div class='yarpp_form_row yarpp_form_select'><div class='yarpp_form_label'>{$desc}</div><div>";
|
@@ -94,7 +95,8 @@ class YARPP_Meta_Box {
|
|
94 |
echo "<option {$fulltext} value='no'" . ( ( ! $weight ) ? ' selected="selected"' : '' ) . ' >' . __( 'do not consider', 'yet-another-related-posts-plugin' ) . '</option>';
|
95 |
echo "<option {$fulltext} value='consider'" . ( ( $weight == 1 ) ? ' selected="selected"' : '' ) . ' > ' . __( 'consider', 'yet-another-related-posts-plugin' ) . '</option>';
|
96 |
echo "<option {$fulltext} value='consider_extra'" . ( ( $weight > 1 ) ? ' selected="selected"' : '' ) . ' > ' . __( 'consider with extra weight', 'yet-another-related-posts-plugin' ) . '</option>';
|
97 |
-
echo '</select
|
|
|
98 |
}
|
99 |
|
100 |
public function displayorder( $option, $class = null ) {
|
11 |
global $yarpp;
|
12 |
$this->yarpp = $yarpp;
|
13 |
$this->template_text =
|
14 |
+
sprintf(__(
|
15 |
+
'This advanced option gives you full power to easily customize the look and feel of YARPP.' . ' ' .
|
16 |
+
'YARPP Custom Templates are written in PHP and saved in your active theme folder.' . ' ' .
|
17 |
+
'%1$sLearn more about YARPP Custom Templates%2$s.',
|
18 |
+
'yet-another-related-posts-plugin'
|
19 |
+
),
|
20 |
+
'<a href="https://wordpress.org/plugins/yet-another-related-posts-plugin/#installation" target="_blank">', '</a>');
|
21 |
}
|
22 |
|
23 |
private function offer_copy_templates() {
|
88 |
public function weight( $option, $desc ) {
|
89 |
$weight = (int) yarpp_get_option( "weight[$option]" );
|
90 |
|
|
|
91 |
$fulltext = $this->yarpp->db_schema->database_supports_fulltext_indexes() ? '' : ' readonly="readonly" disabled="disabled"';
|
92 |
|
93 |
echo "<div class='yarpp_form_row yarpp_form_select'><div class='yarpp_form_label'>{$desc}</div><div>";
|
95 |
echo "<option {$fulltext} value='no'" . ( ( ! $weight ) ? ' selected="selected"' : '' ) . ' >' . __( 'do not consider', 'yet-another-related-posts-plugin' ) . '</option>';
|
96 |
echo "<option {$fulltext} value='consider'" . ( ( $weight == 1 ) ? ' selected="selected"' : '' ) . ' > ' . __( 'consider', 'yet-another-related-posts-plugin' ) . '</option>';
|
97 |
echo "<option {$fulltext} value='consider_extra'" . ( ( $weight > 1 ) ? ' selected="selected"' : '' ) . ' > ' . __( 'consider with extra weight', 'yet-another-related-posts-plugin' ) . '</option>';
|
98 |
+
echo '</select>';
|
99 |
+
echo '</div></div>';
|
100 |
}
|
101 |
|
102 |
public function displayorder( $option, $class = null ) {
|
classes/YARPP_Meta_Box_Display_Feed.php
CHANGED
@@ -24,7 +24,7 @@ class YARPP_Meta_Box_Display_Feed extends YARPP_Meta_Box {
|
|
24 |
echo ' style="display: none;"';
|
25 |
}
|
26 |
echo '>';
|
27 |
-
echo '<div class="yarpp_form_row"><
|
28 |
$this->template_file( true );
|
29 |
echo '</div>';
|
30 |
|
@@ -36,15 +36,8 @@ class YARPP_Meta_Box_Display_Feed extends YARPP_Meta_Box {
|
|
36 |
$this->textbox( 'rss_thumbnails_heading', __( 'Heading:', 'yet-another-related-posts-plugin' ), 40 );
|
37 |
$this->textbox( 'rss_thumbnails_default', __( 'Default image (URL):', 'yet-another-related-posts-plugin' ), 40 );
|
38 |
$get_image_sizes = yarpp_get_image_sizes();
|
39 |
-
|
40 |
-
|
41 |
-
foreach ( $get_image_sizes as $key => $_size ) {
|
42 |
-
/* translators: %s: thumbnail key's name */
|
43 |
-
$name = sprintf( __( '%1$s (%2$s X %3$s)', 'yet-another-related-posts-plugin' ), $key, $_size['width'], $_size['height'] );
|
44 |
-
$this->radio( 'thumbnail_size_feed_display', $name, '', $key );
|
45 |
-
}
|
46 |
-
echo '</div></div>';
|
47 |
-
echo '</div>';
|
48 |
|
49 |
echo "<div class='yarpp_subbox template_options_builtin'";
|
50 |
if ( $choice != 'builtin' ) {
|
24 |
echo ' style="display: none;"';
|
25 |
}
|
26 |
echo '>';
|
27 |
+
echo '<div class="yarpp_form_row"><p class="description">' . $this->template_text . '</p></div>';
|
28 |
$this->template_file( true );
|
29 |
echo '</div>';
|
30 |
|
36 |
$this->textbox( 'rss_thumbnails_heading', __( 'Heading:', 'yet-another-related-posts-plugin' ), 40 );
|
37 |
$this->textbox( 'rss_thumbnails_default', __( 'Default image (URL):', 'yet-another-related-posts-plugin' ), 40 );
|
38 |
$get_image_sizes = yarpp_get_image_sizes();
|
39 |
+
$this->yarpp_select_option( 'thumbnail_size_feed_display', $get_image_sizes, __( 'Thumbnail Size', 'yet-another-related-posts-plugin' ) );
|
40 |
+
echo '</div>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
|
42 |
echo "<div class='yarpp_subbox template_options_builtin'";
|
43 |
if ( $choice != 'builtin' ) {
|
classes/YARPP_Meta_Box_Display_Web.php
CHANGED
@@ -65,9 +65,9 @@ class YARPP_Meta_Box_Display_Web extends YARPP_Meta_Box {
|
|
65 |
echo ' style="display: none;"';
|
66 |
}
|
67 |
echo '>';
|
68 |
-
echo '<div class="yarpp_form_row"><
|
69 |
$this->template_file( false );
|
70 |
-
$this->yarpp_select_option( 'custom_theme_thumbnail_size_display', $get_image_sizes, 'Thumbnail Size' );
|
71 |
echo '</div>';
|
72 |
|
73 |
echo "<div class='yarpp_subbox template_options_thumbnails'";
|
@@ -77,7 +77,7 @@ class YARPP_Meta_Box_Display_Web extends YARPP_Meta_Box {
|
|
77 |
echo '>';
|
78 |
$this->textbox( 'thumbnails_heading', __( 'Heading:', 'yet-another-related-posts-plugin' ), 40 );
|
79 |
$this->textbox( 'thumbnails_default', __( 'Default image (URL):', 'yet-another-related-posts-plugin' ), 40 );
|
80 |
-
$this->yarpp_select_option( 'thumbnail_size_display', $get_image_sizes, 'Thumbnail Size' );
|
81 |
echo '</div>';
|
82 |
echo '<div class="generate_missing_thumbnails">';
|
83 |
$this->checkbox( 'generate_missing_thumbnails', __( 'Generate missing thumbnail sizes: ', 'yet-another-related-posts-plugin' ) . "<span class='yarpp_help dashicons dashicons-editor-help' data-help='" . '<p>' . esc_attr( __( 'When enabled, missing thumbnail sizes will be automatically generated on the fly. Doing this type of processing on the fly may not scale well for larger sites.', 'yet-another-related-posts-plugin' ) ) . '</p><p>' . sprintf( __( 'For larger sites, we recommend the %1$s or %2$s to generate missing thumbnail sizes in a batch process.', 'yet-another-related-posts-plugin' ), '<a href="https://wordpress.org/plugins/regenerate-thumbnails/" target="_blank">Regenerate Thumbnails plugin</a>', '<a href="https://developer.wordpress.org/cli/commands/media/regenerate/" target="_blank">WP-CLI</a>' ) . '</p><p>' . esc_attr( __( 'New images should continue to automatically get all active thumbnail sizes generated when they are uploaded.', 'yet-another-related-posts-plugin' ) ) . '</p>' . "'> </span> ", 'yarpp', $yarpp_args );
|
65 |
echo ' style="display: none;"';
|
66 |
}
|
67 |
echo '>';
|
68 |
+
echo '<div class="yarpp_form_row"><p class="description">' . $this->template_text . '</p></div>';
|
69 |
$this->template_file( false );
|
70 |
+
$this->yarpp_select_option( 'custom_theme_thumbnail_size_display', $get_image_sizes, __( 'Thumbnail Size', 'yet-another-related-posts-plugin' ) );
|
71 |
echo '</div>';
|
72 |
|
73 |
echo "<div class='yarpp_subbox template_options_thumbnails'";
|
77 |
echo '>';
|
78 |
$this->textbox( 'thumbnails_heading', __( 'Heading:', 'yet-another-related-posts-plugin' ), 40 );
|
79 |
$this->textbox( 'thumbnails_default', __( 'Default image (URL):', 'yet-another-related-posts-plugin' ), 40 );
|
80 |
+
$this->yarpp_select_option( 'thumbnail_size_display', $get_image_sizes, __( 'Thumbnail Size', 'yet-another-related-posts-plugin' ) );
|
81 |
echo '</div>';
|
82 |
echo '<div class="generate_missing_thumbnails">';
|
83 |
$this->checkbox( 'generate_missing_thumbnails', __( 'Generate missing thumbnail sizes: ', 'yet-another-related-posts-plugin' ) . "<span class='yarpp_help dashicons dashicons-editor-help' data-help='" . '<p>' . esc_attr( __( 'When enabled, missing thumbnail sizes will be automatically generated on the fly. Doing this type of processing on the fly may not scale well for larger sites.', 'yet-another-related-posts-plugin' ) ) . '</p><p>' . sprintf( __( 'For larger sites, we recommend the %1$s or %2$s to generate missing thumbnail sizes in a batch process.', 'yet-another-related-posts-plugin' ), '<a href="https://wordpress.org/plugins/regenerate-thumbnails/" target="_blank">Regenerate Thumbnails plugin</a>', '<a href="https://developer.wordpress.org/cli/commands/media/regenerate/" target="_blank">WP-CLI</a>' ) . '</p><p>' . esc_attr( __( 'New images should continue to automatically get all active thumbnail sizes generated when they are uploaded.', 'yet-another-related-posts-plugin' ) ) . '</p>' . "'> </span> ", 'yarpp', $yarpp_args );
|
classes/YARPP_Meta_Box_Relatedness.php
CHANGED
@@ -61,6 +61,17 @@ class YARPP_Meta_Box_Relatedness extends YARPP_Meta_Box {
|
|
61 |
);
|
62 |
?>
|
63 |
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
<p>
|
65 |
<?php
|
66 |
printf(
|
@@ -92,17 +103,17 @@ class YARPP_Meta_Box_Relatedness extends YARPP_Meta_Box {
|
|
92 |
<p><?php esc_html_e( '"Fulltext indexes" will improve YARPP’s algorithm but may affect performance.', 'yet-another-related-posts-plugin' ); ?></p>
|
93 |
<p><?php esc_html_e( 'You have a large database and so adding them may take several minutes and cause the website to become unresponsive during this time. We recommend performing this action during off-peak hours.', 'yet-another-related-posts-plugin' ); ?></p>
|
94 |
<p><?php esc_html_e( 'Please make a database backup before attempting this, and consider adding the indexes manually by running the following queries:', 'yet-another-related-posts-plugin' ); ?></p>
|
95 |
-
|
96 |
-
|
97 |
<code>
|
98 |
ALTER TABLE <?php echo $wpdb->posts; ?> ADD FULLTEXT `yarpp_content` (`post_content`);
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
ALTER TABLE <?php echo $wpdb->posts; ?> ADD FULLTEXT `yarpp_title` (`post_title`);
|
104 |
</code>
|
105 |
-
|
106 |
</div>
|
107 |
</div>
|
108 |
<?php
|
61 |
);
|
62 |
?>
|
63 |
</p>
|
64 |
+
<p>
|
65 |
+
<span class="dashicons <?php echo ( $yarpp->db_schema->content_column_has_index() === true ) ? 'dashicons-yes' : 'dashicons-clock'; ?>"></span>
|
66 |
+
<code>
|
67 |
+
ALTER TABLE <?php echo $wpdb->posts; ?> ADD FULLTEXT `yarpp_content` (`post_content`);
|
68 |
+
</code>
|
69 |
+
<br/>
|
70 |
+
<span class="dashicons <?php echo ( $yarpp->db_schema->title_column_has_index() === true ) ? 'dashicons-yes' : 'dashicons-clock'; ?>"></span>
|
71 |
+
<code>
|
72 |
+
ALTER TABLE <?php echo $wpdb->posts; ?> ADD FULLTEXT `yarpp_title` (`post_title`);
|
73 |
+
</code>
|
74 |
+
</p>
|
75 |
<p>
|
76 |
<?php
|
77 |
printf(
|
103 |
<p><?php esc_html_e( '"Fulltext indexes" will improve YARPP’s algorithm but may affect performance.', 'yet-another-related-posts-plugin' ); ?></p>
|
104 |
<p><?php esc_html_e( 'You have a large database and so adding them may take several minutes and cause the website to become unresponsive during this time. We recommend performing this action during off-peak hours.', 'yet-another-related-posts-plugin' ); ?></p>
|
105 |
<p><?php esc_html_e( 'Please make a database backup before attempting this, and consider adding the indexes manually by running the following queries:', 'yet-another-related-posts-plugin' ); ?></p>
|
106 |
+
<p>
|
107 |
+
<span class="dashicons <?php echo ( $yarpp->db_schema->content_column_has_index() === true ) ? 'dashicons-yes' : 'dashicons-clock'; ?>"></span>
|
108 |
<code>
|
109 |
ALTER TABLE <?php echo $wpdb->posts; ?> ADD FULLTEXT `yarpp_content` (`post_content`);
|
110 |
+
</code>
|
111 |
+
<br/>
|
112 |
+
<span class="dashicons <?php echo ( $yarpp->db_schema->title_column_has_index() === true ) ? 'dashicons-yes' : 'dashicons-clock'; ?>"></span>
|
113 |
+
<code>
|
114 |
ALTER TABLE <?php echo $wpdb->posts; ?> ADD FULLTEXT `yarpp_title` (`post_title`);
|
115 |
</code>
|
116 |
+
</p>
|
117 |
</div>
|
118 |
</div>
|
119 |
<?php
|
classes/YARPP_Shortcode.php
CHANGED
@@ -1,12 +1,9 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
/**
|
6 |
* Class YARPP_Shortcode
|
7 |
* Adds the YARPP shortcode.
|
8 |
*
|
9 |
-
* @
|
10 |
* @since 5.4.0
|
11 |
*/
|
12 |
class YARPP_Shortcode {
|
1 |
<?php
|
|
|
|
|
|
|
2 |
/**
|
3 |
* Class YARPP_Shortcode
|
4 |
* Adds the YARPP shortcode.
|
5 |
*
|
6 |
+
* @package YARPP
|
7 |
* @since 5.4.0
|
8 |
*/
|
9 |
class YARPP_Shortcode {
|
includes/phtmls/yarpp_meta_box_checkbox.phtml
CHANGED
@@ -5,11 +5,11 @@
|
|
5 |
</div>
|
6 |
<?php } ?>
|
7 |
<div scope="row">
|
8 |
-
<input
|
9 |
-
type="checkbox"
|
10 |
-
name="<?php echo $option; ?>"
|
11 |
-
id="yarpp-<?php echo $option; ?>"
|
12 |
-
value="true"
|
13 |
<?php checked( ( isset( $yarpp_args['option_value'] ) ) ? $yarpp_args['option_value'] : yarpp_get_option( $option ) ); ?>
|
14 |
<?php echo ( isset( $yarpp_args['disabled_checkbox'] ) ) ? $yarpp_args['disabled_checkbox'] : ''; ?>
|
15 |
/>
|
5 |
</div>
|
6 |
<?php } ?>
|
7 |
<div scope="row">
|
8 |
+
<input
|
9 |
+
type="checkbox"
|
10 |
+
name="<?php echo $option; ?>"
|
11 |
+
id="yarpp-<?php echo $option; ?>"
|
12 |
+
value="true"
|
13 |
<?php checked( ( isset( $yarpp_args['option_value'] ) ) ? $yarpp_args['option_value'] : yarpp_get_option( $option ) ); ?>
|
14 |
<?php echo ( isset( $yarpp_args['disabled_checkbox'] ) ) ? $yarpp_args['disabled_checkbox'] : ''; ?>
|
15 |
/>
|
includes/yarpp_options.php
CHANGED
@@ -48,7 +48,7 @@ if ( current_user_can( 'update_plugins' ) ) {
|
|
48 |
'There is a new version of %1$s available.' .
|
49 |
'<a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a>' .
|
50 |
'or <a href="%5$s">update automatically</a>.',
|
51 |
-
'
|
52 |
),
|
53 |
$plugin_name,
|
54 |
esc_url( $details_url ),
|
@@ -65,7 +65,7 @@ if ( current_user_can( 'update_plugins' ) ) {
|
|
65 |
__(
|
66 |
'There is a new beta (%s) of Yet Another Related Posts Plugin. ' .
|
67 |
'You can <a href="%s">download it here</a> at your own risk.',
|
68 |
-
'
|
69 |
),
|
70 |
$yarpp_version_info['beta']['version'],
|
71 |
$yarpp_version_info['beta']['url']
|
48 |
'There is a new version of %1$s available.' .
|
49 |
'<a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a>' .
|
50 |
'or <a href="%5$s">update automatically</a>.',
|
51 |
+
'yet-another-related-posts-plugin'
|
52 |
),
|
53 |
$plugin_name,
|
54 |
esc_url( $details_url ),
|
65 |
__(
|
66 |
'There is a new beta (%s) of Yet Another Related Posts Plugin. ' .
|
67 |
'You can <a href="%s">download it here</a> at your own risk.',
|
68 |
+
'yet-another-related-posts-plugin'
|
69 |
),
|
70 |
$yarpp_version_info['beta']['version'],
|
71 |
$yarpp_version_info['beta']['url']
|
js/block.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e,t,a,n,l){var i=a.createElement,o=a.useEffect;const{registerBlockType:r,createBlock:p}=e,
|
1 |
+
!function(e,t,a,n,l){var i=a.createElement,o=a.useEffect;const{registerBlockType:r,createBlock:p}=e,s=t["__"];var d=wp.serverSideRender;const C=l["InspectorControls"];l=i("svg",{width:"24px",height:"24px",viewBox:"0 0 145 191"},i("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},i("g",{id:"mark",transform:"translate(1.000000, 0.000000)",fill:"#000000",fillRule:"nonzero"},[i("g",{id:"coffee",transform:"translate(71.500000, 120.703704) scale(-1, 1) rotate(-180.000000) translate(-71.500000, -120.703704) translate(0.000000, 51.703704)"},[i("path",{d:"M42.8605706,136.08228 C32.8383705,134.783388 25.4669697,132.899997 20.7463681,130.432103 L17.3693225,127.801849 L17.6961333,113.286738 C17.9140072,99.3561292 17.9140072,98.6742113 15.626331,96.8232912 C9.85267229,92.1472827 0,79.2639855 0,68.5481325 C0,63.190206 1.55910743,60.0622836 4.82721619,54.4121066 C7.00595535,50.8076833 13.5249703,45.5370334 14.7232769,44.5628649 C17.0109529,43.0041953 18.4586919,44.1303138 17.6961333,33.1222102 C16.8246376,19.386435 16.0620789,17.4285621 24.0144768,12.8499703 C34.7992358,6.61529219 42.7516337,3.59536997 52.7738339,1.7444499 C76.6310277,-2.44447446 113.342783,1.25736568 126.30628,9.14813017 C133.931868,13.9215556 136.546355,16.844061 136.546355,20.9355684 C140.468085,87.8934137 142.537888,121.85942 142.755761,122.833589 C143.191509,125.074177 142.755761,125.658677 139.160842,127.314764 C134.040804,129.652769 127.831398,130.821771 106.588691,133.354609 C97.6558607,134.426194 87.0889758,135.692613 83.1672452,136.277114 C74.5612255,137.446116 52.55596,137.348699 42.8605706,136.08228 Z M84.5302734,132.078704 C90.2338167,131.384856 99.0983213,130.250086 109.038086,129.19345 C123.269589,127.025504 135.419901,125.626331 136.052413,123.330859 C136.26325,122.693228 123.934295,120.974239 120.350064,119.826503 C114.130371,117.786084 102.282696,120.185881 90.3749197,122.413563 C78.5049292,124.634175 65.4563408,123.330859 57.2545987,123.330859 C57.2545987,123.330859 52.4754466,122.523193 42.9171425,120.907861 C34.8760316,119.548931 36.2210561,119.122494 30.0013622,121.800545 C26.4171319,123.458385 23.2545757,125.243752 23.1491572,126.00891 C23.1491572,126.646541 23.4436238,128.461522 26.4171319,129.962221 C30.7587891,132.153411 43.5141602,132.441008 54.7143555,132.987395 C63.4858398,132.987395 78.8267301,132.772551 84.5302734,132.078704 Z M39.8706761,116.766844 C44.1268856,115.725876 53.6774041,114.21174 61.1517228,113.360038 C78.7994201,111.372734 134.960621,119.511215 135.168241,119.227315 C135.375861,119.038049 134.441571,54.1194625 131.327272,29.7040177 C129.873932,18.9157978 129.354882,17.9694627 122.088183,13.4270544 C110.461465,6.04564084 74.5432107,2.73346808 53.365974,6.9919759 C42.9849757,9.07391307 36.7563767,11.7236513 27.4134781,17.6855623 L22.2811694,21.5880854 L23.5725088,121.309253 L39.8706761,116.766844 Z M17.5997043,65.8013821 C17.5997043,50.8200023 18.1706592,50.7529753 17.5997043,50.7529753 C14.2258377,50.7529753 10.6869946,53.2086296 7.93345172,57.6428564 C5.8104668,61.0616507 5.50346166,65.6301628 5.50346166,67.2280714 C5.50346166,78.0260213 10.8676018,86.5101525 17.5997043,86.5101525 C17.5997043,86.5101525 17.5997043,79.607229 17.5997043,65.8013821 Z",id:"mug",stroke:"#000000"}),i("g",{id:"Face",transform:"translate(50.942850, 60.400797)"},[i("path",{d:"M62.160778,33.5475835 C58.4082262,26.6041533 60.1139316,19.0295022 64.8899066,19.0295022 C67.6190353,19.0295022 70.6893049,21.554386 71.7127282,24.7104906 C74.1007157,31.0226999 65.2310478,39.2285718 62.160778,33.5475835 Z",id:"Shape"}),i("path",{d:"M2.10303837,34.0061906 C-1.64951349,27.0627603 0.0561919019,19.4881092 4.832167,19.4881092 C7.56129563,19.4881092 10.6315653,22.0129929 11.6549885,25.1690976 C14.0429761,31.4813068 5.17330808,39.6871789 2.10303837,34.0061906 Z",id:"Shape"}),i("path",{d:"M31.2744481,13.4867788 C22.3526728,9.75718844 22.3526728,6.85639597 31.6992946,2.91960618 C42.1080324,-1.22438307 54.6410025,-0.809984147 59.1018902,3.74840403 C62.2882385,7.47799435 62.2882385,7.89239328 58.8894669,10.7931858 C53.1540399,15.7659729 39.3465305,17.0091696 31.2744481,13.4867788 Z M34.976751,7.90748093 C31.9007499,10.1104937 36.6921961,10.3294258 44.7947408,9.91788078 C56.0107659,9.20199741 56.1391309,4.42943021 44.7105432,4.91244623 C39.9559268,5.04429429 35.7457513,7.35672775 34.976751,7.90748093 Z",id:"Shape"})])]),i("g",{id:"Steam",transform:"translate(59.000000, 0.000000)"},[i("path",{d:"M4.16072763,0 C3.8378459,2.63060705 3.63689662,5.30305159 3.55986302,7.99095841 C3.50399,11.7470679 4.34571573,15.3721626 5.88012483,17.9837251 C6.89080993,19.79566 7.8953323,21.6238698 8.89369196,23.4683544 C9.94816663,25.3544895 10.6511261,27.7615875 10.9088994,30.3688969 C11.2199644,33.5056623 10.7257443,36.7238795 9.55926508,39.1573237 C8.32730672,41.7867086 6.67010618,43.6939485 4.8078126,44.6256781 L4.16072763,45 C4.54897862,43.79566 4.91874145,42.6889692 5.26077208,41.5660036 C5.72297563,40.0524412 6.18517917,38.5388789 6.61040644,36.9764919 C7.10981843,35.2326056 7.05009434,33.1543735 6.45325723,31.5081374 C6.2293797,30.9214149 5.97231446,30.3761351 5.68599934,29.880651 C4.66915153,28.0415914 3.62457152,26.2676311 2.63545592,24.4122966 C1.45178454,22.2681987 0.62382925,19.5948547 0.241241542,16.681736 C-0.438989396,11.7709757 0.340504342,6.58788172 2.31191343,2.91320073 C2.76487291,2.01808319 3.30102903,1.28571429 3.80020887,0.455696202 L4.06828692,5.05924416e-15 L4.16072763,0 Z",id:"Shape"}),i("path",{d:"M42,22.2784335 C41.5087566,23.247748 41.0367776,24.1755205 40.5551664,25.1586823 C40.1845249,25.9527384 39.8622545,26.7913079 39.591944,27.6650528 C39.2956943,28.8926755 39.2292571,30.2107229 39.3992994,31.4869214 C39.5437829,33.4255504 39.7267951,35.3641795 39.8038529,37.3028085 C39.8563132,38.9567993 39.5167155,40.587414 38.8406305,41.9278235 C38.0105027,43.6950754 36.6602155,44.8138092 35.1803853,44.9603932 C33.720005,45.1484608 32.2558855,44.6634774 31,43.5756581 L31.1348511,43.4094899 C32.0980736,42.4955649 33.1287215,41.5954871 34.1015762,40.6400199 C34.7603771,40.0681104 35.0780935,38.9403296 34.8817863,37.8705499 C34.5399208,35.5070657 34.3752325,33.0977166 34.390543,30.683775 C34.5530247,26.3626272 36.7924318,22.7913004 39.765324,22.1122653 C40.4194081,21.9625782 41.0858457,21.9625782 41.7399299,22.1122653 L41.8844134,22.1122653 L42,22.2784335 Z",id:"Shape"})])])));const{TextControl:u,SelectControl:c,PanelBody:y}=n;r("yarpp/yarpp-block",{title:s("Related Posts [YARPP]","yet-another-related-posts-plugin"),description:s("Display related posts by YARPP","yet-another-related-posts-plugin"),category:"yarpp",icon:l,keywords:[s("yarpp","yet-another-related-posts-plugin"),s("yet another","yet-another-related-posts-plugin"),s("related posts","yet-another-related-posts-plugin"),s("contextual","yet-another-related-posts-plugin"),s("popular","yet-another-related-posts-plugin"),s("similar","yet-another-related-posts-plugin"),s("thumbnail","yet-another-related-posts-plugin"),s("you may also","yet-another-related-posts-plugin"),s("posts","yet-another-related-posts-plugin")],supports:{html:!1},transforms:{from:[{type:"block",blocks:["core/legacy-widget"],isMatch:({idBase:e,instance:t})=>!!t?.raw&&"yarpp_widget"===e,transform:({instance:e})=>{var t=e.raw.template,e="heading"in e.raw?e.raw.heading:"thumbnails"===t?e.raw.thumbnails_heading:e.raw.title;return p("yarpp/yarpp-block",{name:"yarpp_widget",template:t,heading:e,domain:"widget"})}}]},attributes:{reference_id:{type:"string",default:""},heading:{type:"string",default:s("You may also like","yet-another-related-posts-plugin")},limit:{type:"number",default:6},template:{type:"string",default:yarpp_localized.selected_theme_style},yarpp_preview:{type:"string"},domain:{type:"string",default:"block"},yarpp_is_admin:{type:"boolean",default:yarpp_localized.yarpp_is_admin}},example:{attributes:{yarpp_preview:"yarpp_preview"}},edit:function(e){var t=e.attributes;const a=e.setAttributes;var n,l=Object.keys(yarpp_localized.template).map(function(e){return{value:e,label:yarpp_localized.template[e]}});return e.isSelected,o(()=>{a({domain:yarpp_localized.default_domain})},[]),[i("div",{className:e.className},i(d,{block:"yarpp/yarpp-block",attributes:t})),i(C,{},i(y,{title:"YARPP Posts Settings",initialOpen:!0},i(u,{label:s("Reference ID (Optional)","yet-another-related-posts-plugin"),value:t.reference_id,help:s("The ID of the post to use for finding related posts. Defaults to current post.","yet-another-related-posts-plugin"),onChange:function(e){a({reference_id:e})}}),i(u,{label:s("Maximum number of posts","yet-another-related-posts-plugin"),value:t.limit,onChange:function(e){a({limit:parseInt(e)})},type:"number",min:1,step:1}),i(c,{value:t.template,label:s("Theme","yet-another-related-posts-plugin"),onChange:function(e){a({template:e})},options:l}),(n=t.template,("widget"===yarpp_localized.default_domain?["","builtin","list","thumbnail","thumbnails"]:["thumbnail","thumbnails"]).includes(n)&&i(u,{label:s("Heading","yet-another-related-posts-plugin"),value:t.heading,onChange:function(e){a({heading:e})}}))))]},save(){return null}})}(window.wp.blocks,window.wp.i18n,window.wp.element,window.wp.components,(window.wp.editor,window.wp.blockEditor),window.wp.serverSideRender),function(a){a(document).on("widget-added",function(){function e(e){"object"==typeof e&&"type"in e&&e.stopImmediatePropagation();var t=a(this).closest("form").find(".widget-id").val();/__i__$/.test(t)||(e="builtin"===(e=a("#widget-"+t+"-template_file").val())||"thumbnails"===e,a("#widget-"+t+"-heading").closest("p").toggle(e))}a(".yarpp-widget-select-control","#wpbody").each(e),a(".yarpp-widget-select-control select","#wpbody").on("change",e)})}(jQuery);
|
js/options_basic.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(function(p){function e(){var e,t=p(this).closest("#yarpp_display_web, #yarpp_display_rss");t.length&&(value=t.find(".use_template").val(),t.find(".yarpp_subbox").hide(),t.find(".template_options_"+value).show(),e=t.find(".yarpp_no_results"),"custom"===value?e.hide():e.show(),e=t.find(".generate_missing_thumbnails"),"builtin"===value?e.hide():e.show(),a.apply(t))}function a(){var e=p(this).closest("#yarpp_display_web, #yarpp_display_rss");e.find(".excerpted").toggle(!("builtin"!==e.find(".use_template").val()||!e.find(".show_excerpt input").prop("checked")))}function t(){p("#yarpp_display_rss .inside").is(":visible")&&(p("#yarpp-rss_display").is(":checked")?(p(".rss_displayed").show(),p("#yarpp_display_rss").each(e)):p(".rss_displayed").hide())}function i(){p("#yarpp_display_api .inside").is(":visible")&&(p("#yarpp-rest_api_display").is(":checked")?p(".yarpp_rest_displayed").show():p(".yarpp_rest_displayed").hide())}function n(){p("#yarpp-rest_api_client_side_caching").is(":checked")?p(".yarpp_rest_browser_cache_displayed").show():p(".yarpp_rest_browser_cache_displayed").hide()}postboxes.add_postbox_toggles(pagenow),p(".use_template").each(e).change(e),p(".show_excerpt, .use_template, #yarpp-rss_display").click(a),p("#yarpp-rss_display, #yarpp_display_rss .handlediv, #yarpp_display_rss-hide").click(t),t(),p("#yarpp-rest_api_display").click(i),i(),p("#yarpp-rest_api_client_side_caching").click(n),n();var s=!1;function r(){var i,e;function n(t){var a;t in i||((a=p("#exclude_"+t)).find(".loading").length||(t in e?e[t]=e[t]+100:e[t]=0,p.ajax({type:"POST",url:ajaxurl,data:{action:"yarpp_display_exclude_terms",taxonomy:t,offset:e[t],_ajax_nonce:p("#yarpp_display_exclude_terms-nonce").val()},beforeSend:function(){a.append(loading)},success:function(e){if(a.find(".loading").remove(),":("==e)return i[t]=!0,void a.append("-");a.append(e)},dataType:"html"})))}!s&&p("#yarpp_pool .inside").is(":visible")&&(s=!0,i={},e={},p(".exclude_terms").each(function(){var a,e=jQuery(this).attr("id");e&&(n(a=e.replace("exclude_","")),p("#exclude_"+a).parent(".yarpp_scroll_wrapper").scroll(function(){var e=p(this),t=e.children("div");e.scrollTop()+e.height()>t.height()-10&&n(a)}))}))}function o(e){p("#tab-link-"+e+" a").click(),p("#contextual-help-link").click()}p("#yarpp_pool .handlediv, #yarpp_pool-hide").click(r),r(),p("#yarpp-optin-learnmore").click(function(){o("optin")}),p("#yarpp-help-cpt").click(function(){o("dev")}),"#help-optin"==location.hash&&setTimeout(function(){o("optin")}),p(".yarpp_help[data-help]").hover(function(){var e=p(this),t={content:"<p>"+e.attr("data-help")+"</p>",position:{edge:isRtl?"right":"left",align:"center",of:e},document:{body:e}},a=e.pointer(t).pointer("open");e.closest(".yarpp_form_row, p").mouseleave(function(){a.pointer("close")})}),p(".yarpp_template_button[data-help]").hover(function(){var e=p(this),t="<p>"+e.attr("data-help")+"</p>",a=e.pointer({content:t,position:{edge:"bottom",of:e},document:{body:e}}).pointer("open");e.mouseleave(function(){a.pointer("close")}),p(".yarpp_copy_templates_button").on("click",function(){const e=p(this),t=e.siblings(".spinner");e.addClass("yarpp-disabled"),t.addClass("is-active"),window.location=window.location+(window.location.search.length?"&":"?")+"action=copy_templates&_ajax_nonce="+p("#yarpp_copy_templates-nonce").val()})}),p(".yarpp_spin_on_click").on("click",function(){const e=p(this),t=e.siblings(".spinner");e.addClass("yarpp-disabled"),t.addClass("is-active")});const c=document.getElementById("yarpp-preview-show-code"),d=document.getElementById("yarpp-display-code-preview");function l(e=!1){"none"===d.style.display||e?(d.style.display="block",c.innerText=yarpp_messages.hide_code):(d.style.display="none",c.innerText=yarpp_messages.show_code)}c&&c.addEventListener("click",()=>l());const _=document.querySelector("#yarpp-display-html-preview .yarpp-preview__iframe__container");if(_){let a;function u(e){var t=e.x-a;a=e.x,_.style.width=parseInt(getComputedStyle(_,"").width)+t+"px",D()}_.addEventListener("mousedown",function(e){e.layerX-e.offsetX<50&&(a=e.x,document.addEventListener("mousemove",u,!1))}),document.addEventListener("mouseup",function(){document.removeEventListener("mousemove",u,!1)})}let y={};function h(e,t,a="value"){t=t.target[a];y[e]="checked"===a?t?1:0:t,P()}const m=document.querySelector("#limit[name=limit]");m&&m.addEventListener("blur",e=>h("limit",e));const f=document.querySelector("#yarpp-promote_yarpp[name=promote_yarpp]");f&&f.addEventListener("change",e=>h("promote_yarpp",e,"checked"));const v=document.querySelector("#order[name=order]");v&&v.addEventListener("change",e=>h("order",e));const b=document.querySelector("#template_file[name=template_file]");b&&b.addEventListener("change",e=>h("template",e));const g=document.querySelectorAll("input[name=thumbnail_size_display]");0<g.length&&g.forEach(e=>{e.addEventListener("change",e=>h("size",e))});const w=document.querySelectorAll("input[name=custom_theme_thumbnail_size_display]");0<w.length&&w.forEach(e=>{e.addEventListener("change",e=>h("size",e))});const x=document.querySelector("#thumbnails_heading[name=thumbnails_heading]");x&&x.addEventListener("blur",e=>h("thumbnails_heading",e));const k=document.querySelector("#thumbnails_default[name=thumbnails_default]");k&&k.addEventListener("blur",e=>h("thumbnails_default",e));const E=document.querySelector("#before_related[name=before_related]");E&&E.addEventListener("blur",e=>h("before_related",e));const S=document.querySelector("#after_related[name=after_related]");S&&S.addEventListener("blur",e=>h("after_related",e));const L=document.querySelector("#before_title[name=before_title]");L&&L.addEventListener("blur",e=>h("before_title",e));const q=document.querySelector("#after_title[name=after_title]");q&&q.addEventListener("blur",e=>h("after_title",e));const C=document.querySelector("#yarpp-show_excerpt[name=show_excerpt]");C&&C.addEventListener("change",e=>h("show_excerpt",e,"checked"));const T=document.querySelector("#excerpt_length[name=excerpt_length]");T&&T.addEventListener("blur",e=>h("excerpt_length",e));const j=document.querySelector("#before_post[name=before_post]");j&&j.addEventListener("blur",e=>h("before_post",e));const z=document.querySelector("#after_post[name=after_post]");function O(e){_.style.width=e+"px",D()}function D(){var e=document.querySelector(".yarpp-preview__iframe__backdrop");e&&(document.querySelector("#yarpp-preview__show-preview-width__value").innerText=e.offsetWidth-20+"px")}z&&z.addEventListener("blur",e=>h("after_post",e)),window.addEventListener("resize",D);const A=document.querySelector("#yarpp-preview-mobile");A&&A.addEventListener("click",e=>O(320));const B=document.querySelector("#yarpp-preview-tablet");B&&B.addEventListener("click",e=>O(768));const I=document.querySelector("#yarpp-preview-desktop");function P(e=null){c.setAttribute("disabled","disabled");var n=p("#yarpp-display-html-preview .yarpp-preview__iframe__container"),s=p("#yarpp-display-code-preview");const r=document.querySelector("#yarpp-display-html-preview div.yarpp-preview__iframe__backdrop");if(D(),e){if("custom"===e){y.template=b.value;let t=null;w.forEach(e=>{e.checked&&(t=e.value)}),t&&(y.size=t)}else y.template=e;"thumbnails"===e&&(g.forEach(e=>{e.checked&&(checked_value=e.value)}),checked_value&&(y.size=checked_value))}p.ajax({type:"POST",url:ajaxurl,data:{action:"yarpp_display_preview",_ajax_nonce:p("#yarpp_display_preview-nonce").val(),...y},beforeSend:function(){n.html(loading)},success:function(e){const a=JSON.parse(e),i=document.createElement("style");i.appendChild(document.createTextNode(a.styles));const t=document.createElement("iframe");t.width="100%",t.height="100%",t.style="overflow: hidden; user-select: none; outline: 0; background-color: white;",n.html(t),n.prepend(r),t.onload=e=>{const t=e.target.contentWindow.document;t.getElementsByTagName("head")[0].appendChild(i),t.body.innerHTML=a.html,t.body.style="overflow:hidden;"},"codeEditor"in wp?(l(!0),e={...wp.codeEditor.defaultSettings,type:"text/html",codemirror:{...wp.codeEditor.defaultSettings.codemirror,indentUnit:2,tabSize:2,readOnly:!0}},s.html('<textarea id="yarpp-preview-code-textarea">'+a.code+"</textarea>"),wp.codeEditor.initialize(document.getElementById("yarpp-preview-code-textarea"),e),l()):s.html("<pre><code>"+a.code+"</code></pre>"),c.removeAttribute("disabled")},dataType:"html"})}function N(){var e=p(this).find("option:selected"),t=e.closest(".yarpp_form_row");e.attr("data-url")?t.find(".template_author_wrap").toggle(!!e.attr("data-author")).find("span").empty().append("<a>"+e.attr("data-author")+"</a>").attr("href",e.attr("data-url")):t.find(".template_author_wrap").toggle(!!e.attr("data-author")).find("span").text(e.attr("data-author")),t.find(".template_description_wrap").toggle(!!e.attr("data-description")).find("span").text(e.attr("data-description")),t.find(".template_file_wrap").toggle(!!e.attr("data-basename")).find("span").text(e.attr("data-basename"))}I&&I.addEventListener("click",e=>O(1200)),P(),p(".yarpp_template_button:not(.disabled)").click(function(){var e=p(this).attr("data-value");p(this).siblings("input").val(e).change(),p(this).siblings().removeClass("active"),p(this).addClass("active"),p(this).parents("#yarpp_display_web").length&&P(e)}),p("#template_file, #rss_template_file").each(N).change(N);var H=!1;function Q(){var t;p("#optin_data_frame").is(":visible")&&!H&&(H=!0,t=p("#optin_data_frame"),p.ajax({type:"POST",url:ajaxurl,data:{action:"yarpp_optin_data",_ajax_nonce:p("#yarpp_optin_data-nonce").val()},beforeSend:function(){t.html(loading)},success:function(e){t.html("<pre>"+e+"</pre>")},dataType:"html"}))}function W(){setTimeout(Q,0)}function X(){var e=p(".yarpp_form_post_types").is(":has(input[type=checkbox]:checked)");p("#yarpp-auto_display_archive").attr("disabled",!e),e||p("#yarpp-auto_display_archive").prop("checked",!1)}function J(e,t){e?(p(".yarpp_form_post_types #yarpp_post_type_"+t).prop("disabled",!1),p(".yarpp_form_post_types #yarpp_post_type_"+t).siblings().hide()):(p(".yarpp_form_post_types #yarpp_post_type_"+t).prop("disabled",!0),p(".yarpp_form_post_types #yarpp_post_type_"+t).siblings().show())}p("#yarpp-optin-learnmore, a[aria-controls=tab-panel-optin]").bind("click focus",W),W(),p(".sync_no_results, .sync_rss_no_results").change(function(){var e=p(this).find("input").attr("value");p(this).hasClass("sync_no_results")&&p(".sync_no_results input").attr("value",e),p(this).hasClass("sync_rss_no_results")&&p(".sync_rss_no_results input").attr("value",e)}),p(".yarpp_form_post_types input[type=checkbox]").change(X),X(),p("#yarpp_fulltext_expand").click(function(e){e.preventDefault();e=p("#yarpp_fulltext_details");e.slideToggle(),e.hasClass("hidden")?(e.removeClass("hidden"),p(this).text("Hide Details [-]")):(e.addClass("hidden"),p(this).text("Show Details [+]"))}),p(".include_post_type input[type=checkbox]").change(function(e){var t=p(this).attr("data-post-type");p("#yarpp-same_post_type").is(":checked")?J(p(this).is(":checked"),t):p(".yarpp_form_post_types #yarpp_post_type_"+t).prop("disabled",!1)}),p("#yarpp-same_post_type").change(function(e){p(this).is(":checked")?p(".include_post_type input[type=checkbox]").each(function(){var e=p(this).attr("data-post-type");J(p(this).is(":checked"),e)}):(p(".yarpp_form_post_types input[type=checkbox]").prop("disabled",!1),p(".yarpp_form_post_types input[type=checkbox]").siblings().hide())});var M=p('\t\t\t<div id="shareaholic-deactivate-dialog" class="shareaholic-deactivate-dialog" data-remodal-id="">\t\t\t\t<div class="shareaholic-deactivate-header" style="background-image: url('+yarpp_messages.logo+"); background-color: "+yarpp_messages.bgcolor+';"><div class="shareaholic-deactivate-text"><h2>'+yarpp_messages.model_title+'</h2></div></div>\t\t\t\t<div class="shareaholic-deactivate-body">\t\t\t\t\t<div class="shareaholic-deactivate-body-foreword">'+yarpp_messages.alert_message+'</div>\t\t\t\t\t<div class="shareaholic-deactivate-dialog-footer"> <input type="submit" class="button confirm button-secondary" id="yarpp-clear-cache-submit" value="Delete"/>\t\t\t\t\t\t<button data-remodal-action="cancel" class="button button-secondary">Cancel</button>\t\t\t\t\t\t</div>\t\t\t\t</div>\t\t\t</div>\t\t')[0];p("#yarpp-clear-cache").click(function(){p(M).remodal({hashTracking:!1,closeOnOutsideClick:!1}).open(),event.preventDefault()}),p(document.body).on("click","#yarpp-clear-cache-submit",function(){p(M).remodal().close();var a="#yarpp-clear-cache",i="#display_notices",n="notice notice-error is-dismissible";p(a).prop("disabled",!0),p.ajax({type:"POST",url:ajaxurl,data:{action:"yarpp_clear_cache",_ajax_nonce:p("#clear_cache-nonce").val()},beforeSend:function(){p(a).siblings(".spinner").addClass("is-active")},success:function(e){var t;p(a).siblings(".spinner").removeClass("is-active"),p(i).show(),"success"==e?(t=yarpp_messages.success,n="notice notice-success is-dismissible",p(a).prop("disabled",!1)):t="forbidden"==e?yarpp_messages.forbidden:"nonce_fail"==e?yarpp_messages.nonce_fail:yarpp_messages.error,p(i).addClass(n),p(i).html("<p>"+t+"</p>")},error:function(e){p(i).show(),p(i).addClass(n),p(a).siblings(".spinner").removeClass("is-active"),p(i).html("<p>"+yarpp_messages.error+"</p>")}}),p(i).delay(5e3).fadeOut(1e3)})});
|
1 |
+
jQuery(function(p){function e(){var e,t=p(this).closest("#yarpp_display_web, #yarpp_display_rss");t.length&&(value=t.find(".use_template").val(),t.find(".yarpp_subbox").hide(),t.find(".template_options_"+value).show(),e=t.find(".yarpp_no_results"),"custom"===value?e.hide():e.show(),e=t.find(".generate_missing_thumbnails"),"builtin"===value?e.hide():e.show(),a.apply(t))}function a(){var e=p(this).closest("#yarpp_display_web, #yarpp_display_rss");e.find(".excerpted").toggle(!("builtin"!==e.find(".use_template").val()||!e.find(".show_excerpt input").prop("checked")))}function t(){p("#yarpp_display_rss .inside").is(":visible")&&(p("#yarpp-rss_display").is(":checked")?(p(".rss_displayed").show(),p("#yarpp_display_rss").each(e)):p(".rss_displayed").hide())}function i(){p("#yarpp_display_api .inside").is(":visible")&&(p("#yarpp-rest_api_display").is(":checked")?p(".yarpp_rest_displayed").show():p(".yarpp_rest_displayed").hide())}function n(){p("#yarpp-rest_api_client_side_caching").is(":checked")?p(".yarpp_rest_browser_cache_displayed").show():p(".yarpp_rest_browser_cache_displayed").hide()}postboxes.add_postbox_toggles(pagenow),p(".use_template").each(e).change(e),p(".show_excerpt, .use_template, #yarpp-rss_display").click(a),p("#yarpp-rss_display, #yarpp_display_rss .handlediv, #yarpp_display_rss-hide").click(t),t(),p("#yarpp-rest_api_display").click(i),i(),p("#yarpp-rest_api_client_side_caching").click(n),n();var s=!1;function r(){var i,e;function n(t){var a;t in i||((a=p("#exclude_"+t)).find(".loading").length||(t in e?e[t]=e[t]+100:e[t]=0,p.ajax({type:"POST",url:ajaxurl,data:{action:"yarpp_display_exclude_terms",taxonomy:t,offset:e[t],_ajax_nonce:p("#yarpp_display_exclude_terms-nonce").val()},beforeSend:function(){a.append(loading)},success:function(e){if(a.find(".loading").remove(),":("==e)return i[t]=!0,void a.append("-");a.append(e)},dataType:"html"})))}!s&&p("#yarpp_pool .inside").is(":visible")&&(s=!0,i={},e={},p(".exclude_terms").each(function(){var a,e=jQuery(this).attr("id");e&&(n(a=e.replace("exclude_","")),p("#exclude_"+a).parent(".yarpp_scroll_wrapper").scroll(function(){var e=p(this),t=e.children("div");e.scrollTop()+e.height()>t.height()-10&&n(a)}))}))}function o(e){p("#tab-link-"+e+" a").click(),p("#contextual-help-link").click()}p("#yarpp_pool .handlediv, #yarpp_pool-hide").click(r),r(),p("#yarpp-optin-learnmore").click(function(){o("optin")}),p("#yarpp-help-cpt").click(function(){o("dev")}),"#help-optin"==location.hash&&setTimeout(function(){o("optin")}),p(".yarpp_help[data-help]").hover(function(){var e=p(this),t={content:"<p>"+e.attr("data-help")+"</p>",position:{edge:isRtl?"right":"left",align:"center",of:e},document:{body:e}},a=e.pointer(t).pointer("open");e.closest(".yarpp_form_row, p").mouseleave(function(){a.pointer("close")})}),p(".yarpp_template_button[data-help]").hover(function(){var e=p(this),t="<p>"+e.attr("data-help")+"</p>",a=e.pointer({content:t,position:{edge:"bottom",of:e},document:{body:e}}).pointer("open");e.mouseleave(function(){a.pointer("close")}),p(".yarpp_copy_templates_button").on("click",function(){const e=p(this),t=e.siblings(".spinner");e.addClass("yarpp-disabled"),t.addClass("is-active"),window.location=window.location+(window.location.search.length?"&":"?")+"action=copy_templates&_ajax_nonce="+p("#yarpp_copy_templates-nonce").val()})}),p(".yarpp_spin_on_click").on("click",function(){const e=p(this),t=e.siblings(".spinner");e.addClass("yarpp-disabled"),t.addClass("is-active")});const c=document.getElementById("yarpp-preview-show-code"),d=document.getElementById("yarpp-display-code-preview");function l(e=!1){"none"===d.style.display||e?(d.style.display="block",c.innerText=yarpp_messages.hide_code):(d.style.display="none",c.innerText=yarpp_messages.show_code)}c&&c.addEventListener("click",()=>l());const _=document.querySelector("#yarpp-display-html-preview .yarpp-preview__iframe__container");if(_){let a;function u(e){var t=e.x-a;a=e.x,_.style.width=parseInt(getComputedStyle(_,"").width)+t+"px",D()}_.addEventListener("mousedown",function(e){e.layerX-e.offsetX<50&&(a=e.x,document.addEventListener("mousemove",u,!1))}),document.addEventListener("mouseup",function(){document.removeEventListener("mousemove",u,!1)})}let y={};function h(e,t,a="value"){t=t.target[a];y[e]="checked"===a?t?1:0:t,N()}const m=document.querySelector("#limit[name=limit]");m&&m.addEventListener("blur",e=>h("limit",e));const v=document.querySelector("#yarpp-promote_yarpp[name=promote_yarpp]");v&&v.addEventListener("change",e=>h("promote_yarpp",e,"checked"));const f=document.querySelector("#order[name=order]");f&&f.addEventListener("change",e=>h("order",e));const b=document.querySelector("#template_file[name=template_file]");b&&b.addEventListener("change",e=>h("template",e));const g=document.querySelector("#thumbnail_size_display[name=thumbnail_size_display]");g&&g.addEventListener("change",e=>h("size",e));const w=document.querySelector("#custom_theme_thumbnail_size_display[name=custom_theme_thumbnail_size_display]");w&&w.addEventListener("change",e=>h("size",e));const x=document.querySelector("#thumbnails_heading[name=thumbnails_heading]");x&&x.addEventListener("blur",e=>h("thumbnails_heading",e));const k=document.querySelector("#thumbnails_default[name=thumbnails_default]");k&&k.addEventListener("blur",e=>h("thumbnails_default",e));const S=document.querySelector("#before_related[name=before_related]");S&&S.addEventListener("blur",e=>h("before_related",e));const E=document.querySelector("#after_related[name=after_related]");E&&E.addEventListener("blur",e=>h("after_related",e));const L=document.querySelector("#before_title[name=before_title]");L&&L.addEventListener("blur",e=>h("before_title",e));const q=document.querySelector("#after_title[name=after_title]");q&&q.addEventListener("blur",e=>h("after_title",e));const C=document.querySelector("#yarpp-show_excerpt[name=show_excerpt]");C&&C.addEventListener("change",e=>h("show_excerpt",e,"checked"));const T=document.querySelector("#excerpt_length[name=excerpt_length]");T&&T.addEventListener("blur",e=>h("excerpt_length",e));const j=document.querySelector("#before_post[name=before_post]");j&&j.addEventListener("blur",e=>h("before_post",e));const z=document.querySelector("#after_post[name=after_post]");function O(e){_.style.width=e+"px",D()}function D(){var e=document.querySelector(".yarpp-preview__iframe__backdrop");e&&(document.querySelector("#yarpp-preview__show-preview-width__value").innerText=e.offsetWidth-20+"px")}z&&z.addEventListener("blur",e=>h("after_post",e)),window.addEventListener("resize",D);const P=document.querySelector("#yarpp-preview-mobile");P&&P.addEventListener("click",e=>O(320));const B=document.querySelector("#yarpp-preview-tablet");B&&B.addEventListener("click",e=>O(768));const I=document.querySelector("#yarpp-preview-desktop");function N(e=null){c.setAttribute("disabled","disabled");var n=p("#yarpp-display-html-preview .yarpp-preview__iframe__container"),s=p("#yarpp-display-code-preview");const r=document.querySelector("#yarpp-display-html-preview div.yarpp-preview__iframe__backdrop");D(),e&&("custom"===e?(y.template=b.value,w.value&&(y.size=w.value)):y.template=e,"thumbnails"===e&&g.value&&(y.size=g.value)),console.log("Rendering Template Preview: ",y),p.ajax({type:"POST",url:ajaxurl,data:{action:"yarpp_display_preview",_ajax_nonce:p("#yarpp_display_preview-nonce").val(),...y},beforeSend:function(){n.html(loading)},success:function(e){const a=JSON.parse(e),i=document.createElement("style");i.appendChild(document.createTextNode(a.styles));const t=document.createElement("iframe");t.width="100%",t.height="100%",t.style="overflow: hidden; user-select: none; outline: 0; background-color: white;",n.html(t),n.prepend(r),t.onload=e=>{const t=e.target.contentWindow.document;t.getElementsByTagName("head")[0].appendChild(i),t.body.innerHTML=a.html,t.body.style="overflow:hidden;"},"codeEditor"in wp?(l(!0),e={...wp.codeEditor.defaultSettings,type:"text/html",codemirror:{...wp.codeEditor.defaultSettings.codemirror,indentUnit:2,tabSize:2,readOnly:!0}},s.html('<textarea id="yarpp-preview-code-textarea">'+a.code+"</textarea>"),wp.codeEditor.initialize(document.getElementById("yarpp-preview-code-textarea"),e),l()):s.html("<pre><code>"+a.code+"</code></pre>"),c.removeAttribute("disabled")},dataType:"html"})}function A(){var e=p(this).find("option:selected"),t=e.closest(".yarpp_form_row");e.attr("data-url")?t.find(".template_author_wrap").toggle(!!e.attr("data-author")).find("span").empty().append("<a>"+e.attr("data-author")+"</a>").attr("href",e.attr("data-url")):t.find(".template_author_wrap").toggle(!!e.attr("data-author")).find("span").text(e.attr("data-author")),t.find(".template_description_wrap").toggle(!!e.attr("data-description")).find("span").text(e.attr("data-description")),t.find(".template_file_wrap").toggle(!!e.attr("data-basename")).find("span").text(e.attr("data-basename"))}I&&I.addEventListener("click",e=>O(1200)),N(),p(".yarpp_template_button:not(.disabled)").click(function(){var e=p(this).attr("data-value");p(this).siblings("input").val(e).change(),p(this).siblings().removeClass("active"),p(this).addClass("active"),p(this).parents("#yarpp_display_web").length&&N(e)}),p("#template_file, #rss_template_file").each(A).change(A);var H=!1;function Q(){var t;p("#optin_data_frame").is(":visible")&&!H&&(H=!0,t=p("#optin_data_frame"),p.ajax({type:"POST",url:ajaxurl,data:{action:"yarpp_optin_data",_ajax_nonce:p("#yarpp_optin_data-nonce").val()},beforeSend:function(){t.html(loading)},success:function(e){t.html("<pre>"+e+"</pre>")},dataType:"html"}))}function R(){setTimeout(Q,0)}function W(){var e=p(".yarpp_form_post_types").is(":has(input[type=checkbox]:checked)");p("#yarpp-auto_display_archive").attr("disabled",!e),e||p("#yarpp-auto_display_archive").prop("checked",!1)}function X(e,t){e?(p(".yarpp_form_post_types #yarpp_post_type_"+t).prop("disabled",!1),p(".yarpp_form_post_types #yarpp_post_type_"+t).siblings().hide()):(p(".yarpp_form_post_types #yarpp_post_type_"+t).prop("disabled",!0),p(".yarpp_form_post_types #yarpp_post_type_"+t).siblings().show())}p("#yarpp-optin-learnmore, a[aria-controls=tab-panel-optin]").bind("click focus",R),R(),p(".sync_no_results, .sync_rss_no_results").change(function(){var e=p(this).find("input").attr("value");p(this).hasClass("sync_no_results")&&p(".sync_no_results input").attr("value",e),p(this).hasClass("sync_rss_no_results")&&p(".sync_rss_no_results input").attr("value",e)}),p(".yarpp_form_post_types input[type=checkbox]").change(W),W(),p("#yarpp_fulltext_expand").click(function(e){e.preventDefault();e=p("#yarpp_fulltext_details");e.slideToggle(),e.hasClass("hidden")?(e.removeClass("hidden"),p(this).text("Hide Details [-]")):(e.addClass("hidden"),p(this).text("Show Details [+]"))}),p(".include_post_type input[type=checkbox]").change(function(e){var t=p(this).attr("data-post-type");p("#yarpp-same_post_type").is(":checked")?X(p(this).is(":checked"),t):p(".yarpp_form_post_types #yarpp_post_type_"+t).prop("disabled",!1)}),p("#yarpp-same_post_type").change(function(e){p(this).is(":checked")?p(".include_post_type input[type=checkbox]").each(function(){var e=p(this).attr("data-post-type");X(p(this).is(":checked"),e)}):(p(".yarpp_form_post_types input[type=checkbox]").prop("disabled",!1),p(".yarpp_form_post_types input[type=checkbox]").siblings().hide())});var J=p('\t\t\t<div id="shareaholic-deactivate-dialog" class="shareaholic-deactivate-dialog" data-remodal-id="">\t\t\t\t<div class="shareaholic-deactivate-header" style="background-image: url('+yarpp_messages.logo+"); background-color: "+yarpp_messages.bgcolor+';"><div class="shareaholic-deactivate-text"><h2>'+yarpp_messages.model_title+'</h2></div></div>\t\t\t\t<div class="shareaholic-deactivate-body">\t\t\t\t\t<div class="shareaholic-deactivate-body-foreword">'+yarpp_messages.alert_message+'</div>\t\t\t\t\t<div class="shareaholic-deactivate-dialog-footer"> <input type="submit" class="button confirm button-secondary" id="yarpp-clear-cache-submit" value="Delete"/>\t\t\t\t\t\t<button data-remodal-action="cancel" class="button button-secondary">Cancel</button>\t\t\t\t\t\t</div>\t\t\t\t</div>\t\t\t</div>\t\t')[0];p("#yarpp-clear-cache").click(function(){p(J).remodal({hashTracking:!1,closeOnOutsideClick:!1}).open(),event.preventDefault()}),p(document.body).on("click","#yarpp-clear-cache-submit",function(){p(J).remodal().close();var a="#yarpp-clear-cache",i="#display_notices",n="notice notice-error is-dismissible";p(a).prop("disabled",!0),p.ajax({type:"POST",url:ajaxurl,data:{action:"yarpp_clear_cache",_ajax_nonce:p("#clear_cache-nonce").val()},beforeSend:function(){p(a).siblings(".spinner").addClass("is-active")},success:function(e){var t;p(a).siblings(".spinner").removeClass("is-active"),p(i).show(),"success"==e?(t=yarpp_messages.success,n="notice notice-success is-dismissible",p(a).prop("disabled",!1)):t="forbidden"==e?yarpp_messages.forbidden:"nonce_fail"==e?yarpp_messages.nonce_fail:yarpp_messages.error,p(i).addClass(n),p(i).html("<p>"+t+"</p>")},error:function(e){p(i).show(),p(i).addClass(n),p(a).siblings(".spinner").removeClass("is-active"),p(i).html("<p>"+yarpp_messages.error+"</p>")}}),p(i).delay(5e3).fadeOut(1e3)})});
|
readme.txt
CHANGED
@@ -6,7 +6,7 @@ Requires at least: 3.7
|
|
6 |
Requires PHP: 5.3
|
7 |
License: GPLv2 or later
|
8 |
Tested up to: 5.8
|
9 |
-
Stable tag: 5.27.
|
10 |
|
11 |
The best WordPress plugin for displaying related posts. Simple and flexible, with a powerful proven algorithm and inbuilt caching.
|
12 |
|
@@ -535,11 +535,19 @@ Beginning with version 4.0.7, YARPP includes clean uninstall functionality. If y
|
|
535 |
|
536 |
|
537 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
538 |
= 5.27.5 (15-September-2021) =
|
539 |
* New: Add support for "show_sticky_posts" and "generate_missing_thumbnails" to the [yarpp_related() function](https://wordpress.org/plugins/yet-another-related-posts-plugin/#installation)
|
540 |
* New: Add support for "recent" in [YARPP shortcode](https://wordpress.org/plugins/yet-another-related-posts-plugin/#installation)
|
541 |
+ For example, to limit results to those published in the past 12 months: `[yarpp recent="12 month"]`
|
542 |
-
* Enhancement:
|
543 |
|
544 |
= 5.27.4 (25-August-2021) =
|
545 |
* [Bugfix](https://wordpress.org/support/topic/php-8-deprecated-required-parameter-follows-optional/): PHP 8 compatibility by making `$args` optional on `YARPP::get_template_content()`
|
@@ -1428,5 +1436,5 @@ After a break of many years, the plugin is 100% supported now that the baton has
|
|
1428 |
* Initial upload
|
1429 |
|
1430 |
== Upgrade Notice ==
|
1431 |
-
= 5.27.
|
1432 |
We update this plugin regularly so we can make it better for you. Update to the latest version for all of the available features and improvements. Thank you for using YARPP!
|
6 |
Requires PHP: 5.3
|
7 |
License: GPLv2 or later
|
8 |
Tested up to: 5.8
|
9 |
+
Stable tag: 5.27.6
|
10 |
|
11 |
The best WordPress plugin for displaying related posts. Simple and flexible, with a powerful proven algorithm and inbuilt caching.
|
12 |
|
535 |
|
536 |
|
537 |
== Changelog ==
|
538 |
+
= 5.27.6 (12-October-2021) =
|
539 |
+
* Bugfix: Support for drop-in caches. Resolves `Undefined variable: found` warnings.
|
540 |
+
* Bugfix: Add missing string for translations
|
541 |
+
* Bugfix: Workaround for [WordPress ca-bundle.crt issue](https://core.trac.wordpress.org/ticket/54207)
|
542 |
+
* Bugfix: Properly update the template preview in YARPP's admin console when Thumbnail size selection is updated
|
543 |
+
* Bugfix: Use dummy example thumbnail in previews
|
544 |
+
* Enhancement: For RSS Feed Display Options use dropdown select for thumbnail sizes instead of radio buttons
|
545 |
+
|
546 |
= 5.27.5 (15-September-2021) =
|
547 |
* New: Add support for "show_sticky_posts" and "generate_missing_thumbnails" to the [yarpp_related() function](https://wordpress.org/plugins/yet-another-related-posts-plugin/#installation)
|
548 |
* New: Add support for "recent" in [YARPP shortcode](https://wordpress.org/plugins/yet-another-related-posts-plugin/#installation)
|
549 |
+ For example, to limit results to those published in the past 12 months: `[yarpp recent="12 month"]`
|
550 |
+
* Enhancement: For Automatic Display Options use dropdown select for thumbnail sizes instead of radio buttons
|
551 |
|
552 |
= 5.27.4 (25-August-2021) =
|
553 |
* [Bugfix](https://wordpress.org/support/topic/php-8-deprecated-required-parameter-follows-optional/): PHP 8 compatibility by making `$args` optional on `YARPP::get_template_content()`
|
1436 |
* Initial upload
|
1437 |
|
1438 |
== Upgrade Notice ==
|
1439 |
+
= 5.27.6 =
|
1440 |
We update this plugin regularly so we can make it better for you. Update to the latest version for all of the available features and improvements. Thank you for using YARPP!
|
src/css/public/options_basic.css
CHANGED
@@ -183,8 +183,8 @@ a.yarpp_help:hover {
|
|
183 |
}
|
184 |
|
185 |
.yarpp_form_select > div {
|
186 |
-
padding-top:
|
187 |
-
padding-bottom:
|
188 |
}
|
189 |
|
190 |
.yarpp_form_select + .yarpp_form_select {
|
183 |
}
|
184 |
|
185 |
.yarpp_form_select > div {
|
186 |
+
padding-top: 0.1em;
|
187 |
+
padding-bottom: 0.1em;
|
188 |
}
|
189 |
|
190 |
.yarpp_form_select + .yarpp_form_select {
|
src/js/options_basic.js
CHANGED
@@ -300,22 +300,22 @@ jQuery(function ($) {
|
|
300 |
);
|
301 |
}
|
302 |
|
303 |
-
const
|
304 |
-
'
|
305 |
);
|
306 |
-
if (
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
}
|
311 |
|
312 |
-
const
|
313 |
-
'
|
314 |
);
|
315 |
-
if (
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
}
|
320 |
|
321 |
const thumbnails_heading_input = document.querySelector(
|
@@ -450,38 +450,30 @@ jQuery(function ($) {
|
|
450 |
'#yarpp-display-html-preview div.yarpp-preview__iframe__backdrop',
|
451 |
);
|
452 |
|
|
|
453 |
update_preview_width_ui();
|
454 |
|
455 |
if (template) {
|
456 |
// if the template is custom, checks the custom select template and changes it
|
457 |
if (template === 'custom') {
|
458 |
preview_body.template = custom_template_select.value;
|
459 |
-
let checked_value = null;
|
460 |
|
461 |
-
|
462 |
-
|
463 |
-
checked_value = rb.value;
|
464 |
-
}
|
465 |
-
});
|
466 |
-
if (checked_value) {
|
467 |
-
preview_body.size = checked_value;
|
468 |
}
|
469 |
} else {
|
470 |
preview_body.template = template;
|
471 |
}
|
472 |
|
473 |
if (template === 'thumbnails') {
|
474 |
-
|
475 |
-
|
476 |
-
checked_value = rb.value;
|
477 |
-
}
|
478 |
-
});
|
479 |
-
if (checked_value) {
|
480 |
-
preview_body.size = checked_value;
|
481 |
}
|
482 |
}
|
483 |
}
|
484 |
|
|
|
|
|
485 |
$.ajax({
|
486 |
type: 'POST',
|
487 |
url: ajaxurl,
|
300 |
);
|
301 |
}
|
302 |
|
303 |
+
const thumbnails_template_size_select = document.querySelector(
|
304 |
+
'#thumbnail_size_display[name=thumbnail_size_display]',
|
305 |
);
|
306 |
+
if (thumbnails_template_size_select) {
|
307 |
+
thumbnails_template_size_select.addEventListener('change', (e) =>
|
308 |
+
handle_change('size', e),
|
309 |
+
);
|
310 |
}
|
311 |
|
312 |
+
const custom_template_size_select = document.querySelector(
|
313 |
+
'#custom_theme_thumbnail_size_display[name=custom_theme_thumbnail_size_display]',
|
314 |
);
|
315 |
+
if (custom_template_size_select) {
|
316 |
+
custom_template_size_select.addEventListener('change', (e) =>
|
317 |
+
handle_change('size', e),
|
318 |
+
);
|
319 |
}
|
320 |
|
321 |
const thumbnails_heading_input = document.querySelector(
|
450 |
'#yarpp-display-html-preview div.yarpp-preview__iframe__backdrop',
|
451 |
);
|
452 |
|
453 |
+
// displays preview width in ui
|
454 |
update_preview_width_ui();
|
455 |
|
456 |
if (template) {
|
457 |
// if the template is custom, checks the custom select template and changes it
|
458 |
if (template === 'custom') {
|
459 |
preview_body.template = custom_template_select.value;
|
|
|
460 |
|
461 |
+
if (custom_template_size_select.value) {
|
462 |
+
preview_body.size = custom_template_size_select.value;
|
|
|
|
|
|
|
|
|
|
|
463 |
}
|
464 |
} else {
|
465 |
preview_body.template = template;
|
466 |
}
|
467 |
|
468 |
if (template === 'thumbnails') {
|
469 |
+
if (thumbnails_template_size_select.value) {
|
470 |
+
preview_body.size = thumbnails_template_size_select.value;
|
|
|
|
|
|
|
|
|
|
|
471 |
}
|
472 |
}
|
473 |
}
|
474 |
|
475 |
+
console.log('Rendering Template Preview: ', preview_body);
|
476 |
+
|
477 |
$.ajax({
|
478 |
type: 'POST',
|
479 |
url: ajaxurl,
|
style/options_basic.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
#yarpp_author_text{width:900px}.yarpp-red{color:#dc3232}.yarpp-no-float{float:none;margin-bottom:5px}.form-table td{line-height:11px}ul.yarpp_contacts li{line-height:22px;padding:0 0 0 30px}body.rtl ul.yarpp_contacts li{padding:0 30px 0 0}ul.yarpp_contacts li a img{vertical-align:bottom}.postbox .wp-pointer-buttons{display:none}#tab-panel-dev,#tab-panel-faq{direction:ltr}.icon{background-image:url(../images/sprites.png);height:22px;margin-left:-29px;margin-top:-1px;position:absolute;width:22px}body.rtl .icon{margin-left:none;margin-right:-29px}@media only screen and (-webkit-min-device-pixel-ratio:1.5){.icon{background-image:url(../images/sprites-2x.png);background-size:132px 22px}}.icon-wordpress{background-position:0 0}.icon-twitter{background-position:-22px 0}.icon-plugin{background-position:-44px 0}.icon-star{background-position:-66px 0}.icon-pro{background-position:-88px 0}.icon-facebook{background-position:-110px 0}.icon-star:hover,.icon.spin{animation:yarpp-spin 3s ease 2s 1 normal none;-o-animation:yarpp-spin 3s ease 2s 1 normal none;-webkit-animation:yarpp-spin 3s ease 2s 1 normal none;-moz-animation:yarpp-spin 3s ease 2s 1 normal none;transform-origin:11px 12px;-o-transform-origin:11px 12px;-webkit-transform-origin:11px 12px;-moz-transform-origin:11px 12px;z-index:1}@keyframes yarpp-spin{0%{transform:rotate(0deg) scale(1)}5%{transform:rotate(0deg) scale(1.5)}to{transform:rotate(1turn) scale(1)}}@-webkit-keyframes yarpp-spin{0%{-webkit-transform:rotate(0deg) scale(1)}5%{-webkit-transform:rotate(0deg) scale(1.5)}to{-webkit-transform:rotate(1turn) scale(1)}}a.info{position:relative;z-index:24}.yarpp_help .wp-pointer-content p{font-family:sans-serif;text-align:left}a.yarpp_help{cursor:pointer;text-decoration:none}a.yarpp_help:hover{background-position:-520px 0;text-decoration:none}.exclude_terms span{display:inline-block}#yarpp_display_optin.yarpp_attention{border:2px solid #bbb}.yarpp_subbox{background:#fdfdfd;margin-bottom:5px}.yarpp_form_row{overflow:visible;padding:8px}.yarpp_form_row>div{display:inline-block;vertical-align:top}.yarpp_form_row>div>label{vertical-align:baseline}.yarpp_form_select>div{padding-bottom
|
1 |
+
#yarpp_author_text{width:900px}.yarpp-red{color:#dc3232}.yarpp-no-float{float:none;margin-bottom:5px}.form-table td{line-height:11px}ul.yarpp_contacts li{line-height:22px;padding:0 0 0 30px}body.rtl ul.yarpp_contacts li{padding:0 30px 0 0}ul.yarpp_contacts li a img{vertical-align:bottom}.postbox .wp-pointer-buttons{display:none}#tab-panel-dev,#tab-panel-faq{direction:ltr}.icon{background-image:url(../images/sprites.png);height:22px;margin-left:-29px;margin-top:-1px;position:absolute;width:22px}body.rtl .icon{margin-left:none;margin-right:-29px}@media only screen and (-webkit-min-device-pixel-ratio:1.5){.icon{background-image:url(../images/sprites-2x.png);background-size:132px 22px}}.icon-wordpress{background-position:0 0}.icon-twitter{background-position:-22px 0}.icon-plugin{background-position:-44px 0}.icon-star{background-position:-66px 0}.icon-pro{background-position:-88px 0}.icon-facebook{background-position:-110px 0}.icon-star:hover,.icon.spin{animation:yarpp-spin 3s ease 2s 1 normal none;-o-animation:yarpp-spin 3s ease 2s 1 normal none;-webkit-animation:yarpp-spin 3s ease 2s 1 normal none;-moz-animation:yarpp-spin 3s ease 2s 1 normal none;transform-origin:11px 12px;-o-transform-origin:11px 12px;-webkit-transform-origin:11px 12px;-moz-transform-origin:11px 12px;z-index:1}@keyframes yarpp-spin{0%{transform:rotate(0deg) scale(1)}5%{transform:rotate(0deg) scale(1.5)}to{transform:rotate(1turn) scale(1)}}@-webkit-keyframes yarpp-spin{0%{-webkit-transform:rotate(0deg) scale(1)}5%{-webkit-transform:rotate(0deg) scale(1.5)}to{-webkit-transform:rotate(1turn) scale(1)}}a.info{position:relative;z-index:24}.yarpp_help .wp-pointer-content p{font-family:sans-serif;text-align:left}a.yarpp_help{cursor:pointer;text-decoration:none}a.yarpp_help:hover{background-position:-520px 0;text-decoration:none}.exclude_terms span{display:inline-block}#yarpp_display_optin.yarpp_attention{border:2px solid #bbb}.yarpp_subbox{background:#fdfdfd;margin-bottom:5px}.yarpp_form_row{overflow:visible;padding:8px}.yarpp_form_row>div{display:inline-block;vertical-align:top}.yarpp_form_row>div>label{vertical-align:baseline}.yarpp_form_select>div{padding-bottom:.1em;padding-top:.1em}.yarpp_form_select+.yarpp_form_select{padding-top:0}.yarpp_form_label{width:25%}.yarpp_form_label+div{padding-left:16px;width:70%}.yarpp_form_select>.yarpp_form_label{padding-top:8px}.yarpp_form_post_types label{display:inline-block;line-height:20px;padding-right:15px}body.rtl .yarpp_form_post_types label{padding-left:15px;padding-right:inherit}.yarpp_form_exclude label{line-height:15px;padding-right:5px}body.rtl .yarpp_form_exclude label{padding-left:5px;padding-right:inherit}.yarpp_form_template_file>.yarpp_form_label{padding-top:5px;vertical-align:top}.yarpp_code_display{border-left:8px solid transparent;float:right;width:50%}body.rtl .yarpp_code_display{float:left}.yarpp_code_display div{max-height:300px;overflow:auto}.yarpp_code_display pre{direction:ltr}.yarpp_scroll_wrapper{max-height:100px;min-height:25px;overflow:auto;vertical-align:middle;width:60%}@media (max-width:1200px){.yarpp_scroll_wrapper{width:50%}.yarpp_code_display{max-width:60%}}#yarpp-optin-learnmore{float:right}body.rtl #yarpp-optin-learnmore{float:left}.template_author_wrap,.template_description_wrap,.template_file_wrap{margin:3px 0}.template_file_wrap{font-family:monospace}.yarpp_subbox input[type=text]{font-family:monospace;width:35%}.yarpp_form_template_buttons{padding:0}.yarpp_template_button{background:#f3f3f3;background-image:linear-gradient(180deg,#fefefe,#f4f4f4);border:1px solid #aaa;border-radius:7px;box-shadow:1px 1px 7px 1px #bbb;color:#333;cursor:pointer;height:60px;margin:10px 5px 20px 10px;padding:8px;position:relative;text-shadow:0 1px 0 #fff;width:70px}.yarpp_template_button.disabled,.yarpp_template_button.disabled:active,.yarpp_template_button.disabled:hover{background:#f3f3f3;background-image:linear-gradient(180deg,#fefefe,#f4f4f4);border-color:#ddd;box-shadow:none}.yarpp_template_button.disabled>div.label{color:#bbb}.yarpp_template_button:hover{border-color:#999;color:#222}.yarpp_template_button.active,.yarpp_template_button:active{background:#eee;background-image:linear-gradient(180deg,#eee,#f4f4f4);border-color:#999;box-shadow:inset 0 2px 8px -2px rgba(0,0,0,.5);text-shadow:0 -1px 0 #fff}.yarpp_template_button>div.label{bottom:8px;position:absolute;text-align:center;width:70px}.yarpp_template_button>div.image{background-image:url(../images/template-buttons-2x.png);background-size:210px 40px;height:40px;opacity:.8;width:70px}.yarpp_template_button.disabled>div.image{opacity:.2}.yarpp_template_button:active>div.image{opacity:1}.yarpp_template_button[data-value=builtin]>div.image{background-position:0 0}.yarpp_template_button[data-value=thumbnails]>div.image{background-position:-70px 0}.yarpp_template_button[data-value=custom]>div.image{background-position:-140px 0}#optin_data_frame{direction:ltr;max-height:300px;overflow:scroll}#yarpp_extra_screen_settings{border-top:1px solid #e0e0e0}.help-tab-content{max-height:500px;overflow:auto;width:100%}.yarpp_red{color:red;font-weight:700}.yarpp_separated{display:inline-block;margin:1.5em 1em}.yarpp-callout{border:1px solid #ccd0d4;border-left-width:4px;margin:5px 0 15px;padding:1px 12px}.yarpp-notice{border-left-color:#ffb900}.yarpp-disabled{background:#f6f7f7!important;border-color:#dcdcde!important;box-shadow:none!important;color:#a7aaad!important;cursor:not-allowed!important;text-shadow:none!important}.yarpp-preview__wrapper{align-items:center;display:flex;flex-direction:column;position:relative}.yarpp-preview__title{align-self:flex-start}#yarpp-display-html-preview{display:grid;grid-template-columns:100%;grid-template-rows:1fr auto;height:660px;position:relative}#yarpp-display-code-preview,#yarpp-display-html-preview{background-color:#fafafa;border:1px solid #e4e4e7;width:100%}#yarpp-display-code-preview{border-top:none}#yarpp-display-code-preview pre code{background-color:#fafafa;display:block;font-size:.9em;max-height:320px;overflow-y:auto;padding:16px;white-space:pre-wrap}.yarpp-preview__wrapper .yarpp-preview__iframe__container{border:12px solid #374151;border-radius:12px;height:calc(100% - 72px);margin:36px auto;max-width:calc(100% - 60px);min-width:320px;padding-right:20px;position:relative}.yarpp-preview__wrapper .yarpp-preview__iframe__backdrop{cursor:col-resize;height:100%;left:50%;outline:0;position:absolute;right:0;top:50%;transform:translate(-50%,-50%);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:100%}.yarpp-preview__wrapper .yarpp-preview__iframe__container:after{align-items:center;background-color:#f3f4f6;border-left:1px solid #d1d5db;content:url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor"><path d="M8 5a1 1 0 100 2h5.586l-1.293 1.293a1 1 0 001.414 1.414l3-3a1 1 0 000-1.414l-3-3a1 1 0 10-1.414 1.414L13.586 5H8zM12 15a1 1 0 100-2H6.414l1.293-1.293a1 1 0 10-1.414-1.414l-3 3a1 1 0 000 1.414l3 3a1 1 0 001.414-1.414L6.414 15H12z" /></svg>');cursor:col-resize;display:flex;height:100%;position:absolute;right:0;top:0;width:20px}.yarpp-preview__wrapper .yarpp-preview__dragger{background-color:red;height:100%;width:20px}.yarpp-preview__media__controls{align-content:center;align-items:center;border-bottom:1px solid #e4e4e7;-moz-column-gap:1rem;column-gap:1rem;display:none;grid-template-columns:repeat(auto-fit,160px);height:100px;justify-content:center;row-gap:1rem;width:100%}.yarpp-preview__show-code{align-items:center;display:grid;height:64px;justify-items:flex-start;margin-left:1rem}.yarpp-preview__show-preview-width{text-align:center}#yarpp-preview-desktop{display:none}@media screen and (min-width:767px){.yarpp-preview__media__controls{display:grid}#yarpp-display-html-preview{grid-template-rows:auto 1fr auto}}@media screen and (min-width:1200px){.yarpp-preview__media__controls{display:grid;height:64px}#yarpp-preview-desktop{display:block}#yarpp-display-html-preview{grid-template-rows:auto 1fr auto;height:720px}}
|
yarpp.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
Plugin Name: Yet Another Related Posts Plugin (YARPP)
|
4 |
Description: Adds related posts to your site and in RSS feeds, based on a powerful, customizable algorithm.
|
5 |
-
Version: 5.27.
|
6 |
Author: YARPP
|
7 |
Author URI: https://yarpp.com/
|
8 |
Plugin URI: https://yarpp.com/
|
@@ -25,7 +25,7 @@ if ( ! defined( 'WP_CONTENT_DIR' ) ) {
|
|
25 |
define( 'WP_CONTENT_DIR', substr( $tr, 0, strrpos( $tr, '/' ) ) );
|
26 |
}
|
27 |
|
28 |
-
define( 'YARPP_VERSION', '5.27.
|
29 |
|
30 |
define( 'YARPP_DIR', dirname( __FILE__ ) );
|
31 |
/**
|
2 |
/*
|
3 |
Plugin Name: Yet Another Related Posts Plugin (YARPP)
|
4 |
Description: Adds related posts to your site and in RSS feeds, based on a powerful, customizable algorithm.
|
5 |
+
Version: 5.27.6
|
6 |
Author: YARPP
|
7 |
Author URI: https://yarpp.com/
|
8 |
Plugin URI: https://yarpp.com/
|
25 |
define( 'WP_CONTENT_DIR', substr( $tr, 0, strrpos( $tr, '/' ) ) );
|
26 |
}
|
27 |
|
28 |
+
define( 'YARPP_VERSION', '5.27.6' );
|
29 |
|
30 |
define( 'YARPP_DIR', dirname( __FILE__ ) );
|
31 |
/**
|