Download the PHP package itmar/block-class-package without Composer

On this page you can find all versions of the php package itmar/block-class-package. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package block-class-package

block-class-package

概要

Gutenbergのブロック登録に関連して、必要なPHPの関数をcomposerで読み込むためのファイルをパッケージにまとめました。

インストール

コマンドプロンプト等から次のように入力してください。

収納されているネームスペース・クラス

namespace Itmar\BlockClassPakage;
class ItmarEntryClass class ItmarAccessClass

変更履歴

= 1.2.0 =
アクセスカウンターの実装のため、meta情報としてview_counterというキーを登録する関数をもつItmarAccessClassを追加

= 1.1.1 =
enqueueCommonStylesメソッドに渡すファイルパスをプラグインのルートフォルダより上位のフォルダ内のファイルパスを渡すことができるように修正

= 1.1.0 =
enqueueCommonStylesメソッドを追加

= 1.0.4 =

= 1.0.3 =
wp_set_script_translationsのハンドルを"ブロック名-editor-script"とすることでblock.jsonにデフォルトで設定されている"editorScript": "file:./index.js",を維持しながら、wp_set_script_translationsの機能を維持するようにした。

= 1.0.2 =
WordPress6.5対応のためwp_register_scriptではなくwp_enqueue_scriptでハンドルを使用するようにしました。

= 1.0.1 =
引数名のスペルミスを修正しました。

= 1.0.0 =
最初のリリース

メソッドの機能と引数

block_init(string $text_domain, string $file_path)

説明

$filepath内に含まれている複数のブロックを登録します。同時にPHPとJavascriptの翻訳関数をセットします。翻訳のためのpot,po,moの各ファイルはプラグインのルートフォルダ内のlanguagesフォルダに配置されていることが必要です。 また、WordPressの関数で取得する変数をフロントエンドのJavaScriptで使用できるようにローカライズします。 ローカライズされた変数はテキストドメイン名の'-'を''に置換した名称のオブジェクトに次のように収納されます。
home_url・・・WordPressサイトのホームURL
plugin_url・・・プラグインルートのURL

引数

activation_check(array $plugin_data, array $plugin_slug)

説明

$plugin_slugで指定された名称のプラグインがインストール又は有効化されていない場合、そのプラグイン名等(最初に発見された1つだけ)を表示して、処理を中止します。

引数

show_admin_dependency_notices(array $plugin_data, array $plugin_slug)

説明

$plugin_slugで指定された名称のプラグインがインストール又は有効化されていない場合、そのプラグイン名等(最初に発見された1つだけ)を管理画面に表示させます。

引数

enqueueCommonStyles(string $filePath, boolean $isEditor, string $packageName)

説明

インストールされているnpmパッケージ内のindex.css、style-index.cssをエンキューします。依存元のプラグインで、この関数を実行することで、依存しているプラグインでも共通のCSSを充てることができます。

引数

get_post_count(int $id = 0)

説明

$idで指定された投稿データに紐づいたview_counterキーの値を返す。

引数

戻り値

IDの数値

呼び出し例

set_post_count()

説明

表示されたシングルページがもつ$idに紐づいたview_counterキーの値を更新する(カウントアップ)。

引数

なし

戻り値

なし

呼び出し例


All versions of block-class-package with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package itmar/block-class-package contains the following files

Loading the files please wait ....