You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<h4>Available in file: <code><pre>setting/setting-component.php</pre></code></h4>
39
+
<ul>
40
+
<li class="filter">
41
+
<p><b>Filter Hook:</b>Force change all submenu page user capability at once</p>
42
+
<small><em>This can be useful for forcing all submenu pages accessible to users that have a particular capability instead of changing `cap` value from each child-class.</em></small>
43
+
<p>Paramter passed: <b>$cap -> user capability</b></p>
44
+
<code>hzfex_set_setting_page_capability</code>
45
+
</li>
46
+
<li class="filter">
47
+
<p><b>Filter Hook:</b>Force change menu slug for all child-class submenu pages at once</p>
48
+
<small><em>Useful if want to get all child-class to have same main menu even though it had different menu set.</em></small>
49
+
<p>Paramter passed: <b>$menu -> main menu slug</b></p>
50
+
<code>hzfex_set_setting_main_menu_slug</code>
51
+
</li>
52
+
<li class="action">
53
+
<p><b>Action Hook:</b>After successful hooking as submenu page</p>
54
+
<small><em>This hook is present just after <code>admin_menu</code> hook. Use it as you need.</em></small>
<p><b>Action Hook:</b>After successful loading of each submenu page</p>
60
+
<small><em>This hook is present just after <code>load-{submenu_page}</code> hook. Accessible to only child-class pages and not available globally.</em></small>
<p><b>Filter Hook:</b>Display section tabs if page has a single section?</p>
65
+
<small><em>This hook controls whether or not to show section tabs if page has only one section. <br>Hint: This page has four section tabs.</em></small>
66
+
<p>Paramter passed: <b>$show -> boolean: default is false</b></p>
<small><em>This hook can let you modify page navigation links on left. (maybe use it to add other admin page link, or even external links).</em></small>
72
+
<p>Paramter passed: <b>$nav -> array of navigation links data</b></p>
73
+
<code>hzfex_set_setting_page_nav_links</code>
74
+
</li>
75
+
<li class="filter">
76
+
<p><b>Filter Hook:</b>Modify setting page head image</p>
77
+
<small><em>This hook can let you modify header image (currently set to <b>big white gear image</b> on green background).</em></small>
78
+
<p>Paramter passed: <b>$head_image -> URL link to head image</b></p>
79
+
<code>hzfex_set_setting_page_head_image</code>
80
+
</li>
81
+
<li class="filter">
82
+
<p><b>Filter Hook:</b>Modify setting zpage head title</p>
83
+
<small><em>This hook can let you modify header title (currently set to <b>TWS Setting Framework</b> below big white gear image).</em></small>
84
+
<p>Paramter passed: <b>$head_title -> title that will be displayed in <code><?=htmlspecialchars( '<h1>' ); ?></code> tag</b></p>
85
+
<code>hzfex_set_setting_head_title</code>
86
+
</li>
87
+
<li class="action">
88
+
<p><b>Action Hook:</b>Add contents before page head</p>
89
+
<small><em>This hook is present above the setting page head. Use it as you need.</em></small>
90
+
<br><code>hzfex_before_setting_page_head</code>
91
+
</li>
92
+
<li class="action">
93
+
<p><b>Action Hook:</b>Add contents after page head</p>
94
+
<small><em>This hook is present below the setting page head. Use it as you need.</em></small>
95
+
<br><code>hzfex_after_setting_page_head</code>
96
+
</li>
97
+
<li class="action">
98
+
<p><b>Action Hook:</b>Add contents before page navigation</p>
99
+
<small><em>This hook is present above the setting page navigation. Use it as you need.</em></small>
100
+
<br><code>hzfex_before_setting_page_nav</code>
101
+
</li>
102
+
<li class="action">
103
+
<p><b>Action Hook:</b>Add contents after page navigation</p>
104
+
<small><em>This hook is present below the setting page navigation. Use it as you need.</em></small>
105
+
<br><code>hzfex_after_setting_page_nav</code>
106
+
</li>
107
+
<li class="filter">
108
+
<p><b>Filter Hook:</b>Extend each setting section fields <small><em>(not the recommended way)</em></small></p>
109
+
<small><em>Highly recommended to add all fields from child-class <b>protected function sections()</b>. Use this filter only to add new fields to already an existing section added by others, just in case.</em></small>
110
+
<p>Paramter passed: <b>$section_fields -> array of section fields that belong to particular $section_id</b></p>
<h4>Setup environment for coding: <code><pre>Visual Studio Code</pre></code></h4>
165
+
<ul>
166
+
<li class="filter">
167
+
<p><b>Extension: WordPress Snippets -></b> Snippet for every WordPress function, class and constant</p>
168
+
<small><em>Use the extension <a href="https://github.com/jason-pomerleau/vscode-wordpress-toolbox" target="_blank">WordPress Snippets</a> to view every WordPress function, class and constant. Easy auto-completion with type hints and tab stops in all the right places.</em></small>
169
+
</li>
170
+
<li class="filter">
171
+
<p><b>Extension: PHP Intelephense -></b>PHP code intelligence for Visual Studio Code</p>
172
+
<small><em>Use the extension <a href="https://github.com/bmewburn/vscode-intelephense" target="_blank">PHP Intelephense</a> as Intelephense is a high performance PHP language server packed full of essential features for productive PHP development.</em></small>
173
+
</li>
174
+
<li class="filter">
175
+
<p><b>Font: Fira Code -></b>Free monospaced font with programming ligatures</p>
176
+
<small><em>Use the font <a href="https://github.com/tonsky/FiraCode" target="_blank">Fira Code</a> as a better coding font that supports Programming Ligatures. Download and install to your OS and then use as VS Code font family.</em></small>
177
+
</li>
178
+
<li class="filter">
179
+
<p><b>Extension: Comment Anchors -></b> View all available anchor tags in a file/workspace</p>
180
+
<small><em>Use the extension <a href="https://github.com/ExodiusStudios/vscode-comment-anchors" target="_blank">Comment Anchors</a> to view TODO | NOTE | WPHOOK | DEBUG, etc. anchors so that you can find and navigate to different sections of files in this plugin easily. Follow the steps of this extension's readme file on the github page on how to add new anchor tags.</em><br>Then, add following lines on Visual Studio code settings (in JSON Format):</small>
181
+
<?=pretty_print( $anchor ); ?>
182
+
</li>
183
+
</ul>
184
+
</div>
185
+
<hr>
186
+
<div class="wordpress_environment">
187
+
<h4>Setup environment for WordPresss: <code><pre>Plugins</pre></code></h4>
188
+
<ul>
189
+
<li class="action">
190
+
<p><b>Plugin: Show Hooks -></b> View all action/filter hooks availble on WordPress</p>
191
+
<small><em>Use the plugin <a href="https://wordpress.org/plugins/show-hooks" target="_blank">Show Hooks</a> to see all existing hooks as well as hooks added by this plugin.</em></small>
0 commit comments