<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de">
	<id>https://wiki.sehanka.de/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=77.191.15.18</id>
	<title>wiki.sehanka.de - Benutzerbeiträge [de]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.sehanka.de/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=77.191.15.18"/>
	<link rel="alternate" type="text/html" href="https://wiki.sehanka.de/index.php?title=Spezial:Beitr%C3%A4ge/77.191.15.18"/>
	<updated>2026-04-21T11:12:01Z</updated>
	<subtitle>Benutzerbeiträge</subtitle>
	<generator>MediaWiki 1.36.0</generator>
	<entry>
		<id>https://wiki.sehanka.de/index.php?title=WordPress-Plugin_entwickeln_(HowTo)&amp;diff=117</id>
		<title>WordPress-Plugin entwickeln (HowTo)</title>
		<link rel="alternate" type="text/html" href="https://wiki.sehanka.de/index.php?title=WordPress-Plugin_entwickeln_(HowTo)&amp;diff=117"/>
		<updated>2021-09-01T14:03:59Z</updated>

		<summary type="html">&lt;p&gt;77.191.15.18: /* Einstieg in die Plugin Entwicklung */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Arbeitsschritte =&lt;br /&gt;
&lt;br /&gt;
== Schritt 1: Plugin anlegen ==&lt;br /&gt;
&lt;br /&gt;
* unter &amp;quot;wp-content/plugins/&amp;quot; einen Ordner mit dem Namen des Plugins anlegen, z. B. &amp;quot;my-plugin&amp;quot;&lt;br /&gt;
* im Ordner eine php-Datei anlegen, z. B. &amp;quot;my-plugin.php&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 *Plugin Name: My Plugin&lt;br /&gt;
 *Description: Management/Display Plugin for Projects.&lt;br /&gt;
 **/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* danach ist das Plugin im WordPress Backend unter Plugins sichtbar&lt;br /&gt;
&lt;br /&gt;
== Schritt 3: ggf. Custom Post Types registrieren ==&lt;br /&gt;
&lt;br /&gt;
[[WordPress Custom Post Types registrieren (HowTo)]]&lt;br /&gt;
&lt;br /&gt;
== Schritt 4: Plugin-Menü anlegen oder erweitern ==&lt;br /&gt;
&lt;br /&gt;
=== 4a) Struktur für eigenes Plugin-Menü anlegen ===&lt;br /&gt;
&lt;br /&gt;
==== Plugin-Unterseiten anlegen ====&lt;br /&gt;
&lt;br /&gt;
* in &amp;quot;wp-content/plugins/my-plugin&amp;quot; einen Ordner &amp;quot;views&amp;quot; anlegen&lt;br /&gt;
* im Ordner views drei PHP-Dateien anlegen, z. B.:&lt;br /&gt;
** all-custom-post-types.php&lt;br /&gt;
** usage.php&lt;br /&gt;
** settings.php&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
defined( 'ABSPATH' ) or die();&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Alle Custom Posts&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
    &amp;lt;p&amp;gt;Das scheint zu funktionieren!&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Plugin Menü im Backend anzeigen ====&lt;br /&gt;
