Plugin Directory

Changeset 3125790


Ignore:
Timestamp:
07/26/2024 08:36:25 AM (19 months ago)
Author:
ircf
Message:

1.30 : Fixed permalink required bug, Sirtaqui v3 : Added view feed link

Location:
feed2post-ircf/trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • feed2post-ircf/trunk/README.txt

    r3086928 r3125790  
    44Tags: csv import, import csv, excel import, import excel, xls import, import xls, xlsx import, import xlsx, xml import, import xml, ods import, import ods, json import, import json, sql import, import sql, pdo import, import pdo, feed import, import feed, rss import, import rss, sirtaqui, import users, import posts, tourinsoft, ac3, immo-facile
    55Requires at least: 3.0.1
    6 Tested up to: 6.5
     6Tested up to: 6.6
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
    9 Stable tag: 1.29
     9Stable tag: 1.30
    1010Requires PHP: 7.0
    1111
     
    116116== Changelog ==
    117117
     118= 1.30 =
     119Fixed permalink required bug.
     120Sirtaqui v3 : Added view feed link.
     121
    118122= 1.29 =
    119123Added delete trash posts.
  • feed2post-ircf/trunk/feed2post.php

    r3086928 r3125790  
    44 * Plugin URI: https://ircf.fr
    55 * Description: Import CSV, XLS, XML, RSS, JSON, SQL, SIRTAQUI and many more feed types
    6  * Version: 1.29
     6 * Version: 1.30
    77 * Author: IRCF
    88 * Author URI: https://ircf.fr/
     
    10131013  wp_register_style( 'feed2post-style', false );
    10141014  wp_enqueue_style( 'feed2post-style' );
    1015   wp_add_inline_style( 'feed2post-style', get_feed2post_feed_style() );
     1015  $style = get_feed2post_feed_style();
     1016  if (!empty($style)) wp_add_inline_style( 'feed2post-style', $style );
    10161017}
    10171018
  • feed2post-ircf/trunk/includes/feed/feed2post-csv.php

    r3050300 r3125790  
    22class Feed2Post_Csv extends Feed2Post_Feed{
    33
    4   protected $url;
    54  protected $encoding;
    65  protected $separator;
  • feed2post-ircf/trunk/includes/feed/feed2post-excel.php

    r3050300 r3125790  
    22class Feed2Post_Excel extends Feed2Post_Feed{
    33
    4   protected $url;
    54  protected $sheet_name;
    65  protected $header;
  • feed2post-ircf/trunk/includes/feed/feed2post-json.php

    r3063729 r3125790  
    22class Feed2Post_Json extends Feed2Post_Feed{
    33
    4   protected $url;
    54  protected $query;
    65
  • feed2post-ircf/trunk/includes/feed/feed2post-sirtaqui-v3.php

    r3063729 r3125790  
    1616    $this->url = $this->get_meta('url');
    1717    $this->query = $this->get_option('query');
     18  }
     19
     20  function get_syndication_id(){
     21    return $this->syndication_id;
    1822  }
    1923
     
    7781
    7882add_filter('feed2post_feed_types', 'feed2post_feed_type_sirtaqui_v3', 80);
     83
     84function feed2post_sirtaqui_v3_options_meta_box_field($field, $name, $feed){
     85  if ($name == 'syndication_id' && $feed->get_syndication_id()){
     86    echo '<div style="float: right">';
     87    echo sprintf(__('<a target="_blank" href="%s">View feed</a>', 'feed2post'), esc_url($feed->get_url()));
     88    echo '</div>';
     89  }
     90}
     91
     92add_action('feed2post_options_meta_box_field', 'feed2post_sirtaqui_v3_options_meta_box_field', 80, 3);
  • feed2post-ircf/trunk/includes/feed/feed2post-xml.php

    r3079320 r3125790  
    22class Feed2Post_Xml extends Feed2Post_Feed{
    33
    4   protected $url;
    54  protected $query;
    65
  • feed2post-ircf/trunk/includes/feed2post-feed.php

    r3086928 r3125790  
    66  protected $post_title;
    77  protected $post_type;
    8   protected $post_type_exists;
    98  protected $permalink;
     9  protected $url;
    1010  protected $fields;
    1111  protected $posts_updated_at;
     
    7272  function get_post_title(){
    7373    return $this->post_title;
     74  }
     75
     76  function get_url(){
     77    return $this->url;
    7478  }
    7579
     
    515519      if ($name == 'post_type'){
    516520        $attributes .= ' data-autocomplete="' . implode(',', get_post_types() + array('user')) . '"';
    517         if (!$this->post_type_exists) $attributes .= ' data-origin="' . $this->post_type . '"';
    518       }
     521        if (!empty($this->permalink)) $attributes .= ' data-origin="' . $this->post_type . '"';
     522      }
     523      do_action('feed2post_options_meta_box_field', $field, $name, $this);
    519524      echo sprintf($field['template'], 'feed_options['.esc_attr($name).']', esc_attr($value), $attributes); // Attributes cannot be escaped
    520525      if (isset($field['description'])) echo '<br/><span class="description">'.$field['description'].'</span>'; // Field description might contain <a> tags so we cannot escape it
     
    724729    $supports_custom_fields = $this->get_option('supports_custom_fields');
    725730    if ($supports_custom_fields) $supports[] = 'custom-fields';
    726     $this->post_type_exists = post_type_exists($this->post_type);
    727     if (!$this->post_type_exists){
     731    if (!post_type_exists($this->post_type)){
    728732      register_post_type($this->post_type, array(
    729733        'label' => $this->post_title,
Note: See TracChangeset for help on using the changeset viewer.