最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【未解决】更新并优化WordPress插件同步印象笔记evernote-sync

同步 crifan 943浏览 0评论
之前已经在用WordPress的插件:
Evernote Sync – WordPress plugin | WordPress.org
https://wordpress.org/plugins/evernote-sync/
去同步自己的印象笔记的帖子到自己的WordPress网站 crifan.com 中了:
不过用的是:
现在:
  • 想要升级到最近的 2.0.6版本
    • 且 想要额外加上 处理我此处同步印象笔记到WordPress后 帖子中有多余的code的问题
后记:
发现新版能检测token过期并提示了:
授权过期,请重新授权
问题现象:
印象笔记中的帖子中有code代码
(xxx_process) bash-3.2$ brew reinstall openssl
==> Reinstalling openssl
同步后帖子
https://www.crifan.com/mac_pipenv_run_pyspider_importerror_pycurl_libcurl_link_time_ssl_backend_openssl_is_different_from_compile_time_ssl_backend_none_other/
就多余出一个code,以及code中有 大于号,小于号等 html中需要转义的entity实体字符,则也会被处理转义:
<code>(xxx_process) bash-3.2$ brew reinstall openssl
==&gt; Reinstalling openssl
后记:
无意间发现半年前的一些帖子:
同步发布后,没有多余code:
https://www.crifan.com/jquery_html_element_click_event_not_work/
也很奇怪啊。
要去本地调试WordPress插件:evernote-sync
即php代码
找到解决和过滤的办法
先去建一个帖子用于测试同步
先做些准备工作:
先去下载最新的插件代码
Evernote Sync – WordPress plugin | WordPress.org
https://wordpress.org/plugins/evernote-sync/
-》
解压evernote-sync.zip
另外去对比对比
  • 2.0.6
  • 1.2.16
和之前有多少区别:
看到是mo和po都变了
说明翻译的内容都有更新
再去看主体内容:
evernote-sync.php
总体上改动不是很大
然后也看到了:
之前自己优化和修复bug的地方:
                    //追加别名post_name = slug
                    if (!empty($note->attributes->sourceURL)){
                        $my_post['post_name'] = $note->attributes->sourceURL;
                    }

                    // 追加发布时间
                    if (get_option('evernotesync_publish_time') == 2) {
                        // $my_post['post_date'] = date("Y-m-d h:i:s", $noteCreated / 1000);
                        $my_post['post_date_gmt'] = gmdate("Y-m-d H:i:s", $noteCreated / 1000);
                    }
然后把evernote-sync放到mamp的对应位置
以及同步自己的改动:
再去想办法,mac本地搭建调试php的环境:
【未解决】mac中如何在MAMP中调试WordPress的php代码

转载请注明:在路上 » 【未解决】更新并优化WordPress插件同步印象笔记evernote-sync

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
80 queries in 0.179 seconds, using 22.12MB memory