&lt;br /&gt;
* in der Datei &amp;quot;wp-content/plugins/my-plugin.php&amp;quot; Menüstruktur anlegen&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function my_plugin_test_admin_menu_option() {&lt;br /&gt;
    add_menu_page(&lt;br /&gt;
        'My Plugin',&lt;br /&gt;
        'My Plugin',&lt;br /&gt;
        'manage_options',&lt;br /&gt;
        'my-plugin-test-admin-menu',&lt;br /&gt;
        function() {},&lt;br /&gt;
        'dashicons-location-alt',&lt;br /&gt;
        3 );&lt;br /&gt;
&lt;br /&gt;
    add_submenu_page(&lt;br /&gt;
        'my-plugin-test-admin-menu',&lt;br /&gt;
        'Alle Datensätze',&lt;br /&gt;
        'Alle Datensätze',&lt;br /&gt;
        'manage_options',&lt;br /&gt;
        'my-plugin-test-admin-menu',&lt;br /&gt;
        function() {&lt;br /&gt;
            include 'views/all-custom-post-types.php';&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
    add_submenu_page(&lt;br /&gt;
        'my-plugin-test-admin-menu',&lt;br /&gt;
        'Nutzungshinweise',&lt;br /&gt;
        'Nutzungshinweise',&lt;br /&gt;
        'manage_options',&lt;br /&gt;
        'project_usage_page',&lt;br /&gt;
        function() {&lt;br /&gt;
            include 'views/usage.php';&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
    add_submenu_page(&lt;br /&gt;
        'my-plugin-test-admin-menu',&lt;br /&gt;
        'Einstellungen',&lt;br /&gt;
        'Einstellungen',&lt;br /&gt;
        'manage_options',&lt;br /&gt;
        'project_settings_page',&lt;br /&gt;
        function() {&lt;br /&gt;
            include 'views/settings.php';&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
add_action( 'admin_menu', 'my_plugin_test_admin_menu_option' );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 4b) Bestehendes Menü erweitern ===&lt;br /&gt;
&lt;br /&gt;
==== in bestehenden WordPress Modulen integrieren ====&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;show_in_menu&amp;quot;-Argument in $args-Array (Voraussetzung: &amp;quot;show_ui&amp;quot; muss Wert &amp;quot;true&amp;quot; haben)&lt;br /&gt;
** ‘false’ – do not display in the admin menu&lt;br /&gt;
** ‘true’ – display as a top level menu&lt;br /&gt;
** ‘some string’ für eine existierende Top Level Page, z.B.&lt;br /&gt;
*** ‘tools.php’ für Werkzeuge-Menü &lt;br /&gt;
*** ‘edit.php?’ für Beiträge-Menü&lt;br /&gt;
*** ‘edit.php?post_type=page’ für Seiten-Menü&lt;br /&gt;
&lt;br /&gt;
==== in bestehenden Custom Post Type integrieren ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/**&lt;br /&gt;
 * Menü um zwei Unterpunkte erweitern&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
function product_admin_menu_option() {&lt;br /&gt;
    add_submenu_page(&lt;br /&gt;
        'edit.php?post_type=product',&lt;br /&gt;
        'Nutzungshinweise',&lt;br /&gt;
        'Nutzungshinweise',&lt;br /&gt;
        'manage_options',&lt;br /&gt;
        'product-usage-page',&lt;br /&gt;
        'product_usage_page_callback'&lt;br /&gt;
    );&lt;br /&gt;
&lt;br /&gt;
    add_submenu_page(&lt;br /&gt;
        'edit.php?post_type=product',&lt;br /&gt;
        'Optionen',&lt;br /&gt;
        'Optionen',&lt;br /&gt;
        'manage_options',&lt;br /&gt;
        'product-options-page',&lt;br /&gt;
        'product_options_page_callback'&lt;br /&gt;
    );&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function product_usage_page_callback() {&lt;br /&gt;
    include 'views/usage.php';&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function product_options_page_callback() {&lt;br /&gt;
    include 'views/settings.php';&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
https://wordpress.org/support/topic/custom-post-types-in-admin-menu/&lt;br /&gt;
&lt;br /&gt;
== Schritt 4: Templates entwickeln ==&lt;br /&gt;
&lt;br /&gt;
[[WordPress Templates entwickeln (HowTo)]]&lt;br /&gt;
&lt;br /&gt;
= Quellen =&lt;br /&gt;
&lt;br /&gt;
==Einstieg in die Plugin Entwicklung==&lt;br /&gt;
&lt;br /&gt;
Shortcodes&lt;br /&gt;
* https://studentenwebdesign.de/wordpress-plugin-erstellen-tutorial/&lt;br /&gt;
* https://kinsta.com/de/blog/wordpress-shortcodes/&lt;br /&gt;
* http://www.tipps.1st-tec.de/wordpress/39-wordpress/120-shortcode-in-wordpress.html&lt;br /&gt;
* http://liamghilardi.net/tutorial-ein-eigenes-wordpress-plugin-programmieren/&lt;br /&gt;
* https://361.de/blog/1041-einstieg-in-die-wordpress-plugin-entwicklung-teil-1.html&lt;br /&gt;
* https://scotch.io/tutorials/how-to-build-a-wordpress-plugin-part-1&lt;br /&gt;
* http://t3n.de/magazin/plugin-entwicklung-wordpress-einfach-selber-229590/2/&lt;br /&gt;
&lt;br /&gt;
Video&lt;br /&gt;
* https://www.youtube.com/watch?v=xQNhRS8zHPs&lt;br /&gt;
&lt;br /&gt;
==Eigene Datenbank==&lt;br /&gt;
&lt;br /&gt;
* http://www.blackzet.com/eigene-datenbank-tabellen-wordpress/&lt;br /&gt;
&lt;br /&gt;
Video &lt;br /&gt;
* https://www.youtube.com/watch?v=4IwNiCgM6lU&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Tabellen im WordPressstyle==&lt;br /&gt;
&lt;br /&gt;
* http://www.sitepoint.com/using-wp_list_table-to-create-wordpress-admin-tables/&lt;br /&gt;
* http://wpengineer.com/2426/wp_list_table-a-step-by-step-guide/&lt;br /&gt;
&lt;br /&gt;
[[Kategorie:WordPress]]&lt;/div&gt;</summary>
		<author><name>77.191.15.18</name></author>
	</entry>
</feed>