ishitaka
Forum Replies Created
-
Forum: Plugins
In reply to: [XO Featured Image Tools] its not importing image links that have _ in itHi,
It also works with URLs containing _ (underscore). Can you give me a URL that doesn’t work?
Forum: Plugins
In reply to: [XO Slider] 表示単位を画面サイズで変更する方法が知りたい。こんにちは
xo_slider_script_parameter フィルターフックを使用するのはどうでしょうか?
例:
function my_xo_slider_script_parameter( $params, $slide, $key ) { if ( 1234 == $slide->id ) { $params['slidesPerView'] = 1; $params['spaceBetween'] = 0; $params['breakpoints'] = [ // 480px 以上 '480' => [ 'slidesPerView' => 1.4, 'spaceBetween' => 5, ], ]; } return $params; } add_filter( 'xo_slider_script_parameter', 'my_xo_slider_script_parameter', 10, 3 );※ コード中の1234はスライダー ID です。
Forum: Plugins
In reply to: [XO Featured Image Tools] xo_featured_image_tools_image_urlについてリンク先を間違えてしまいました。
正しくはこちらです。
Forum: Plugins
In reply to: [XO Featured Image Tools] xo_featured_image_tools_image_urlについてこんにちは
新バージョン (1.11.0) で、投稿のコンテンツをフィルターするフック xo_featured_image_tools_post_content を追加しました。これで代用できませんか?
例:
add_filter( 'xo_featured_image_tools_post_content', function( $content, $post ) { $content = '<img src="https://example.com/sample.webp">'; return $content; }, 10, 2 );Forum: Plugins
In reply to: [XO Featured Image Tools] Default Image is predominateHi,
Thank you for your suggestion.
In terms of processing, the priority of the images is as suggested. However, I think the problem is that saving and previewing drafts adds the default image before the image is added to the post.
In the new version (1.10.0), we have added an option to exclude draft posts. Could this address the issue?
Forum: Plugins
In reply to: [XO Event Calendar] 休日設定画面でエラーが起こります(複数管理者権限使用)こんにちは
現象を再現できませんでした。
管理者2では、functions.phpで休日設定以外のサブメニューを非表示にするように設定しています。
こちらのカスタマイズが影響しているのかもしれません。一旦カスタマイズを解除して試してみてください。
Forum: Plugins
In reply to: [Full-Text Search] 1ファイルに設定可能な検索テキスト文字数の上限についてメディアの表示タイプで動作が異なります。
リスト表示の場合:
更新ボタンを押すと検索テキストも制限された文字数で更新されてしまいます。グリッド表示の場合:
検索テキストを変更しない限り更新されません。Forum: Plugins
In reply to: [Full-Text Search] 1ファイルに設定可能な検索テキスト文字数の上限について・mb_substr()に指定する数値は、文字種に関わらない文字数でしょうか。(ASCIIでもUTF-8漢字でも1文字で1カウント?)
文字数となります。
・今回の例だと、ファイルをアップロードした際の動作としては、ファイルの先頭から10万文字を検索テキストとして抽出するような動きになるのでしょうか。
このコードでは、自動抽出されるテキストの文字数は制限していません。編集画面で表示する検索テキストの文字数を制限しています。よって編集画面で検索テキストを更新すると、制限された文字列で保存されてしまいます。ご注意ください。
Forum: Plugins
In reply to: [Full-Text Search] 1ファイルに設定可能な検索テキスト文字数の上限についてこんにちは
1ファイルに設定可能な検索テキスト文字数に上限値はあるのでしょうか。
プラグインによる上限値は設けていません。システムの最大値(4G バイト)になると思います。
上限値がある場合、それを超えた文字数が自動抽出されるのを防ぐ方法はないでしょうか。
下記コードで、編集画面での文字数を制限(10万文字)することができます。
テーマの functions.php に、
if ( $full_text_search ) { remove_filter( 'attachment_fields_to_edit', array( $full_text_search->admin, 'attachment_fields_to_edit' ), 10, 2 ); add_filter( 'attachment_fields_to_edit', function( $form_fields, $post ) { global $full_text_search; if ( $full_text_search ) { $search_text = get_post_meta( $post->ID, Full_Text_Search::CUSTOM_FIELD_NAME, true ); if ( empty( $search_text ) ) { if ( $row = $full_text_search->get_fulltext_row( $post->ID ) ) { if ( 0 == $row->status ) { $search_text = $row->keywords; } } } $search_text = mb_substr( $search_text, 0, 100000 ); // 文字数を制限 $form_fields['search_text'] = array( 'label' => __( 'Search text', 'full-text-search' ), 'input' => 'textarea', 'value' => esc_textarea( $search_text ), 'helps' => __( 'This is the target text for full-text search. If you have enabled automatic text extraction, it will be stored here.', 'full-text-search' ) ); } return $form_fields; }, 10, 2 ); }※ コード中の「100000」が制限する文字数です。
Forum: Reviews
In reply to: [XO Featured Image Tools] Perfect tool with suggestion for improvementThere are no plans to add it for the time being, as we have to create a screen for entering the URL. excuse me.
Forum: Reviews
In reply to: [XO Featured Image Tools] Perfect tool with suggestion for improvementI think the following code will help.
add_filter( 'xo_featured_image_tools_image_url', function( $url ) { if ( 0 !== strpos( $url, 'https://example.com/' ) ) { return $url; } $ch = curl_init( $url ); curl_setopt_array( $ch, array( CURLOPT_HEADER => true, CURLOPT_NOBODY => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_SSL_VERIFYPEER => false, ) ); $content = curl_exec( $ch ); curl_close( $ch ); if ( preg_match( '/Location: (.*)/i', $content, $m ) ) { $url = esc_url( trim( $m[1] ) ); } return $url; } );Replace ‘example.com’ in the code with ‘server.livingdocs.io’, etc.
Forum: Reviews
In reply to: [XO Featured Image Tools] Perfect tool with suggestion for improvementHi,
This is a good suggestion and we have adopted it for version 1.9.0.
Thanks for the review and suggestions.Forum: Plugins
In reply to: [Full-Text Search] Can it include custom fields generated from ACF plugin?We haven’t heard back from you in a while. I’ve gone ahead and marked this thread as resolved.
If the problem is not solved yet, please open a new thread.
Thanks!Forum: Plugins
In reply to: [XO Event Calendar] Black dot shown next to the calendar sidebar widgetWe haven’t heard back from you in a while. I’ve gone ahead and marked this thread as resolved.
If the problem is not solved yet, please open a new thread.
Thanks!Forum: Plugins
In reply to: [XO Event Calendar] 連日イベントの表示についてこんな感じでしょうか?
.xo-event-calendar table { display: table; } .xo-event-calendar table tr { display: table-row; } .xo-event-calendar table th, .xo-event-calendar table td { display: table-cell; }