[wordpress插件] AnchorPress锚新闻

wordpress 插件 文章 2020-02-18 08:10 610 0 全屏看文

AI助手支持GPT4.0

评分
0
描述

It targets all h1, h2, etc… used in WP post content editor and add an automatic link

它以WP帖子内容编辑器中使用的所有h1,h2等为目标,并添加了自动链接

to each part.

每个部分。

For developers : Using filters

对于开发人员:使用过滤器

Filters :

过滤器:

    • anchorpress_want_anchors_condition
    • anchorpress_want_anchors_condition

    • anchorpress_href_classes
    • anchorpress_href_classes

    • anchorpress_unicode

      anchorpress_unicode

      add_filter( ‘anchorpress_href_classes’, ‘custom_anchorpress_href_classes’ );
       

      add_filter(``anchorpress_href_classes'',``custom_anchorpress_href_classes'');
       

      function custom_anchorpress_href_classes( $classes ) {
          

      函数custom_anchorpress_href_classes($ classes){
          

      $classes[] = ‘test’;
          

      $ classes [] =‘test’;
          

      return $classes;
       

      返回$ classes;
       

      }

      }

安装步骤

    1. Upload the plugin files to the /wp-content/plugins/anchorpress directory, or install the plugin through the WordPress plugins screen directly.
    2. 将插件文件上传到 / wp-content / plugins / anchorpress 目录,或直接通过WordPress插件屏幕安装插件。

    3. Activate the plugin through the ‘Plugins’ screen in WordPress
    4. 通过WordPress中的“插件”屏幕激活插件

下载地址
https://downloads.wordpress.org/plugin/anchorpress.zip
-EOF-

AI助手支持GPT4.0