[wordpress插件] Daily logo每日徽标

wordpress 插件 文章 2020-04-11 20:20 422 0 全屏看文

AI助手支持GPT4.0

评分
100
描述

Daily logo is a simple and flexible plugin which allow users to display a different header/logo in their site every day.

每日徽标是一个简单灵活的插件,允许用户每天在其站点中显示不同的标题/徽标。

If you need to have a different logo every day or during a particular event with this plugin you can completely customize your site header/logo management.

如果您需要每天或在特定事件期间使用此插件使用不同的徽标,则可以完全自定义网站标题/徽标管理。

When you install and activate the plugin, an admin section is added.

在安装和激活插件时,将添加一个管理部分。

The section is composed by 2 pages, in the first one are automatically listed all your configured daily logos, in the second one, you can see a small legend and you can setup default look & feel templates.

该部分由两页组成,在第一页中会自动列出您配置的所有日常徽标,在第二页中,您会看到一个小图例,并且可以设置默认的外观模板。

You can provide a starting time and an ending time for every logo.

您可以为每个徽标提供开始时间和结束时间。

By default the start time is 00:00 and the end time is 23:59.

默认情况下,开始时间为00:00,结束时间为23:59。

You can provide 2 different templates for the header/logo HTML snippet.

您可以为标题/徽标HTML代码段提供2个不同的模板。

Imagine having different layout for desktop or mobile.

想象一下桌面或移动设备的布局不同。

The algorithm for choosing the templates is demanded to you.

您需要选择模板的算法。

There is 2 different actions that you can use:

您可以使用2种不同的操作:

    • daily_logo_show_today / daily_logo_show_today_alternative (display daily logo)
    • daily_logo_show_today / daily_logo_show_today_alternative(显示每日徽标)

    • daily_logo_show_date / daily_logo_show_date_alternative (display a custom date logo)
    • daily_logo_show_date / daily_logo_show_date_alternative(显示自定义日期徽标)

    Here you can find and example of template detection in a PHP template file (e.g. header.php):

    在这里您可以在PHP模板文件(例如header.php)中找到模板检测的示例:

    $is_mobile = false;

      $ is_mobile = false;

    if ($is_mobile) do_action( 'daily_logo_show_today_alternative' );

    如果($ is_mobile)do_action('daily_logo_show_today_alternative');

    else do_action( 'daily_logo_show_today' );

    其他do_action('daily_logo_show_today');

    $is_mobile = false;

    $ is_mobile = false;

    if ($is_mobile) do_action( 'daily_logo_show_date_alternative', 2015, 5, 12 );

    if($ is_mobile)do_action('daily_logo_show_date_alternative',2015,5,12);

    else do_action( 'daily_logo_show_date', 2015, 5, 12 );

    else do_action('daily_logo_show_date',2015,5,12);

    The action with the “alternative” suffix is used for the second template layout.

    后缀为“ alternate”的操作用于第二个模板布局。

    Usage

    用法

      1. Go to WP-Admin -> Daily Logo.
      2. 转到 WP-Admin->每日徽标

      3. Add, modify, clone or delete a daily logo or configure the default templates.
      4. 添加,修改,克隆或删除每日徽标或配置默认模板。

      5. Replace in your the logo HTML snippet with the following code do_action( 'daily_logo_show_today' ).
      6. 用以下代码 do_action('daily_logo_show_today')替换您的徽标HTML代码段。

      Links: Author’s Site

      链接:作者的网站

安装步骤

    1. Unzip the downloaded daily-logo zip file
    2. 解压缩下载的 daily-logo zip文件

    3. Upload the daily-logo folder and its contents into the wp-content/plugins/ directory of your WordPress installation
    4. daily-logo 文件夹及其内容上传到WordPress安装目录的 wp-content / plugins / 目录中

    5. Activate daily-logo from Plugins page
    6. 从“插件”页面激活 daily-logo

下载地址
https://downloads.wordpress.org/plugin/daily-logo.2.1.2.zip
-EOF-

AI助手支持GPT4.0