[wordpress插件] Cloud2PNG云2PNG

wordpress 插件 文章 2020-03-25 20:00 529 0 全屏看文

AI助手支持GPT4.0

评分
0
描述

Capture snapshots of any website using the Cloudinary URL2PNG add-on.

使用 Cloudinary URL2PNG插件捕获任何网站的快照。

Use

使用

Add link to the site you’d like to create a snapshot of, by using the [cloud2png] shortcode, eg:

使用 [cloud2png] 短码将链接添加到您要创建快照的网站,例如:

[cloud2png url="https://wordpress.org"]

  [cloud2png url =“ https://wordpress.org”]

Customize the snapshots

自定义快照

Using the Cloud2PNG Customizer you can change the size and border of the snapshots.

使用Cloud2PNG Customizer,您可以更改快照的大小和边框。

Shortcode parameters

简码参数

You can override the Cloud2PNG Customizer using the shortcode parameters, they are (with defaults):

您可以使用shortcode参数覆盖Cloud2PNG Customizer,它们是(具有默认值):

    • url=home_url( ‘/’ )
    • url = home_url(‘/’)

    • width=430
    • width = 430

    • height=225
    • height = 225

    • border_width=0
    • border_width = 0

    • border_radius=0
    • border_radius = 0

    • border_color=#000000

      border_color =#000000

      [cloud2png url=”https://wordpress.org” width=”300″ height=”400″ border_width=”5″]

      [cloud2png url =” https://wordpress.org” width =” 300” height =” 400” border_width =“ 5”]

    Adding Cloud2PNG to a theme

    将Cloud2PNG添加到主题

    Using do_shortcode(), you can add Cloud2PNG to a theme:

    使用 do_shortcode(),您可以将Cloud2PNG添加到主题:

    p>

    >

    echo do_shortcode( 'url="https://wordpress.org" width="300" height="400" border_width="5' );

      echo do_shortcode('url =“ https://wordpress.org” width =“ 300” height =“ 400” border_width =“ 5');

    or using the shortcode_atts_{$shortcode} filter:

    或使用 shortcode_atts _ {$ shortcode} 过滤器:

    add_filter ('shortcode_atts_cloud2png', 'add_url', 10, 3);

      add_filter('shortcode_atts_cloud2png','add_url',10,3);

    function add_url ($out, $pairs, $atts ) {    

    函数add_url($ out,$ pairs,$ atts){    

    $out['url'] = 'https://soderlind.no';    

    $ out ['url'] ='https://soderlind.no';    

    return $out;

    返回$ out;

    }

    }

    Sidenote

    侧注

    I code for fun, and I code to learn.

    我编写代码是为了娱乐,我编写代码来学习。

    I’ve tried to do this plugin using OOP at my best effort.

    我已尽力使用OOP制作此插件。

    There will be couplings that could be looser and not everything is DRY.

    联轴器可能会松动,并非所有零件都是干的。

    I will update the plugin as I learn more and I will fix issues that are reported.<

    当我了解更多信息时,我将更新插件,并修复已报告的问题

    /p>

    / p>

    I'm following the WordPress Coding Standards with one exception,

    除了一个例外,我正在遵守 WordPress编码标准

    I'm using the PSR-4 autoloader and I've disabled the following

    我正在使用 PSR-4自动加载器,并且禁用了以下功能

    rules:

    规则:

        

          

        

        

        

        

    Credits

    信用

    Cloud2PNG is using:

    Cloud2PNG正在使用:

      • The Plugin Customizer framework.
      • 插件自定义程序框架。

      • The WordPress Customizer Range Value Control.
      • WordPress定制程序范围值控制

      • The PHP extension for Cloudinary
      • Cloudinary的PHP扩展

      • The

      • >PSR-4 Autoloader

      • > PSR-4自动装带器

      • The jQuery boxShadow cssHooks, Copyright (c) 2010

      • jQuery boxShadow cssHooks ,版权所有(c)2010

        Burin Asavesna (http://helloburin.com)

        Burin Asavesna(http://helloburin.com)

        Copyright and License

        版权和许可

        Cloud2PNG is copyright 2017 Per Soderlind

        Cloud2PNG的版权归Soderlind所有,2017年

        Cloud2PNG is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version

        Cloud2PNG是免费软件:您可以根据自由软件基金会发布的GNU通用公共许可证的条款(许可证的版本2)或(可选)任何更高版本来重新分发和/或修改它。

        .

        Cloud2PNG is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;

        分发

        Cloud2PNG希望它会有用,但没有任何保证;

        without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

        甚至没有对适销性或特定用途适用性的暗示保证。

        See the GNU General Public License for more details.

        有关更多详细信息,请参见GNU通用公共许可证。

        You should have received a copy of the GNU Lesser General Public License along with the Extension.

        您应该已经收到了GNU通用通用公共许可证的副本以及扩展名。

        If not, see http://www.gnu.org/licenses/.

        如果没有,请参见http://www.gnu.org/licenses/。

安装步骤

Prerequisites

先决条件

    When you have the prerequisites:

    具有先决条件时:

      1. In Plugins->Add New, search for Cloud2PNG
      2. 在Plugins-> Add New中,搜索Cloud2PNG

      3. Click Install Now
      4. 点击立即安装

      5. When the plugin is installed, activate it.
      6. 安装插件后,将其激活。

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

AI助手支持GPT4.0