Yet Another Related Posts Plugin (YARPP) - Version 5.22.0

Version Description

(24-May-2021) = * New: Choose the exact post types to include in "The Pool" * New: Ability to specify built-in YARPP templates in the YARPP shortcode. You may use more than one YARPP shortcode in a given post or template and each can have a different templates specified. For example: + [yarpp template="yarpp-template-simple"] // where yarpp-template-simple.php is the file name of the custom YARPP template in your active theme folder + [yarpp template="list"] // built-in "List" template + [yarpp template="thumbnails"] // built-in "Thumbnails" template * Enhancement: YARPP Automatic Placement, YARPP Shortcode, YARPP Block, YARPP Widget and RSS output are all now wrapped in a div with classes yarpp, yarpp-related and yarpp-template-TEMPLATE-NAME to facilitate easier CSS customizations * Enhancement: All admin CSS is now minified

Download this release

Release Info

Developer jeffparker
Plugin Icon 128x128 Yet Another Related Posts Plugin (YARPP)
Version 5.22.0
Comparing to
See all releases

Code changes from version 5.21.0 to 5.22.0

classes/YARPP_Admin.php CHANGED
@@ -518,7 +518,7 @@ class YARPP_Admin {
518
  $screen = get_current_screen();
519
  if (!is_null($screen) && $screen->id === 'settings_page_yarpp') {
520
  wp_enqueue_style('yarpp_switch_options', plugins_url('style/options_switch.css', dirname(__FILE__)), array(), $version );
521
- wp_enqueue_script('yarpp_switch_options', yarpp_get_file_url_for_environment('js/options_switch.min.js', 'js/options_switch.js'), array('jquery'), $version );
522
 
523
  wp_enqueue_style('wp-pointer');
524
  wp_enqueue_style('yarpp_options', plugins_url('style/options_basic.css', dirname(__FILE__)), array(), $version );
@@ -529,7 +529,7 @@ class YARPP_Admin {
529
  wp_enqueue_script('postbox');
530
  wp_enqueue_script('wp-pointer');
531
  wp_enqueue_script('yarpp_remodal', plugins_url('lib/plugin-deactivation-survey/remodal.min.js', dirname(__FILE__)), array(), $version );
532
- wp_enqueue_script('yarpp_options', yarpp_get_file_url_for_environment('js/options_basic.min.js', 'js/options_basic.js'), array('jquery'), $version );
533
  // Localize the script with messages
534
  $translation_strings = array(
535
  'alert_message' => __( 'This will clear all of YARPP’s cached related results.<br> Are you sure?', 'yarpp' ),
@@ -546,7 +546,7 @@ class YARPP_Admin {
546
 
547
  $metabox_post_types = $this->core->get_option('auto_display_post_types');
548
  if (!is_null($screen) && ($screen->id == 'post' || in_array( $screen->id, $metabox_post_types))) {
549
- wp_enqueue_script('yarpp_metabox', plugins_url('js/metabox.js', dirname(__FILE__)), array('jquery'), $version );
550
  }
551
  }
552
 
518
  $screen = get_current_screen();
519
  if (!is_null($screen) && $screen->id === 'settings_page_yarpp') {
520
  wp_enqueue_style('yarpp_switch_options', plugins_url('style/options_switch.css', dirname(__FILE__)), array(), $version );
521
+ wp_enqueue_script('yarpp_switch_options', yarpp_get_file_url_for_environment('js/options_switch.min.js', 'src/js/options_switch.js'), array('jquery'), $version );
522
 
523
  wp_enqueue_style('wp-pointer');
524
  wp_enqueue_style('yarpp_options', plugins_url('style/options_basic.css', dirname(__FILE__)), array(), $version );
529
  wp_enqueue_script('postbox');
530
  wp_enqueue_script('wp-pointer');
531
  wp_enqueue_script('yarpp_remodal', plugins_url('lib/plugin-deactivation-survey/remodal.min.js', dirname(__FILE__)), array(), $version );
532
+ wp_enqueue_script('yarpp_options', yarpp_get_file_url_for_environment('js/options_basic.min.js', 'src/js/options_basic.js'), array('jquery'), $version );
533
  // Localize the script with messages
534
  $translation_strings = array(
535
  'alert_message' => __( 'This will clear all of YARPP’s cached related results.<br> Are you sure?', 'yarpp' ),
546
 
547
  $metabox_post_types = $this->core->get_option('auto_display_post_types');
548
  if (!is_null($screen) && ($screen->id == 'post' || in_array( $screen->id, $metabox_post_types))) {
549
+ wp_enqueue_script('yarpp_metabox', yarpp_get_file_url_for_environment('js/metabox.min.js', 'src/js/metabox.js'), array('jquery'), $version );
550
  }
551
  }
552
 
classes/YARPP_Block.php CHANGED
@@ -95,7 +95,7 @@ if ( ! class_exists( 'YARPP_Block', false ) && function_exists( 'register_block_
95
  // automatically load dependencies and version.
96
  wp_register_script( // phpcs:ignore WordPress.WP.EnqueuedResourceParameters.NotInFooter
97
  'yarpp-block',
98
- yarpp_get_file_url_for_environment( 'js/block.min.js', 'js/block.js' ),
99
  array(
100
  'wp-blocks',
101
  'wp-i18n',
95
  // automatically load dependencies and version.
96
  wp_register_script( // phpcs:ignore WordPress.WP.EnqueuedResourceParameters.NotInFooter
97
  'yarpp-block',
98
+ yarpp_get_file_url_for_environment( 'js/block.min.js', 'src/js/block.js' ),
99
  array(
100
  'wp-blocks',
101
  'wp-i18n',
classes/YARPP_Core.php CHANGED
@@ -202,6 +202,7 @@ class YARPP {
202
  'rss_promote_yarpp' => false,
203
  'myisam_override' => false,
204
  'exclude' => '',
 
205
  'weight' => array(
206
  'title' => 0,
207
  'body' => 0,
@@ -246,7 +247,7 @@ class YARPP {
246
  $this->db_options->set_yarpp_options($new_options);
247
 
248
  // new in 3.1: clear cache when updating certain settings.
249
- $clear_cache_options = array('show_pass_post' => 1, 'recent' => 1, 'threshold' => 1, 'past_only' => 1, 'include_sticky_posts' => 1);
250
 
251
  $relevant_options = array_intersect_key($options, $clear_cache_options);
252
  $relevant_current_options = array_intersect_key($current_options, $clear_cache_options);
@@ -257,6 +258,7 @@ class YARPP {
257
  || ($new_options['weight'] != $current_options['weight'])
258
  || ($new_options['exclude'] != $current_options['exclude'])
259
  || ($new_options['require_tax'] != $current_options['require_tax'])
 
260
  ) {
261
  $this->cache->flush();
262
  }
@@ -985,9 +987,19 @@ class YARPP {
985
  * @return string[]
986
  */
987
  public function get_query_post_types($reference_ID = null, $args = array()){
 
 
988
  if(isset($args['post_type'])){
989
  $post_types = (array)$args['post_type'];
990
- } else if ($this->get_option('cross_relate')) {
 
 
 
 
 
 
 
 
991
  $post_types = $this->get_post_types();
992
  } else {
993
  $post_types = array(get_post_type($reference_ID));
@@ -1053,7 +1065,8 @@ class YARPP {
1053
  'rss_excerpt_length', 'past_only', 'show_excerpt', 'rss_show_excerpt',
1054
  'template', 'rss_template', 'show_pass_post', 'cross_relate', 'generate_missing_thumbnails', 'include_sticky_posts',
1055
  'rss_display', 'rss_excerpt_display', 'promote_yarpp', 'rss_promote_yarpp',
1056
- 'myisam_override', 'weight', 'require_tax', 'auto_display_archive', 'exclude'
 
1057
  ));
1058
 
1059
  $check_changed = array(
@@ -1293,17 +1306,37 @@ class YARPP {
1293
 
1294
  $related_query = $wp_query; // backwards compatibility
1295
  $related_count = $related_query->post_count;
1296
-
1297
- $output .= "<div class='";
1298
- if ($domain === 'website') {
1299
- $output .= "yarpp-related";
1300
- } else {
1301
- $output .= "yarpp-related-{$domain}";
 
1302
  }
1303
-
 
1304
  if ($related_count < 1) {
1305
  $output .= " yarpp-related-none";
1306
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1307
 
1308
  $output .= "'>\n";
1309
 
@@ -1314,11 +1347,12 @@ class YARPP {
1314
  // avoid any monkeying around where someone could trya custom template like a template name like
1315
  // "yarpp-template-;../../wp-config.php". YARPP custom templates are only supported in the theme's root folder.
1316
  $template = str_replace('/', '', $template);
1317
-
1318
  if ($domain === 'metabox') {
1319
  include(YARPP_DIR.'/includes/template_metabox.php');
1320
  } else if ((bool) $template && $template === 'thumbnails') {
1321
  include(YARPP_DIR.'/includes/template_thumbnails.php');
 
 
1322
  } else if ((bool) $template) {
1323
  $named_properly = strpos($template,'yarpp-template-') === 0;
1324
  $template_exists = file_exists(STYLESHEETPATH.'/'.$template);
@@ -1499,7 +1533,7 @@ class YARPP {
1499
  if ($domain === 'website') {
1500
  $output .= "yarpp-related";
1501
  } else {
1502
- $output .= "yarpp-related-{$domain}";
1503
  }
1504
  $output .= "'>\n";
1505
 
202
  'rss_promote_yarpp' => false,
203
  'myisam_override' => false,
204
  'exclude' => '',
205
+ 'include_post_type' => get_post_types( array() ),
206
  'weight' => array(
207
  'title' => 0,
208
  'body' => 0,
247
  $this->db_options->set_yarpp_options($new_options);
248
 
249
  // new in 3.1: clear cache when updating certain settings.
250
+ $clear_cache_options = array('show_pass_post' => 1, 'recent' => 1, 'threshold' => 1, 'past_only' => 1, 'include_sticky_posts' => 1, 'cross_relate' => 1);
251
 
252
  $relevant_options = array_intersect_key($options, $clear_cache_options);
253
  $relevant_current_options = array_intersect_key($current_options, $clear_cache_options);
258
  || ($new_options['weight'] != $current_options['weight'])
259
  || ($new_options['exclude'] != $current_options['exclude'])
260
  || ($new_options['require_tax'] != $current_options['require_tax'])
261
+ || ($new_options['include_post_type'] != $current_options['include_post_type'])
262
  ) {
263
  $this->cache->flush();
264
  }
987
  * @return string[]
988
  */
989
  public function get_query_post_types($reference_ID = null, $args = array()){
990
+ $include_post_type = yarpp_get_option( 'include_post_type' );
991
+ $include_post_type = wp_parse_list( $include_post_type );
992
  if(isset($args['post_type'])){
993
  $post_types = (array)$args['post_type'];
994
+ } else if ( ! $this->get_option('cross_relate') ) {
995
+ $current_post_type = get_post_type( $reference_ID );
996
+ $post_types = array( $current_post_type );
997
+ if ( ! in_array( $current_post_type, $include_post_type) ) {
998
+ $post_types = array('');
999
+ }
1000
+ }else if ( ! empty( $include_post_type ) ) {
1001
+ $post_types = $include_post_type;
1002
+ }else if ( $this->get_option('cross_relate') ) {
1003
  $post_types = $this->get_post_types();
1004
  } else {
1005
  $post_types = array(get_post_type($reference_ID));
1065
  'rss_excerpt_length', 'past_only', 'show_excerpt', 'rss_show_excerpt',
1066
  'template', 'rss_template', 'show_pass_post', 'cross_relate', 'generate_missing_thumbnails', 'include_sticky_posts',
1067
  'rss_display', 'rss_excerpt_display', 'promote_yarpp', 'rss_promote_yarpp',
1068
+ 'myisam_override', 'weight', 'require_tax', 'auto_display_archive', 'exclude',
1069
+ 'include_post_type'
1070
  ));
1071
 
1072
  $check_changed = array(
1306
 
1307
  $related_query = $wp_query; // backwards compatibility
1308
  $related_count = $related_query->post_count;
1309
+
1310
+ // CSS class "yarpp-related" exists for backwards compatibility in-case older custom themes are dependent on it
1311
+ $output .= "<div class='yarpp yarpp-related";
1312
+
1313
+ // Add CSS class to identify domain
1314
+ if (isset($domain) && $domain) {
1315
+ $output .= " yarpp-related-{$domain}";
1316
  }
1317
+
1318
+ // Add CSS class to identify no results
1319
  if ($related_count < 1) {
1320
  $output .= " yarpp-related-none";
1321
  }
1322
+
1323
+ // Add CSS class to identify template
1324
+ if (isset($template) && $template) {
1325
+ // Normalize "thumbnail" and "thumbnails" to reference the same inbuilt template
1326
+ if ($template === "thumbnail") {
1327
+ $template = "thumbnails";
1328
+ }
1329
+ // Sanitize template name; remove file extension if exists
1330
+ if (strpos($template, '.php')) {
1331
+ $template_css_class_suffix = preg_replace('/'. preg_quote('.php', '/') . '$/', '', $template);
1332
+ } else {
1333
+ $template_css_class_suffix = $template;
1334
+ }
1335
+ $output .= " yarpp-template-$template_css_class_suffix";
1336
+ } else {
1337
+ // fallback to default template ("list")
1338
+ $output .= " yarpp-template-list";
1339
+ }
1340
 
1341
  $output .= "'>\n";
1342
 
1347
  // avoid any monkeying around where someone could trya custom template like a template name like
1348
  // "yarpp-template-;../../wp-config.php". YARPP custom templates are only supported in the theme's root folder.
1349
  $template = str_replace('/', '', $template);
 
1350
  if ($domain === 'metabox') {
1351
  include(YARPP_DIR.'/includes/template_metabox.php');
1352
  } else if ((bool) $template && $template === 'thumbnails') {
1353
  include(YARPP_DIR.'/includes/template_thumbnails.php');
1354
+ } else if ((bool) $template && $template === 'list') {
1355
+ include(YARPP_DIR.'/includes/template_builtin.php');
1356
  } else if ((bool) $template) {
1357
  $named_properly = strpos($template,'yarpp-template-') === 0;
1358
  $template_exists = file_exists(STYLESHEETPATH.'/'.$template);
1533
  if ($domain === 'website') {
1534
  $output .= "yarpp-related";
1535
  } else {
1536
+ $output .= "yarpp-related yarpp-related-{$domain}";
1537
  }
1538
  $output .= "'>\n";
1539
 
classes/YARPP_Meta_Box_Display_Web.php CHANGED
@@ -12,11 +12,20 @@ class YARPP_Meta_Box_Display_Web extends YARPP_Meta_Box {
12
 
13
  echo "<div class='yarpp_form_row yarpp_form_post_types'><div>";
14
  echo __( "Automatically display related content on: ", 'yarpp' );
15
- echo " <span class='yarpp_help dashicons dashicons-editor-help' data-help='" . esc_attr( __( "This option automatically displays related posts right after the content on single entry pages. If this option is off, you will need to manually insert the shortcode <code>[yarpp]</code>, or PHP functions <code>related_posts()</code> or variants (<code>related_pages()</code> and <code>related_entries()</code>) into your theme files.", 'yarpp' ) ) . "'>&nbsp;</span>&nbsp;&nbsp;";
16
  echo "</div><div>";
17
  $post_types = yarpp_get_option( 'auto_display_post_types' );
 
 
18
  foreach ($yarpp->get_post_types('objects') as $post_type) {
19
  $post_type_title = $post_type->labels->name;
 
 
 
 
 
 
 
20
  // Clarify "topics" are from bbPress plugin
21
  if($post_type->name == 'topic' && class_exists('bbPress')){
22
  $post_type_title = sprintf(
@@ -26,7 +35,8 @@ class YARPP_Meta_Box_Display_Web extends YARPP_Meta_Box {
26
  }
27
  echo "<label for='yarpp_post_type_{$post_type->name}'><input id='yarpp_post_type_{$post_type->name}' name='auto_display_post_types[{$post_type->name}]' type='checkbox' ";
28
  checked( in_array( $post_type->name, $post_types ) );
29
- echo "/> {$post_type_title}</label> ";
 
30
  }
31
  echo "</div></div>";
32
 
12
 
13
  echo "<div class='yarpp_form_row yarpp_form_post_types'><div>";
14
  echo __( "Automatically display related content on: ", 'yarpp' );
15
+ echo " <span class='yarpp_help dashicons dashicons-editor-help' data-help='" . esc_attr( __( "This option automatically displays YARPP right after the content on single entry pages. If this option is off, you will need to manually insert the <code>[yarpp]</code> shortcode, block or <code>yarpp_related()</code> PHP function into your theme files.", 'yarpp' ) ) . "'>&nbsp;</span>&nbsp;&nbsp;";
16
  echo "</div><div>";
17
  $post_types = yarpp_get_option( 'auto_display_post_types' );
18
+ $include_post_type = yarpp_get_option( 'include_post_type' );
19
+ $include_post_type = wp_parse_list( $include_post_type );
20
  foreach ($yarpp->get_post_types('objects') as $post_type) {
21
  $post_type_title = $post_type->labels->name;
22
+ $disabled_checkbox = '';
23
+ $hide_help_text = 'style="display: none;"';
24
+ if ( ! yarpp_get_option( 'cross_relate' ) && ! in_array( $post_type->name, $include_post_type, true ) ) {
25
+ $disabled_checkbox = 'disabled';
26
+ $hide_help_text = '';
27
+ }
28
+ $help_text = "<span {$hide_help_text} style='color: #d63638;' class='yarpp_help dashicons dashicons-warning' data-help='" . "<p>" . esc_attr( __( "This option is disabled because 'The Pool':", 'yarpp' ) ) . "</p><p>" . esc_attr( __("1. does not include this post type", 'yarpp' ) ) . "</p><p>" . esc_attr( __("2. limits results to the same post type as the current post", 'yarpp' ) ) . "</p><p>" . esc_attr( __("This combination will always result in no posts displaying on this post type. To enable, in The Pool either include this post type or do not limit results to the same post type.", 'yarpp' ) ) . "</p>" . "'>&nbsp;</span>&nbsp;&nbsp;";
29
  // Clarify "topics" are from bbPress plugin
30
  if($post_type->name == 'topic' && class_exists('bbPress')){
31
  $post_type_title = sprintf(
35
  }
36
  echo "<label for='yarpp_post_type_{$post_type->name}'><input id='yarpp_post_type_{$post_type->name}' name='auto_display_post_types[{$post_type->name}]' type='checkbox' ";
37
  checked( in_array( $post_type->name, $post_types ) );
38
+ echo $disabled_checkbox;
39
+ echo "/> {$post_type_title}{$help_text}</label> ";
40
  }
41
  echo "</div></div>";
42
 
classes/YARPP_Meta_Box_Pool.php CHANGED
@@ -28,7 +28,35 @@ class YARPP_Meta_Box_Pool extends YARPP_Meta_Box {
28
 
29
  echo "</div></div></div>";
30
  }
 
 
 
 
 
 
 
 
 
 
 
 
31
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  public function display() {
33
  global $yarpp;
34
  $postTypeHelpMsg =
28
 
29
  echo "</div></div></div>";
30
  }
31
+ /**
32
+ * Displays the "include post type" input's HTML.
33
+ *
34
+ * @since 5.20.1
35
+ * @return void
36
+ */
37
+ public function include_post_type() {
38
+ global $yarpp;
39
+
40
+ echo "<div class='yarpp_form_row yarpp_form_include_post_type'><div class='yarpp_form_label'>";
41
+ esc_html_e( 'Post types to include:', 'yarpp' );
42
+ echo "</div><div class='yarpp_scroll_wrapper'><div class='include_post_type' id='include_post_type'>";
43
 
44
+ $include_post_type = yarpp_get_option( 'include_post_type' );
45
+ $include_post_type_array = wp_parse_list( $include_post_type );
46
+ $post_types = $yarpp->get_post_types( 'objects' );
47
+ foreach ( $post_types as $post_type ) {
48
+ $post_type_title = $post_type->labels->name;
49
+ // Clarify "topics" are from bbPress plugin
50
+ if( $post_type->name == 'topic' && class_exists( 'bbPress' ) ) {
51
+ $post_type_title = sprintf(
52
+ __('BuddyPress %s', 'yarpp'),
53
+ $post_type_title
54
+ );
55
+ }
56
+ echo "<input data-post-type='{$post_type->name}' type='checkbox' " . checked( in_array( $post_type->name, $include_post_type_array, true ), 1, false ) . " name='include_post_type[{$post_type->name}]' id='include_post_type_{$post_type->name}' value='true' /> <label for='include_post_type_{$post_type->name}'>" . esc_html( $post_type_title ) . "</label> ";
57
+ }
58
+ echo "</div></div></div>";
59
+ }
60
  public function display() {
61
  global $yarpp;
62
  $postTypeHelpMsg =
classes/YARPP_Shortcode.php CHANGED
@@ -36,9 +36,11 @@ class YARPP_Shortcode {
36
  $yarpp_args = array(
37
  'domain' => 'shortcode'
38
  );
 
 
39
  if (isset($atts['template'])) {
40
  $yarpp_args['template'] = trim($atts['template']);
41
- if (strpos($yarpp_args['template'], '.php') === false) {
42
  $yarpp_args['template'] .= '.php';
43
  }
44
  }
36
  $yarpp_args = array(
37
  'domain' => 'shortcode'
38
  );
39
+
40
+ // Custom templates require .php extension
41
  if (isset($atts['template'])) {
42
  $yarpp_args['template'] = trim($atts['template']);
43
+ if (( strpos($yarpp_args['template'], 'yarpp-template-') === 0 ) && ( strpos($yarpp_args['template'], '.php') === false )) {
44
  $yarpp_args['template'] .= '.php';
45
  }
46
  }
includes/phtmls/yarpp_meta_box_pool.phtml CHANGED
@@ -8,6 +8,7 @@
8
  </p>
9
 
10
  <?php
 
11
  foreach ($yarpp->get_taxonomies() as $taxonomy) {
12
  $this->exclude($taxonomy->name, sprintf(__('Disallow by %s:', 'yarpp'), ucwords($taxonomy->labels->name)), $taxonomy->_builtin);
13
  }
@@ -51,5 +52,10 @@ $recent_units_html .= '</select>';
51
  <?php
52
  $this->checkbox( 'past_only', __( "Display only posts older than current post", 'yarpp' )." <span class='yarpp_help dashicons dashicons-editor-help' data-help='" . esc_attr( __( "Only posts older than the current post will be displayed.", 'yarpp' ) ) . "'>&nbsp;</span>" );
53
 
54
- $this->checkbox( 'cross_relate', __( "Display results from all post types", 'yarpp' )." <span class='yarpp_help dashicons dashicons-editor-help' data-help='" . esc_attr( __( "When disabled, only other posts with the same post type will be displayed. For example, only posts will be displayed as related to a post, only pages will be displayed as related to a page, etc.", 'yarpp' ) ) . "'>&nbsp;</span>" );
 
 
 
 
 
55
  ?>
8
  </p>
9
 
10
  <?php
11
+ $this->include_post_type();
12
  foreach ($yarpp->get_taxonomies() as $taxonomy) {
13
  $this->exclude($taxonomy->name, sprintf(__('Disallow by %s:', 'yarpp'), ucwords($taxonomy->labels->name)), $taxonomy->_builtin);
14
  }
52
  <?php
53
  $this->checkbox( 'past_only', __( "Display only posts older than current post", 'yarpp' )." <span class='yarpp_help dashicons dashicons-editor-help' data-help='" . esc_attr( __( "Only posts older than the current post will be displayed.", 'yarpp' ) ) . "'>&nbsp;</span>" );
54
 
55
+ $this->checkbox(
56
+ 'same_post_type',
57
+ __( "Limit to same post type", 'yarpp' )." <span class='yarpp_help dashicons dashicons-editor-help' data-help='" . esc_attr( __( "When enabled, posts will only be selected from the same post type of the current post.", 'yarpp' ) ) . "'>&nbsp;</span>",
58
+ '',
59
+ array('option_value' => ! yarpp_get_option('cross_relate'))
60
+ );
61
  ?>
includes/template_builtin.php CHANGED
@@ -22,7 +22,7 @@ $options = array(
22
  extract($this->parse_args($args, $options));
23
 
24
  if (have_posts()) {
25
-
26
  $output .= $before_related."\n";
27
 
28
  while (have_posts()) {
22
  extract($this->parse_args($args, $options));
23
 
24
  if (have_posts()) {
25
+ $output .= '<!-- YARPP List -->'."\n";
26
  $output .= $before_related."\n";
27
 
28
  while (have_posts()) {
includes/template_thumbnails.php CHANGED
@@ -21,6 +21,8 @@ if ( empty($thumbnails_default) )
21
 
22
  $dimensions = $this->thumbnail_dimensions();
23
 
 
 
24
  $output .= '<h3>' . $thumbnails_heading . '</h3>' . "\n";
25
 
26
  if (have_posts()) {
21
 
22
  $dimensions = $this->thumbnail_dimensions();
23
 
24
+ $output .= '<!-- YARPP Thumbnails -->'."\n";
25
+
26
  $output .= '<h3>' . $thumbnails_heading . '</h3>' . "\n";
27
 
28
  if (have_posts()) {
includes/yarpp_options.php CHANGED
@@ -139,7 +139,18 @@ if (isset($_POST['update_yarpp']) && check_admin_referer('update_yarpp', 'update
139
  $new_options['exclude'] = implode(',',array_keys($_POST['exclude']));
140
  else
141
  $new_options['exclude'] = '';
 
 
 
 
 
 
142
 
 
 
 
 
 
143
  $new_options['include_sticky_posts'] = isset( $_POST['include_sticky_posts'] ) ? 1 : 0;
144
  $new_options['template'] = $_POST['use_template'] == 'custom' ? $_POST['template_file'] :
145
  ( $_POST['use_template'] == 'thumbnails' ? 'thumbnails' : false );
139
  $new_options['exclude'] = implode(',',array_keys($_POST['exclude']));
140
  else
141
  $new_options['exclude'] = '';
142
+
143
+ if ( isset ($_POST['same_post_type'] ) ) {
144
+ $new_options['cross_relate'] = false;
145
+ } else {
146
+ $new_options['cross_relate'] = true;
147
+ }
148
 
149
+ if ( isset ($_POST['include_post_type'] ) ) {
150
+ $new_options['include_post_type'] = implode( ',', array_keys( $_POST['include_post_type'] ) );
151
+ } else {
152
+ $new_options['include_post_type'] = '';
153
+ }
154
  $new_options['include_sticky_posts'] = isset( $_POST['include_sticky_posts'] ) ? 1 : 0;
155
  $new_options['template'] = $_POST['use_template'] == 'custom' ? $_POST['template_file'] :
156
  ( $_POST['use_template'] == 'thumbnails' ? 'thumbnails' : false );
js/metabox.min.js ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ jQuery(document).ready(function($){var loaded_metabox=!1;var display=$('#yarpp-related-posts');function yarpp_metabox_initial_display(){if(!$('#yarpp_relatedposts')||!display.length||!$('#post_ID').val())
2
+ return;if(!loaded_metabox){loaded_metabox=!0;yarpp_metabox_populate(!1)}}
3
+ function yarpp_metabox_populate(refresh){var data={action:'yarpp_display',domain:'metabox',ID:parseInt($('#post_ID').val()),'_ajax_nonce':$('#yarpp_display-nonce').val()};if(typeof refresh!=='undefined'&&refresh){data.refresh=!0}
4
+ $.ajax({type:'POST',url:ajaxurl,data:data,error:function(){display.html("Error")},success:function(html){display.html(html)},dataType:'html'})}
5
+ $('#yarpp_relatedposts .handlediv, #yarpp_relatedposts-hide').click(function(){setTimeout(yarpp_metabox_initial_display,0)});$(document).on('touchstart mouseenter','#yarpp-list li',function(){$(this).children('.yarpp-related-action').css('visibility','visible')});$(document).on('touchend mouseleave','#yarpp-list li',function(){$(this).children('.yarpp-related-action').css('visibility','hidden')});$(document).on('click','#yarpp-refresh',function(e){e.preventDefault();var display=$('#yarpp-related-posts');if($(this).hasClass('disabled'))
6
+ return!1;$refresh_button=$(this);$spinner=$refresh_button.siblings('.spinner');$refresh_button.addClass('yarpp-disabled');$spinner.css('visibility','visible');$('#yarpp-list').css('opacity',0.6);yarpp_metabox_populate(!0)});yarpp_metabox_initial_display()})
js/options_basic.min.js CHANGED
@@ -31,7 +31,8 @@ $('.sync_rss_no_results input').attr('value',value)}
31
  $('.sync_no_results, .sync_rss_no_results').change(sync_no_results);$('#yarpp_display_code').click(function(){var args={action:'yarpp_set_display_code','_ajax_nonce':$('#yarpp_set_display_code-nonce').val()};if($(this).is(':checked'))
32
  args.checked=!0;$.ajax({type:'POST',url:ajaxurl,data:args});display();rss_display()});function auto_display_archive(){var available=$('.yarpp_form_post_types').is(':has(input[type=checkbox]:checked)');$('#yarpp-auto_display_archive').attr('disabled',!available);if(!available)
33
  $('#yarpp-auto_display_archive').prop('checked',!1)}
34
- $('.yarpp_form_post_types input[type=checkbox]').change(auto_display_archive);auto_display_archive();$("#yarpp_fulltext_expand").click(function(e){e.preventDefault();var $details=$("#yarpp_fulltext_details");$details.slideToggle();if($details.hasClass('hidden')){$details.removeClass('hidden');$(this).text('Hide Details [-]')}else{$details.addClass('hidden');$(this).text('Show Details [+]')}});var yarpp_model=$('\
 
35
  <div id="shareaholic-deactivate-dialog" class="shareaholic-deactivate-dialog" data-remodal-id="">\
36
  <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>\
37
  <div class="shareaholic-deactivate-body">\
31
  $('.sync_no_results, .sync_rss_no_results').change(sync_no_results);$('#yarpp_display_code').click(function(){var args={action:'yarpp_set_display_code','_ajax_nonce':$('#yarpp_set_display_code-nonce').val()};if($(this).is(':checked'))
32
  args.checked=!0;$.ajax({type:'POST',url:ajaxurl,data:args});display();rss_display()});function auto_display_archive(){var available=$('.yarpp_form_post_types').is(':has(input[type=checkbox]:checked)');$('#yarpp-auto_display_archive').attr('disabled',!available);if(!available)
33
  $('#yarpp-auto_display_archive').prop('checked',!1)}
34
+ $('.yarpp_form_post_types input[type=checkbox]').change(auto_display_archive);auto_display_archive();$("#yarpp_fulltext_expand").click(function(e){e.preventDefault();var $details=$("#yarpp_fulltext_details");$details.slideToggle();if($details.hasClass('hidden')){$details.removeClass('hidden');$(this).text('Hide Details [-]')}else{$details.addClass('hidden');$(this).text('Show Details [+]')}});$('.include_post_type input[type=checkbox]').change(function(e){var get_attr=$(this).attr('data-post-type');if($('#yarpp-same_post_type').is(':checked')){yarpp_enable_disabel_checkbox($(this).is(':checked'),get_attr)}else{$('.yarpp_form_post_types #yarpp_post_type_'+get_attr).prop("disabled",!1)}});$('#yarpp-same_post_type').change(function(e){var get_checkboxes='.include_post_type input[type=checkbox]';if($(this).is(':checked')){$(get_checkboxes).each(function(){var get_attr=$(this).attr('data-post-type');yarpp_enable_disabel_checkbox($(this).is(':checked'),get_attr)})}else{$('.yarpp_form_post_types input[type=checkbox]').prop("disabled",!1);$('.yarpp_form_post_types input[type=checkbox]').siblings().hide()}});function yarpp_enable_disabel_checkbox(checked,get_attr){if(checked){$('.yarpp_form_post_types #yarpp_post_type_'+get_attr).prop("disabled",!1);$('.yarpp_form_post_types #yarpp_post_type_'+get_attr).siblings().hide()}else{$('.yarpp_form_post_types #yarpp_post_type_'+get_attr).prop("disabled",!0);$('.yarpp_form_post_types #yarpp_post_type_'+get_attr).siblings().show()}}
35
+ var yarpp_model=$('\
36
  <div id="shareaholic-deactivate-dialog" class="shareaholic-deactivate-dialog" data-remodal-id="">\
37
  <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>\
38
  <div class="shareaholic-deactivate-body">\
readme.txt CHANGED
@@ -5,7 +5,7 @@ Requires at least: 3.7
5
  Requires PHP: 5.3
6
  License: GPLv2 or later
7
  Tested up to: 5.7
8
- Stable tag: 5.21.0
9
 
10
  The most popular plugin to display a list of related posts on your site based on a powerful unique algorithm.
11
 
@@ -22,6 +22,7 @@ The most popular plugin to display a list of related posts on your site based on
22
  * **Related posts in feeds**: Display related posts in RSS feeds with custom display options.
23
  * **REST API support** - Embed related posts in your web or JavaScript driven app! ([documentation](https://support.shareaholic.com/hc/en-us/articles/360046456752))
24
  * **Shortcode support** - Use `[yarpp]` shortcode to place related posts anywhere ([documentation](https://wordpress.org/plugins/yet-another-related-posts-plugin/#%0Ahow%20can%20i%20move%20the%20related%20posts%20display%3F%0A))
 
25
  * **HTTPS support**
26
  * **bbPress forums support**
27
  * **WordPress Multisite support**
@@ -72,7 +73,7 @@ You can place YARPP's related posts manually wherever you’d like in post conte
72
 
73
  To add to post content, use the shortcode:
74
 
75
- `[yarpp]` to show content related to the current post
76
 
77
  If you know the reference Post ID that you want to show content related to, use:
78
 
@@ -80,9 +81,11 @@ If you know the reference Post ID that you want to show content related to, use:
80
 
81
  To specify which YARPP template to use, use the "template" attribute like so:
82
 
83
- `[yarpp template="yarpp-template-photoblog"]`
 
 
84
 
85
- The add YARRP related posts to your theme files (eg. single.php), we recommend using:
86
 
87
  `<?php echo do_shortcode('[yarpp]'); ?>`
88
  `<?php echo do_shortcode('[yarpp reference_id=123]'); ?>`
@@ -319,6 +322,15 @@ add_action(
319
  `
320
 
321
  == Changelog ==
 
 
 
 
 
 
 
 
 
322
  = 5.21.0 (14-May-2021) =
323
  * Bugfix: Disable "Edit as HTML" for YARPP Block
324
  * Bugfix ([1](https://wordpress.org/support/topic/template-does-not-change-ver-5-20-0/)|[2](https://wordpress.org/support/topic/custom-template-not-showing-since-v5-10-2/)): Fixes issue with the correct template not being applied
@@ -1154,5 +1166,5 @@ After a break of many years, the plugin is 100% supported now that the baton has
1154
  * Initial upload
1155
 
1156
  == Upgrade Notice ==
1157
- = 5.21.0 =
1158
  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!
5
  Requires PHP: 5.3
6
  License: GPLv2 or later
7
  Tested up to: 5.7
8
+ Stable tag: 5.22.0
9
 
10
  The most popular plugin to display a list of related posts on your site based on a powerful unique algorithm.
11
 
22
  * **Related posts in feeds**: Display related posts in RSS feeds with custom display options.
23
  * **REST API support** - Embed related posts in your web or JavaScript driven app! ([documentation](https://support.shareaholic.com/hc/en-us/articles/360046456752))
24
  * **Shortcode support** - Use `[yarpp]` shortcode to place related posts anywhere ([documentation](https://wordpress.org/plugins/yet-another-related-posts-plugin/#%0Ahow%20can%20i%20move%20the%20related%20posts%20display%3F%0A))
25
+ * **Gutenberg Block support**
26
  * **HTTPS support**
27
  * **bbPress forums support**
28
  * **WordPress Multisite support**
73
 
74
  To add to post content, use the shortcode:
75
 
76
+ `[yarpp]` to show content related to the current post. You may use more than one YARPP shortcode in a given post or template.
77
 
78
  If you know the reference Post ID that you want to show content related to, use:
79
 
81
 
82
  To specify which YARPP template to use, use the "template" attribute like so:
83
 
84
+ `[yarpp template="yarpp-template-photoblog"]` // where `yarpp-template-photoblog.php` is the file name of the custom template
85
+ `[yarpp template="list"]` // built-in "List" template
86
+ `[yarpp template="thumbnails"]` // built-in "Thumbnails" template
87
 
88
+ To add YARPP shortcode to your theme files (eg. single.php), use:
89
 
90
  `<?php echo do_shortcode('[yarpp]'); ?>`
91
  `<?php echo do_shortcode('[yarpp reference_id=123]'); ?>`
322
  `
323
 
324
  == Changelog ==
325
+ = 5.22.0 (24-May-2021) =
326
+ * [New](https://wordpress.org/support/topic/display-results-from-specific-post-types/): Choose the exact post types to include in "The Pool"
327
+ * [New](https://wordpress.org/support/topic/is-it-possible-to-use-different-styles-of-yarpp-in-every-post/): Ability to specify built-in YARPP templates in the YARPP shortcode. You may use more than one YARPP shortcode in a given post or template and each can have a different templates specified. For example:
328
+ + `[yarpp template="yarpp-template-simple"]` // where `yarpp-template-simple.php` is the file name of the custom YARPP template in your active theme folder
329
+ + `[yarpp template="list"]` // built-in "List" template
330
+ + `[yarpp template="thumbnails"]` // built-in "Thumbnails" template
331
+ * Enhancement: YARPP Automatic Placement, YARPP Shortcode, YARPP Block, YARPP Widget and RSS output are all now wrapped in a `div` with classes `yarpp`, `yarpp-related` and `yarpp-template-TEMPLATE-NAME` to facilitate easier CSS customizations
332
+ * Enhancement: All admin CSS is now minified
333
+
334
  = 5.21.0 (14-May-2021) =
335
  * Bugfix: Disable "Edit as HTML" for YARPP Block
336
  * Bugfix ([1](https://wordpress.org/support/topic/template-does-not-change-ver-5-20-0/)|[2](https://wordpress.org/support/topic/custom-template-not-showing-since-v5-10-2/)): Fixes issue with the correct template not being applied
1166
  * Initial upload
1167
 
1168
  == Upgrade Notice ==
1169
+ = 5.22.0 =
1170
  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 ADDED
@@ -0,0 +1,409 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #yarpp_author_text {
2
+ width: 900px;
3
+ }
4
+
5
+ .yarpp-red {
6
+ color: #dc3232;
7
+ }
8
+
9
+ .yarpp-no-float {
10
+ float: none;
11
+ margin-bottom: 5px;
12
+ }
13
+
14
+ .form-table td {
15
+ line-height: 11px; /* to match the th's */
16
+ }
17
+
18
+ ul.yarpp_contacts li {
19
+ padding: 0px 0px 0px 30px;
20
+ line-height: 22px;
21
+ }
22
+
23
+ body.rtl ul.yarpp_contacts li {
24
+ padding: 0px 30px 0px 0px;
25
+ }
26
+
27
+ ul.yarpp_contacts li a img {
28
+ vertical-align: bottom;
29
+ }
30
+
31
+ /* hide pointer dismiss buttons on this page */
32
+ .postbox .wp-pointer-buttons {
33
+ display: none;
34
+ }
35
+
36
+ #tab-panel-faq, #tab-panel-dev {
37
+ direction: ltr;
38
+ }
39
+
40
+ .icon {
41
+ width: 22px;
42
+ height: 22px;
43
+ position: absolute;
44
+ margin-left: -29px;
45
+ margin-top: -1px;
46
+ background-image: url('../images/sprites.png');
47
+ }
48
+
49
+ body.rtl .icon {
50
+ margin-left: none;
51
+ margin-right: -29px;
52
+ }
53
+
54
+ @media only screen and (-webkit-min-device-pixel-ratio: 1.5) {
55
+ .icon {
56
+ background-image: url('../images/sprites-2x.png');
57
+ background-size: 132px 22px;
58
+ }
59
+ }
60
+
61
+ .icon-wordpress {
62
+ background-position: 0 0;
63
+ }
64
+
65
+ .icon-twitter {
66
+ background-position: -22px 0;
67
+ }
68
+
69
+ .icon-plugin {
70
+ background-position: -44px 0;
71
+ }
72
+
73
+ .icon-star {
74
+ background-position: -66px 0;
75
+ }
76
+
77
+ .icon-pro {
78
+ background-position: -88px 0;
79
+ }
80
+
81
+ .icon-facebook {
82
+ background-position: -110px 0;
83
+ }
84
+
85
+ .icon.spin, .icon-star:hover {
86
+ transform-origin: 11px 12px;
87
+ -o-transform-origin: 11px 12px;
88
+ -webkit-transform-origin: 11px 12px;
89
+ -moz-transform-origin: 11px 12px;
90
+ animation: 3s ease 2s normal none 1 yarpp-spin;
91
+ -o-animation: 3s ease 2s normal none 1 yarpp-spin;
92
+ -webkit-animation: 3s ease 2s normal none 1 yarpp-spin;
93
+ -moz-animation: 3s ease 2s normal none 1 yarpp-spin;
94
+ z-index: 1;
95
+ }
96
+
97
+ @keyframes yarpp-spin {
98
+ 0% { transform: rotate(0deg) scale(1); }
99
+ 5% { transform: rotate(0deg) scale(1.5); }
100
+ 100% { transform: rotate(360deg) scale(1);}
101
+ }
102
+
103
+ @-moz-keyframes yarpp-spin {
104
+ 0% { -moz-transform: rotate(0deg) scale(1); }
105
+ 5% { -moz-transform: rotate(0deg) scale(1.5); }
106
+ 100% { -moz-transform: rotate(360deg) scale(1);}
107
+ }
108
+
109
+ @-webkit-keyframes yarpp-spin {
110
+ 0% { -webkit-transform: rotate(0deg) scale(1); }
111
+ 5% { -webkit-transform: rotate(0deg) scale(1.5); }
112
+ 100% { -webkit-transform: rotate(360deg) scale(1);}
113
+ }
114
+
115
+ a.info{
116
+ position:relative;
117
+ z-index:24;
118
+ }
119
+
120
+ .yarpp_help .wp-pointer-content p {
121
+ text-align: left;
122
+ font-family: sans-serif;
123
+ }
124
+
125
+ a.yarpp_help {
126
+ text-decoration: none;
127
+ cursor: pointer;
128
+ }
129
+
130
+ a.yarpp_help:hover {
131
+ text-decoration: none;
132
+ background-position: -520px -0px;
133
+ }
134
+
135
+ .exclude_terms span {
136
+ display: inline-block;
137
+ }
138
+
139
+ #yarpp_display_optin.yarpp_attention {
140
+ border: 2px solid #bbb;
141
+ }
142
+
143
+ .yarpp_subbox {
144
+ margin-bottom: 5px;
145
+ background: #fdfdfd;
146
+ }
147
+
148
+ .yarpp_form_row {
149
+ overflow: visible;
150
+ padding: 8px;
151
+ }
152
+
153
+ .yarpp_form_row > div {
154
+ display: inline-block;
155
+ vertical-align: top;
156
+ }
157
+
158
+ .yarpp_form_row > div > label {
159
+ vertical-align: baseline;
160
+ }
161
+
162
+ .yarpp_form_checkbox > div {
163
+ }
164
+
165
+ .yarpp_form_select > div {
166
+ padding-top: 5px;
167
+ padding-bottom: 5px;
168
+ }
169
+
170
+ .yarpp_form_select + .yarpp_form_select {
171
+ padding-top: 0px;
172
+ }
173
+
174
+ .yarpp_form_label {
175
+ width: 25%;
176
+ }
177
+
178
+ .yarpp_form_label + div {
179
+ padding-left: 16px;
180
+ width: 70%;
181
+ }
182
+
183
+ .yarpp_form_textbox > .yarpp_form_label {
184
+ }
185
+
186
+ .yarpp_form_select > .yarpp_form_label {
187
+ padding-top: 8px;
188
+ }
189
+
190
+ .yarpp_form_post_types label {
191
+ padding-right: 15px;
192
+ line-height: 20px;
193
+ display: inline-block;
194
+ }
195
+
196
+ body.rtl .yarpp_form_post_types label {
197
+ padding-right: inherit;
198
+ padding-left: 15px;
199
+ }
200
+
201
+ .yarpp_form_exclude label {
202
+ padding-right: 5px;
203
+ line-height: 15px;
204
+ }
205
+
206
+ body.rtl .yarpp_form_exclude label {
207
+ padding-right: inherit;
208
+ padding-left: 5px;
209
+ }
210
+
211
+ .yarpp_form_template_file > .yarpp_form_label {
212
+ vertical-align: top;
213
+ padding-top: 5px;
214
+ }
215
+
216
+ .yarpp_code_display {
217
+ border-left: 8px transparent solid;
218
+ width: 50%;
219
+ float: right;
220
+ }
221
+
222
+ body.rtl .yarpp_code_display {
223
+ float: left;
224
+ }
225
+
226
+ .yarpp_code_display div {
227
+ overflow: auto;
228
+ max-height: 300px;
229
+ }
230
+
231
+ .yarpp_code_display pre {
232
+ direction: ltr;
233
+ }
234
+
235
+ .yarpp_scroll_wrapper {
236
+ overflow: auto;
237
+ min-height: 25px;
238
+ max-height: 100px;
239
+ width: 60%;
240
+ vertical-align: middle;
241
+ }
242
+
243
+ @media all and (max-width:1200px) {
244
+ .yarpp_scroll_wrapper {
245
+ width: 50%;
246
+ }
247
+ .yarpp_code_display {
248
+ max-width: 60%;
249
+ }
250
+ }
251
+
252
+ #yarpp-optin-learnmore {
253
+ float: right;
254
+ }
255
+
256
+ body.rtl #yarpp-optin-learnmore {
257
+ float: left;
258
+ }
259
+
260
+ .template_file_wrap, .template_author_wrap, .template_description_wrap {
261
+ margin: 3px 0;
262
+ }
263
+
264
+ .template_file_wrap {
265
+ font-family: monospace;
266
+ }
267
+
268
+ .yarpp_subbox input[type=text], .yarpp_subbox input[type=text] {
269
+ font-family: monospace;
270
+ width: 35%
271
+ }
272
+
273
+ .yarpp_form_template_buttons {
274
+ padding: 0px;
275
+ }
276
+
277
+ .yarpp_template_button {
278
+ position: relative;
279
+ height: 60px;
280
+ width: 70px;
281
+ padding: 8px;
282
+ -webkit-border-radius: 3px;
283
+ border-radius: 7px;
284
+ border: 1px solid #aaa;
285
+ margin: 10px;
286
+ margin-right: 5px;
287
+ margin-bottom: 20px;
288
+ cursor: pointer;
289
+ background: #f3f3f3;
290
+ background-image: -webkit-linear-gradient(to bottom, #FEFEFE, #F4F4F4);
291
+ background-image: -moz-linear-gradient(to bottom, #FEFEFE, #F4F4F4);
292
+ background-image: -o-linear-gradient(to bottom, #FEFEFE, #F4F4F4);
293
+ background-image: linear-gradient(to bottom, #FEFEFE, #F4F4F4);
294
+ color: #333;
295
+ text-shadow: 0 1px 0 white;
296
+ -webkit-box-shadow: 1px 1px 7px 1px #bbb;
297
+ box-shadow: 1px 1px 7px 1px #bbb;
298
+ }
299
+
300
+ .yarpp_template_button.disabled, .yarpp_template_button.disabled:hover, .yarpp_template_button.disabled:active {
301
+ -webkit-box-shadow: none;
302
+ box-shadow: none;
303
+ border-color: #ddd;
304
+ background: #f3f3f3;
305
+ background-image: -webkit-linear-gradient(to bottom, #FEFEFE, #F4F4F4);
306
+ background-image: -moz-linear-gradient(to bottom, #FEFEFE, #F4F4F4);
307
+ background-image: -o-linear-gradient(to bottom, #FEFEFE, #F4F4F4);
308
+ background-image: linear-gradient(to bottom, #FEFEFE, #F4F4F4);
309
+ }
310
+
311
+ .yarpp_template_button.disabled > div.label {
312
+ color: #bbb;
313
+ }
314
+
315
+ .yarpp_template_button:hover {
316
+ border-color: #999;
317
+ color: #222;
318
+ }
319
+
320
+ .yarpp_template_button:active, .yarpp_template_button.active {
321
+ background: #eee;
322
+ background-image: -webkit-linear-gradient(to bottom, #eee, #f4f4f4);
323
+ background-image: -moz-linear-gradient(to bottom, #eee, #f4f4f4);
324
+ background-image: -o-linear-gradient(to bottom, #eee, #f4f4f4);
325
+ background-image: linear-gradient(to bottom, #eee, #f4f4f4);
326
+ border-color: #999;
327
+ text-shadow: 0 -1px 0 white;
328
+ -webkit-box-shadow: inset 0 2px 8px -2px rgba( 0, 0, 0, 0.5 );
329
+ box-shadow: inset 0 2px 8px -2px rgba( 0, 0, 0, 0.5 );
330
+ }
331
+
332
+ .yarpp_template_button > div.label {
333
+ width: 70px;
334
+ bottom: 8px;
335
+ text-align: center;
336
+ position: absolute;
337
+ }
338
+
339
+ .yarpp_template_button > div.image {
340
+ width: 70px;
341
+ height: 40px;
342
+ background-image: url('../images/template-buttons-2x.png');
343
+ background-size: 210px 40px;
344
+ opacity: 0.8;
345
+ }
346
+
347
+ .yarpp_template_button.disabled > div.image {
348
+ opacity: 0.2;
349
+ }
350
+
351
+ .yarpp_template_button:active > div.image {
352
+ opacity: 1;
353
+ }
354
+
355
+ .yarpp_template_button[data-value=builtin] > div.image {
356
+ background-position: 0px 0px;
357
+ }
358
+
359
+ .yarpp_template_button[data-value=thumbnails] > div.image {
360
+ background-position: -70px 0px;
361
+ }
362
+
363
+ .yarpp_template_button[data-value=custom] > div.image {
364
+ background-position: -140px 0px;
365
+ }
366
+
367
+ #optin_data_frame {
368
+ overflow: scroll;
369
+ max-height: 300px;
370
+ direction: ltr;
371
+ }
372
+
373
+ #yarpp_extra_screen_settings {
374
+ border-top: 1px solid #e0e0e0;
375
+ }
376
+
377
+ .help-tab-content {
378
+ max-height: 500px;
379
+ width: 100%;
380
+ overflow: auto;
381
+ }
382
+
383
+ .yarpp_red {
384
+ color:red;
385
+ font-weight:bold
386
+ }
387
+
388
+ .yarpp_separated{
389
+ display:inline-block;
390
+ margin:1.5em 1em
391
+ }
392
+
393
+ .yarpp-callout{
394
+ margin: 5px 0 15px;
395
+ border: 1px solid #ccd0d4;
396
+ border-left-width: 4px;
397
+ padding: 1px 12px;
398
+ }
399
+ .yarpp-notice{
400
+ border-left-color:#ffb900;;
401
+ }
402
+ .yarpp-disabled{
403
+ color: #a7aaad!important;
404
+ background: #f6f7f7!important;
405
+ border-color: #dcdcde!important;
406
+ box-shadow: none!important;
407
+ text-shadow: none!important;
408
+ cursor: not-allowed !important;
409
+ }
src/css/public/options_switch.css ADDED
@@ -0,0 +1,161 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ nbr {
2
+ white-space: nowrap;
3
+ }
4
+
5
+ a{
6
+ text-decoration: none;
7
+ outline: none;
8
+ }
9
+
10
+ #yarpp_switch_container{
11
+ position: relative;
12
+ top:15px;
13
+ }
14
+
15
+ #yarpp_switch_tabs{
16
+ position: relative;
17
+ list-style: none;
18
+ margin: 0 0 -7px 0;
19
+ padding: 0;
20
+ z-index: 1;
21
+ color: #000;
22
+ }
23
+
24
+ #yarpp_switch_tabs li{
25
+ display: inline-block;
26
+ background-color: #f8f8f8;
27
+ padding: 6px 10px;
28
+ border: 1px solid #dfdfdf;
29
+ border-bottom-color: #f8f8f8;
30
+ border-top-left-radius: 5px;
31
+ border-top-right-radius: 5px;
32
+ }
33
+
34
+ .disabled{
35
+ background: #ededed;
36
+ border-bottom-color: #dfdfdf;
37
+ }
38
+
39
+ #yarpp_switch_tabs a{
40
+ color: #565656;
41
+ }
42
+
43
+ .disabled>a:hover{
44
+ color: #000;
45
+ text-shadow: 1px 1px 0.1em #aaa;
46
+ margin-top: -1px;
47
+ }
48
+
49
+ .yarpp_switch_content{
50
+ position: relative;
51
+ width: 100%;
52
+ background-color: #f8f8f8;
53
+ background: -webkit-linear-gradient(#f8f8f8, #ededed);
54
+ background: -moz-linear-gradient(#f8f8f8, #ededed);
55
+ background: -ms-linear-gradient(#f8f8f8, #ededed);
56
+ background: -o-linear-gradient(#f8f8f8, #ededed);
57
+ background: linear-gradient(#f8f8f8, #ededed);
58
+ border: 1px solid #dfdfdf;
59
+ text-align: justify;
60
+ margin-bottom: 25px;
61
+ border-radius: 0 3px 3px 3px;
62
+ }
63
+
64
+ .yarpp_switch_content p,
65
+ .yarpp_switch_content h1 {
66
+ position: relative;
67
+ margin: 15px 25% 15px 15px;
68
+ }
69
+
70
+ .yarpp_switch_content h1 {
71
+ font-size: 1.2em;
72
+ }
73
+
74
+ .yarpp_switch_content p {
75
+ line-height: 1.5em;
76
+ }
77
+
78
+ .yarpp_switch_content ul {
79
+ float: left;
80
+ line-height: 1.5em;
81
+ padding-left: 75px;
82
+ list-style: disc;
83
+ }
84
+
85
+ .yarpp_switch_content .to_corner {
86
+ display: block;
87
+ position: absolute;
88
+ right: -32%;
89
+ text-align: center;
90
+ }
91
+
92
+ #yarpp_pro_api_settings input[type="text"]{
93
+ font-family: monospace;
94
+ border-radius: 3px;
95
+ width: 280px;
96
+ }
97
+
98
+ .yarpp_pro_label{
99
+ display: inline-block;
100
+ width: 75px;
101
+ }
102
+
103
+ .yarpp_warning {
104
+ display: none;
105
+ color: #F00;
106
+ background-color: #ffcfd4;
107
+ border: 1px solid #F00;
108
+ padding: 2px 6px;
109
+ margin-left: 1em;
110
+ border-radius: 3px;
111
+ }
112
+
113
+ #yarpp_pro_api_settings #yarpp_pro_settings_submit[disabled]{
114
+ border: none;
115
+ padding: 8px;
116
+ margin: 1px;
117
+ }
118
+
119
+ #yarpp-display-mode {
120
+ margin: 1em 2em;
121
+ }
122
+
123
+ #yarpp-display-mode label {
124
+ margin-right: 1em;
125
+ }
126
+
127
+ #yarpp-display-mode .spinner{
128
+ width: 20px;
129
+ height: 20px;
130
+ display: inline-block;
131
+ float: none;
132
+ vertical-align: middle;
133
+ }
134
+
135
+ #yarpp_pro_disable_overlay{
136
+ position: fixed;
137
+ top: 0;
138
+ bottom: 0;
139
+ left: 0;
140
+ right: 0;
141
+ background-color: #EEE;
142
+ opacity: 0.7;
143
+ width: 100%;
144
+ margin: 0;
145
+ padding: 0;
146
+ z-index: 100000;
147
+ }
148
+
149
+ #yarpp_pro_disable_confirm{
150
+ position: fixed;
151
+ top: 250px;
152
+ left: 38%;
153
+ background-color: #FFF;
154
+ box-shadow: 0 0 1em -0.1em #F33;
155
+ border: 2px solid #F55;
156
+ text-align: justify;
157
+ width: 25%;
158
+ margin: 0;
159
+ padding:1em 2em;
160
+ z-index: 100001;
161
+ }
src/css/public/related.css ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .yarpp-related {
2
+ margin: 1em 0;
3
+ }
4
+
5
+ .yarpp-related a {
6
+ text-decoration: none;
7
+ font-weight: bold;
8
+ }
9
+
10
+ .yarpp-related .yarpp-thumbnail-title {
11
+ text-align: left;
12
+ font-weight: bold;
13
+ font-size: 96%;
14
+ text-decoration: none;
15
+ }
16
+
17
+ .yarpp-related h3 {
18
+ font-weight: bold;
19
+ padding: 0 0 5px 0;
20
+ font-size: 125%;
21
+ text-transform: capitalize;
22
+ margin: 0;
23
+ }
24
+
25
+ .yarpp-related .yarpp-promote {
26
+ clear: both;
27
+ background: url(//api.engage.bidsystem.com/adk_mini_logo.png) no-repeat;
28
+ float: right;
29
+ text-indent: -1000px;
30
+ cursor: pointer;
31
+ color: #666;
32
+ font-size: 11px;
33
+ height: 17px;
34
+ width: 78px;
35
+ }
src/css/public/styles_thumbnails.css ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .yarpp-thumbnails-horizontal .yarpp-thumbnail, .yarpp-thumbnail-default, .yarpp-thumbnail-title {
2
+ display: inline-block;
3
+ }
4
+ .yarpp-thumbnails-horizontal .yarpp-thumbnail {
5
+ border: 1px solid rgba(127,127,127,0.1);
6
+ vertical-align: top;
7
+ }
8
+ .yarpp-thumbnails-horizontal .yarpp-thumbnail > img, .yarpp-thumbnails-horizontal .yarpp-thumbnail-default {
9
+ display: block;
10
+ }
11
+ .yarpp-thumbnails-horizontal .yarpp-thumbnail-title {
12
+ font-size: 1em;
13
+ max-height: 2.8em;
14
+ line-height: 1.4em;
15
+ text-decoration: inherit;
16
+ overflow: hidden;
17
+ }
18
+
19
+ .yarpp-thumbnail-default {
20
+ overflow: hidden;
21
+ }
src/css/public/yarpp-block-editor.css ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ .wp-block-yarpp-yarpp-block .yarpp-related-block a {
2
+ pointer-events: none;
3
+ cursor: default;
4
+ }
{js → src/js}/block.js RENAMED
File without changes
{js → src/js}/metabox.js RENAMED
File without changes
{js → src/js}/options_basic.js RENAMED
@@ -336,6 +336,35 @@ jQuery(function($) {
336
  $(this).text('Show Details [+]');
337
  }
338
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
339
  var yarpp_model = $(
340
  '\
341
  <div id="shareaholic-deactivate-dialog" class="shareaholic-deactivate-dialog" data-remodal-id="">\
336
  $(this).text('Show Details [+]');
337
  }
338
  });
339
+ $('.include_post_type input[type=checkbox]').change(function(e){
340
+ var get_attr = $(this).attr('data-post-type');
341
+ if ( $('#yarpp-same_post_type').is(':checked') ) {
342
+ yarpp_enable_disabel_checkbox( $(this).is(':checked'), get_attr );
343
+ } else {
344
+ $('.yarpp_form_post_types #yarpp_post_type_' + get_attr).prop( "disabled", false );
345
+ }
346
+ });
347
+ $('#yarpp-same_post_type').change(function(e){
348
+ var get_checkboxes = '.include_post_type input[type=checkbox]';
349
+ if ( $(this).is(':checked') ) {
350
+ $(get_checkboxes).each(function () {
351
+ var get_attr = $(this).attr('data-post-type');
352
+ yarpp_enable_disabel_checkbox( $(this).is(':checked'), get_attr );
353
+ });
354
+ } else {
355
+ $('.yarpp_form_post_types input[type=checkbox]').prop( "disabled", false );
356
+ $('.yarpp_form_post_types input[type=checkbox]').siblings().hide();
357
+ }
358
+ });
359
+ function yarpp_enable_disabel_checkbox ( checked, get_attr ) {
360
+ if ( checked ) {
361
+ $('.yarpp_form_post_types #yarpp_post_type_' + get_attr).prop( "disabled", false );
362
+ $('.yarpp_form_post_types #yarpp_post_type_' + get_attr).siblings().hide();
363
+ } else {
364
+ $('.yarpp_form_post_types #yarpp_post_type_' + get_attr).prop( "disabled", true );
365
+ $('.yarpp_form_post_types #yarpp_post_type_' + get_attr).siblings().show();
366
+ }
367
+ }
368
  var yarpp_model = $(
369
  '\
370
  <div id="shareaholic-deactivate-dialog" class="shareaholic-deactivate-dialog" data-remodal-id="">\
{js → src/js}/options_switch.js RENAMED
File without changes
style/options_basic.css CHANGED
@@ -1,409 +1 @@
1
- #yarpp_author_text {
2
- width: 900px;
3
- }
4
-
5
- .yarpp-red {
6
- color: #dc3232;
7
- }
8
-
9
- .yarpp-no-float {
10
- float: none;
11
- margin-bottom: 5px;
12
- }
13
-
14
- .form-table td {
15
- line-height: 11px; /* to match the th's */
16
- }
17
-
18
- ul.yarpp_contacts li {
19
- padding: 0px 0px 0px 30px;
20
- line-height: 22px;
21
- }
22
-
23
- body.rtl ul.yarpp_contacts li {
24
- padding: 0px 30px 0px 0px;
25
- }
26
-
27
- ul.yarpp_contacts li a img {
28
- vertical-align: bottom;
29
- }
30
-
31
- /* hide pointer dismiss buttons on this page */
32
- .postbox .wp-pointer-buttons {
33
- display: none;
34
- }
35
-
36
- #tab-panel-faq, #tab-panel-dev {
37
- direction: ltr;
38
- }
39
-
40
- .icon {
41
- width: 22px;
42
- height: 22px;
43
- position: absolute;
44
- margin-left: -29px;
45
- margin-top: -1px;
46
- background-image: url('../images/sprites.png');
47
- }
48
-
49
- body.rtl .icon {
50
- margin-left: none;
51
- margin-right: -29px;
52
- }
53
-
54
- @media only screen and (-webkit-min-device-pixel-ratio: 1.5) {
55
- .icon {
56
- background-image: url('../images/sprites-2x.png');
57
- background-size: 132px 22px;
58
- }
59
- }
60
-
61
- .icon-wordpress {
62
- background-position: 0 0;
63
- }
64
-
65
- .icon-twitter {
66
- background-position: -22px 0;
67
- }
68
-
69
- .icon-plugin {
70
- background-position: -44px 0;
71
- }
72
-
73
- .icon-star {
74
- background-position: -66px 0;
75
- }
76
-
77
- .icon-pro {
78
- background-position: -88px 0;
79
- }
80
-
81
- .icon-facebook {
82
- background-position: -110px 0;
83
- }
84
-
85
- .icon.spin, .icon-star:hover {
86
- transform-origin: 11px 12px;
87
- -o-transform-origin: 11px 12px;
88
- -webkit-transform-origin: 11px 12px;
89
- -moz-transform-origin: 11px 12px;
90
- animation: 3s ease 2s normal none 1 yarpp-spin;
91
- -o-animation: 3s ease 2s normal none 1 yarpp-spin;
92
- -webkit-animation: 3s ease 2s normal none 1 yarpp-spin;
93
- -moz-animation: 3s ease 2s normal none 1 yarpp-spin;
94
- z-index: 1;
95
- }
96
-
97
- @keyframes yarpp-spin {
98
- 0% { transform: rotate(0deg) scale(1); }
99
- 5% { transform: rotate(0deg) scale(1.5); }
100
- 100% { transform: rotate(360deg) scale(1);}
101
- }
102
-
103
- @-moz-keyframes yarpp-spin {
104
- 0% { -moz-transform: rotate(0deg) scale(1); }
105
- 5% { -moz-transform: rotate(0deg) scale(1.5); }
106
- 100% { -moz-transform: rotate(360deg) scale(1);}
107
- }
108
-
109
- @-webkit-keyframes yarpp-spin {
110
- 0% { -webkit-transform: rotate(0deg) scale(1); }
111
- 5% { -webkit-transform: rotate(0deg) scale(1.5); }
112
- 100% { -webkit-transform: rotate(360deg) scale(1);}
113
- }
114
-
115
- a.info{
116
- position:relative;
117
- z-index:24;
118
- }
119
-
120
- .yarpp_help .wp-pointer-content p {
121
- text-align: left;
122
- font-family: sans-serif;
123
- }
124
-
125
- a.yarpp_help {
126
- text-decoration: none;
127
- cursor: pointer;
128
- }
129
-
130
- a.yarpp_help:hover {
131
- text-decoration: none;
132
- background-position: -520px -0px;
133
- }
134
-
135
- .exclude_terms span {
136
- display: inline-block;
137
- }
138
-
139
- #yarpp_display_optin.yarpp_attention {
140
- border: 2px solid #bbb;
141
- }
142
-
143
- .yarpp_subbox {
144
- margin-bottom: 5px;
145
- background: #fdfdfd;
146
- }
147
-
148
- .yarpp_form_row {
149
- overflow: visible;
150
- padding: 8px;
151
- }
152
-
153
- .yarpp_form_row > div {
154
- display: inline-block;
155
- vertical-align: top;
156
- }
157
-
158
- .yarpp_form_row > div > label {
159
- vertical-align: baseline;
160
- }
161
-
162
- .yarpp_form_checkbox > div {
163
- }
164
-
165
- .yarpp_form_select > div {
166
- padding-top: 5px;
167
- padding-bottom: 5px;
168
- }
169
-
170
- .yarpp_form_select + .yarpp_form_select {
171
- padding-top: 0px;
172
- }
173
-
174
- .yarpp_form_label {
175
- width: 25%;
176
- }
177
-
178
- .yarpp_form_label + div {
179
- padding-left: 16px;
180
- width: 70%;
181
- }
182
-
183
- .yarpp_form_textbox > .yarpp_form_label {
184
- }
185
-
186
- .yarpp_form_select > .yarpp_form_label {
187
- padding-top: 8px;
188
- }
189
-
190
- .yarpp_form_post_types label {
191
- padding-right: 15px;
192
- line-height: 20px;
193
- display: inline-block;
194
- }
195
-
196
- body.rtl .yarpp_form_post_types label {
197
- padding-right: inherit;
198
- padding-left: 15px;
199
- }
200
-
201
- .yarpp_form_exclude label {
202
- padding-right: 5px;
203
- line-height: 15px;
204
- }
205
-
206
- body.rtl .yarpp_form_exclude label {
207
- padding-right: inherit;
208
- padding-left: 5px;
209
- }
210
-
211
- .yarpp_form_template_file > .yarpp_form_label {
212
- vertical-align: top;
213
- padding-top: 5px;
214
- }
215
-
216
- .yarpp_code_display {
217
- border-left: 8px transparent solid;
218
- width: 50%;
219
- float: right;
220
- }
221
-
222
- body.rtl .yarpp_code_display {
223
- float: left;
224
- }
225
-
226
- .yarpp_code_display div {
227
- overflow: auto;
228
- max-height: 300px;
229
- }
230
-
231
- .yarpp_code_display pre {
232
- direction: ltr;
233
- }
234
-
235
- .yarpp_scroll_wrapper {
236
- overflow: auto;
237
- min-height: 25px;
238
- max-height: 100px;
239
- width: 60%;
240
- vertical-align: middle;
241
- }
242
-
243
- @media all and (max-width:1200px) {
244
- .yarpp_scroll_wrapper {
245
- width: 50%;
246
- }
247
- .yarpp_code_display {
248
- max-width: 60%;
249
- }
250
- }
251
-
252
- #yarpp-optin-learnmore {
253
- float: right;
254
- }
255
-
256
- body.rtl #yarpp-optin-learnmore {
257
- float: left;
258
- }
259
-
260
- .template_file_wrap, .template_author_wrap, .template_description_wrap {
261
- margin: 3px 0;
262
- }
263
-
264
- .template_file_wrap {
265
- font-family: monospace;
266
- }
267
-
268
- .yarpp_subbox input[type=text], .yarpp_subbox input[type=text] {
269
- font-family: monospace;
270
- width: 35%
271
- }
272
-
273
- .yarpp_form_template_buttons {
274
- padding: 0px;
275
- }
276
-
277
- .yarpp_template_button {
278
- position: relative;
279
- height: 60px;
280
- width: 70px;
281
- padding: 8px;
282
- -webkit-border-radius: 3px;
283
- border-radius: 7px;
284
- border: 1px solid #aaa;
285
- margin: 10px;
286
- margin-right: 5px;
287
- margin-bottom: 20px;
288
- cursor: pointer;
289
- background: #f3f3f3;
290
- background-image: -webkit-linear-gradient(top, #FEFEFE, #F4F4F4);
291
- background-image: -moz-linear-gradient(top, #FEFEFE, #F4F4F4);
292
- background-image: -o-linear-gradient(top, #FEFEFE, #F4F4F4);
293
- background-image: linear-gradient(top, #FEFEFE, #F4F4F4);
294
- color: #333;
295
- text-shadow: 0 1px 0 white;
296
- -webkit-box-shadow: 1px 1px 7px 1px #bbb;
297
- box-shadow: 1px 1px 7px 1px #bbb;
298
- }
299
-
300
- .yarpp_template_button.disabled, .yarpp_template_button.disabled:hover, .yarpp_template_button.disabled:active {
301
- -webkit-box-shadow: none;
302
- box-shadow: none;
303
- border-color: #ddd;
304
- background: #f3f3f3;
305
- background-image: -webkit-linear-gradient(top, #FEFEFE, #F4F4F4);
306
- background-image: -moz-linear-gradient(top, #FEFEFE, #F4F4F4);
307
- background-image: -o-linear-gradient(top, #FEFEFE, #F4F4F4);
308
- background-image: linear-gradient(top, #FEFEFE, #F4F4F4);
309
- }
310
-
311
- .yarpp_template_button.disabled > div.label {
312
- color: #bbb;
313
- }
314
-
315
- .yarpp_template_button:hover {
316
- border-color: #999;
317
- color: #222;
318
- }
319
-
320
- .yarpp_template_button:active, .yarpp_template_button.active {
321
- background: #eee;
322
- background-image: -webkit-linear-gradient(top, #eee, #f4f4f4);
323
- background-image: -moz-linear-gradient(top, #eee, #f4f4f4);
324
- background-image: -o-linear-gradient(top, #eee, #f4f4f4);
325
- background-image: linear-gradient(top, #eee, #f4f4f4);
326
- border-color: #999;
327
- text-shadow: 0 -1px 0 white;
328
- -webkit-box-shadow: inset 0 2px 8px -2px rgba( 0, 0, 0, 0.5 );
329
- box-shadow: inset 0 2px 8px -2px rgba( 0, 0, 0, 0.5 );
330
- }
331
-
332
- .yarpp_template_button > div.label {
333
- width: 70px;
334
- bottom: 8px;
335
- text-align: center;
336
- position: absolute;
337
- }
338
-
339
- .yarpp_template_button > div.image {
340
- width: 70px;
341
- height: 40px;
342
- background-image: url('../images/template-buttons-2x.png');
343
- background-size: 210px 40px;
344
- opacity: 0.8;
345
- }
346
-
347
- .yarpp_template_button.disabled > div.image {
348
- opacity: 0.2;
349
- }
350
-
351
- .yarpp_template_button:active > div.image {
352
- opacity: 1;
353
- }
354
-
355
- .yarpp_template_button[data-value=builtin] > div.image {
356
- background-position: 0px 0px;
357
- }
358
-
359
- .yarpp_template_button[data-value=thumbnails] > div.image {
360
- background-position: -70px 0px;
361
- }
362
-
363
- .yarpp_template_button[data-value=custom] > div.image {
364
- background-position: -140px 0px;
365
- }
366
-
367
- #optin_data_frame {
368
- overflow: scroll;
369
- max-height: 300px;
370
- direction: ltr;
371
- }
372
-
373
- #yarpp_extra_screen_settings {
374
- border-top: 1px solid #e0e0e0;
375
- }
376
-
377
- .help-tab-content {
378
- max-height: 500px;
379
- width: 100%;
380
- overflow: auto;
381
- }
382
-
383
- .yarpp_red {
384
- color:red;
385
- font-weight:bold
386
- }
387
-
388
- .yarpp_separated{
389
- display:inline-block;
390
- margin:1.5em 1em
391
- }
392
-
393
- .yarpp-callout{
394
- margin: 5px 0 15px;
395
- border: 1px solid #ccd0d4;
396
- border-left-width: 4px;
397
- padding: 1px 12px;
398
- }
399
- .yarpp-notice{
400
- border-left-color:#ffb900;;
401
- }
402
- .yarpp-disabled{
403
- color: #a7aaad!important;
404
- background: #f6f7f7!important;
405
- border-color: #dcdcde!important;
406
- box-shadow: none!important;
407
- text-shadow: none!important;
408
- cursor: not-allowed !important;
409
- }
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:5px;padding-top:5px}.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}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
style/options_switch.css CHANGED
@@ -1,161 +1 @@
1
- nbr {
2
- white-space: nowrap;
3
- }
4
-
5
- a{
6
- text-decoration: none;
7
- outline: none;
8
- }
9
-
10
- #yarpp_switch_container{
11
- position: relative;
12
- top:15px;
13
- }
14
-
15
- #yarpp_switch_tabs{
16
- position: relative;
17
- list-style: none;
18
- margin: 0 0 -7px 0;
19
- padding: 0;
20
- z-index: 1;
21
- color: #000;
22
- }
23
-
24
- #yarpp_switch_tabs li{
25
- display: inline-block;
26
- background-color: #f8f8f8;
27
- padding: 6px 10px;
28
- border: 1px solid #dfdfdf;
29
- border-bottom-color: #f8f8f8;
30
- border-top-left-radius: 5px;
31
- border-top-right-radius: 5px;
32
- }
33
-
34
- .disabled{
35
- background: #ededed;
36
- border-bottom-color: #dfdfdf;
37
- }
38
-
39
- #yarpp_switch_tabs a{
40
- color: #565656;
41
- }
42
-
43
- .disabled>a:hover{
44
- color: #000;
45
- text-shadow: 1px 1px 0.1em #aaa;
46
- margin-top: -1px;
47
- }
48
-
49
- .yarpp_switch_content{
50
- position: relative;
51
- width: 100%;
52
- background-color: #f8f8f8;
53
- background: -webkit-linear-gradient(#f8f8f8, #ededed);
54
- background: -moz-linear-gradient(#f8f8f8, #ededed);
55
- background: -ms-linear-gradient(#f8f8f8, #ededed);
56
- background: -o-linear-gradient(#f8f8f8, #ededed);
57
- background: linear-gradient(#f8f8f8, #ededed);
58
- border: 1px solid #dfdfdf;
59
- text-align: justify;
60
- margin-bottom: 25px;
61
- border-radius: 0 3px 3px 3px;
62
- }
63
-
64
- .yarpp_switch_content p,
65
- .yarpp_switch_content h1 {
66
- position: relative;
67
- margin: 15px 25% 15px 15px;
68
- }
69
-
70
- .yarpp_switch_content h1 {
71
- font-size: 1.2em;
72
- }
73
-
74
- .yarpp_switch_content p {
75
- line-height: 1.5em;
76
- }
77
-
78
- .yarpp_switch_content ul {
79
- float: left;
80
- line-height: 1.5em;
81
- padding-left: 75px;
82
- list-style: disc;
83
- }
84
-
85
- .yarpp_switch_content .to_corner {
86
- display: block;
87
- position: absolute;
88
- right: -32%;
89
- text-align: center;
90
- }
91
-
92
- #yarpp_pro_api_settings input[type="text"]{
93
- font-family: monospace;
94
- border-radius: 3px;
95
- width: 280px;
96
- }
97
-
98
- .yarpp_pro_label{
99
- display: inline-block;
100
- width: 75px;
101
- }
102
-
103
- .yarpp_warning {
104
- display: none;
105
- color: #F00;
106
- background-color: #ffcfd4;
107
- border: 1px solid #F00;
108
- padding: 2px 6px;
109
- margin-left: 1em;
110
- border-radius: 3px;
111
- }
112
-
113
- #yarpp_pro_api_settings #yarpp_pro_settings_submit[disabled]{
114
- border: none;
115
- padding: 8px;
116
- margin: 1px;
117
- }
118
-
119
- #yarpp-display-mode {
120
- margin: 1em 2em;
121
- }
122
-
123
- #yarpp-display-mode label {
124
- margin-right: 1em;
125
- }
126
-
127
- #yarpp-display-mode .spinner{
128
- width: 20px;
129
- height: 20px;
130
- display: inline-block;
131
- float: none;
132
- vertical-align: middle;
133
- }
134
-
135
- #yarpp_pro_disable_overlay{
136
- position: fixed;
137
- top: 0;
138
- bottom: 0;
139
- left: 0;
140
- right: 0;
141
- background-color: #EEE;
142
- opacity: 0.7;
143
- width: 100%;
144
- margin: 0;
145
- padding: 0;
146
- z-index: 100000;
147
- }
148
-
149
- #yarpp_pro_disable_confirm{
150
- position: fixed;
151
- top: 250px;
152
- left: 38%;
153
- background-color: #FFF;
154
- box-shadow: 0 0 1em -0.1em #F33;
155
- border: 2px solid #F55;
156
- text-align: justify;
157
- width: 25%;
158
- margin: 0;
159
- padding:1em 2em;
160
- z-index: 100001;
161
- }
1
+ nbr{white-space:nowrap}a{outline:none;text-decoration:none}#yarpp_switch_container{position:relative;top:15px}#yarpp_switch_tabs{color:#000;list-style:none;margin:0 0 -7px;padding:0;position:relative;z-index:1}#yarpp_switch_tabs li{background-color:#f8f8f8;border:1px solid #dfdfdf;border-bottom-color:#f8f8f8;border-top-left-radius:5px;border-top-right-radius:5px;display:inline-block;padding:6px 10px}.disabled{background:#ededed;border-bottom-color:#dfdfdf}#yarpp_switch_tabs a{color:#565656}.disabled>a:hover{color:#000;margin-top:-1px;text-shadow:1px 1px .1em #aaa}.yarpp_switch_content{background-color:#f8f8f8;background:linear-gradient(#f8f8f8,#ededed);border:1px solid #dfdfdf;border-radius:0 3px 3px 3px;margin-bottom:25px;position:relative;text-align:justify;width:100%}.yarpp_switch_content h1,.yarpp_switch_content p{margin:15px 25% 15px 15px;position:relative}.yarpp_switch_content h1{font-size:1.2em}.yarpp_switch_content p{line-height:1.5em}.yarpp_switch_content ul{float:left;line-height:1.5em;list-style:disc;padding-left:75px}.yarpp_switch_content .to_corner{display:block;position:absolute;right:-32%;text-align:center}#yarpp_pro_api_settings input[type=text]{border-radius:3px;font-family:monospace;width:280px}.yarpp_pro_label{display:inline-block;width:75px}.yarpp_warning{background-color:#ffcfd4;border:1px solid red;border-radius:3px;color:red;display:none;margin-left:1em;padding:2px 6px}#yarpp_pro_api_settings #yarpp_pro_settings_submit[disabled]{border:none;margin:1px;padding:8px}#yarpp-display-mode{margin:1em 2em}#yarpp-display-mode label{margin-right:1em}#yarpp-display-mode .spinner{display:inline-block;float:none;height:20px;vertical-align:middle;width:20px}#yarpp_pro_disable_overlay{background-color:#eee;bottom:0;left:0;margin:0;opacity:.7;padding:0;position:fixed;right:0;top:0;width:100%;z-index:100000}#yarpp_pro_disable_confirm{background-color:#fff;border:2px solid #f55;box-shadow:0 0 1em -.1em #f33;left:38%;margin:0;padding:1em 2em;position:fixed;text-align:justify;top:250px;width:25%;z-index:100001}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
style/related.css CHANGED
@@ -1,35 +1 @@
1
- .yarpp-related {
2
- margin: 1em 0;
3
- }
4
-
5
- .yarpp-related a {
6
- text-decoration: none;
7
- font-weight: bold;
8
- }
9
-
10
- .yarpp-related .yarpp-thumbnail-title {
11
- text-align: left;
12
- font-weight: bold;
13
- font-size: 96%;
14
- text-decoration: none;
15
- }
16
-
17
- .yarpp-related h3 {
18
- font-weight: bold;
19
- padding: 0 0 5px 0;
20
- font-size: 125%;
21
- text-transform: capitalize;
22
- margin: 0;
23
- }
24
-
25
- .yarpp-related .yarpp-promote {
26
- clear: both;
27
- background: url(//api.engage.bidsystem.com/adk_mini_logo.png) no-repeat;
28
- float: right;
29
- text-indent: -1000px;
30
- cursor: pointer;
31
- color: #666;
32
- font-size: 11px;
33
- height: 17px;
34
- width: 78px;
35
- }
1
+ .yarpp-related{margin:1em 0}.yarpp-related a{font-weight:700;text-decoration:none}.yarpp-related .yarpp-thumbnail-title{font-size:96%;font-weight:700;text-align:left;text-decoration:none}.yarpp-related h3{font-size:125%;font-weight:700;margin:0;padding:0 0 5px;text-transform:capitalize}.yarpp-related .yarpp-promote{background:url(//api.engage.bidsystem.com/adk_mini_logo.png) no-repeat;clear:both;color:#666;cursor:pointer;float:right;font-size:11px;height:17px;text-indent:-1000px;width:78px}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
style/styles_thumbnails.css CHANGED
@@ -1,21 +1 @@
1
- .yarpp-thumbnails-horizontal .yarpp-thumbnail, .yarpp-thumbnail-default, .yarpp-thumbnail-title {
2
- display: inline-block;
3
- }
4
- .yarpp-thumbnails-horizontal .yarpp-thumbnail {
5
- border: 1px solid rgba(127,127,127,0.1);
6
- vertical-align: top;
7
- }
8
- .yarpp-thumbnails-horizontal .yarpp-thumbnail > img, .yarpp-thumbnails-horizontal .yarpp-thumbnail-default {
9
- display: block;
10
- }
11
- .yarpp-thumbnails-horizontal .yarpp-thumbnail-title {
12
- font-size: 1em;
13
- max-height: 2.8em;
14
- line-height: 1.4em;
15
- text-decoration: inherit;
16
- overflow: hidden;
17
- }
18
-
19
- .yarpp-thumbnail-default {
20
- overflow: hidden;
21
- }
1
+ .yarpp-thumbnail-default,.yarpp-thumbnail-title,.yarpp-thumbnails-horizontal .yarpp-thumbnail{display:inline-block}.yarpp-thumbnails-horizontal .yarpp-thumbnail{border:1px solid hsla(0,0%,49.8%,.1);vertical-align:top}.yarpp-thumbnails-horizontal .yarpp-thumbnail-default,.yarpp-thumbnails-horizontal .yarpp-thumbnail>img{display:block}.yarpp-thumbnails-horizontal .yarpp-thumbnail-title{font-size:1em;line-height:1.4em;max-height:2.8em;overflow:hidden;text-decoration:inherit}.yarpp-thumbnail-default{overflow:hidden}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
style/yarpp-block-editor.css CHANGED
@@ -1,4 +1 @@
1
- .wp-block-yarpp-yarpp-block .yarpp-related-block a {
2
- pointer-events: none;
3
- cursor: default;
4
- }
1
+ .wp-block-yarpp-yarpp-block .yarpp-related-block a{cursor:default;pointer-events:none}
 
 
 
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.21.0
6
  Author: YARPP
7
  Author URI: https://yarpp.com/
8
  Plugin URI: https://yarpp.com/
@@ -24,7 +24,7 @@ if(!defined('WP_CONTENT_DIR')){
24
  define('WP_CONTENT_DIR', substr($tr,0,strrpos($tr,'/')));
25
  }
26
 
27
- define('YARPP_VERSION', '5.21.0');
28
 
29
  define('YARPP_DIR', dirname(__FILE__));
30
  /**
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.22.0
6
  Author: YARPP
7
  Author URI: https://yarpp.com/
8
  Plugin URI: https://yarpp.com/
24
  define('WP_CONTENT_DIR', substr($tr,0,strrpos($tr,'/')));
25
  }
26
 
27
+ define('YARPP_VERSION', '5.22.0');
28
 
29
  define('YARPP_DIR', dirname(__FILE__));
30
  /**