TODO
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| ************ Debug, Debuging ************ | |
| //Activate log files in wp-config.php | |
| define( 'WP_DEBUG', true ); // Enabling WP_DEBUG will cause all PHP errors, notices and warnings to be displayed. | |
| define( 'WP_DEBUG_LOG', true ); // Enable Debug logging to the /wp-content/debug.log file | |
| define( 'WP_DEBUG_DISPLAY', true ); // Controls whether debug messages are shown inside the HTML of pages or not. | |
| // use this | |
| define( 'WP_DEBUG', true ); | |
| define( 'WP_DEBUG_LOG', true ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class My_Dropdown_Category_Control extends WP_Customize_Control { | |
| public $type = 'dropdown-category'; | |
| protected $dropdown_args = false; | |
| protected function render_content() { | |
| ?><label><?php |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_image_size( 'bestwebsite-admin-post-featured-image', 120, 120, false ); | |
| // Add the posts and pages columns filter. They can both use the same function. | |
| add_filter('manage_posts_columns', 'bestwebsite_add_post_admin_thumbnail_column', 2); | |
| add_filter('manage_pages_columns', 'bestwebsite_add_post_admin_thumbnail_column', 2); | |
| // Add the column | |
| function bestwebsite_add_post_admin_thumbnail_column($bestwebsite_columns){ | |
| $bestwebsite_columns['bestwebsite_thumb'] = __('Featured Image'); | |
| return $bestwebsite_columns; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* | |
| Plugin Name: wordpress assist clean header | |
| Plugin URI: http://www.wordpressassist.nl/ | |
| Description: Remove shortlink hook | |
| Version: 1.0 | |
| Author: AukeJomm | |
| Author URI: http://www.aukejongbloed.nl | |
| */ | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $args = array( | |
| 'label' => '', // Text in Label | |
| 'class' => '', | |
| 'style' => '', | |
| 'wrapper_class' => '', | |
| 'value' => '', // if empty, retrieved from post meta where id is the meta_key | |
| 'id' => '', // required | |
| 'name' => '', //name will set from id if empty |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * @package Smashing_plugin | |
| * @version 1.0 | |
| */ | |
| /* | |
| Plugin Name: Smashing plugin | |
| Plugin URI: https://www.smashingmagazine.com/2016/03/advanced-wordpress-search-with-wp_query/ | |
| Description: This is an example plugin for Smashing Magazine readers. | |
| Author: Carlo Daniele |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Create a metabox with a single field. | |
| * Replace `_namespace` with some namespace for your project to avoid conflicts with other items | |
| */ | |
| // | |
| // Create Metabox | |
| // |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Plugin Name: Custom Post Types Example | |
| * Description: An example plugin to create custom post types with custom taxonomies and custom meta fields, including exposing to the REST API. | |
| * Plugin URI: http://kosso.co.uk | |
| * Version: 1.0.0 | |
| * Author: Kosso | |
| * Author URI: http://kosso.co.uk | |
| * License: GPLv2 | |
| * Network: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * template name: blogupdate | |
| * Created by PhpStorm. | |
| * User: PC35 | |
| * Date: 25-10-2016 | |
| * Time: 16:04 | |
| */ | |
| global $wpdb; | |
| $id= get_current_user_id(); |