A list of amazingly awesome PHP libraries, resources and shiny things.
- Composer
- Composer Related
- Frameworks
- Micro Frameworks
| // Creates a small boarder around the table. | |
| .table_of_contents.fl { | |
| float: right; | |
| margin: 0 0 15px 15px; | |
| padding: 5px; | |
| border: 1px solid #AAA; | |
| } |
| <?php | |
| if ( !class_exists( 'WDS_Taxonomy_Radio' ) ) { | |
| /** | |
| * Removes and replaces the built-in taxonomy metabox with our radio-select metabox. | |
| * @link http://codex.wordpress.org/Function_Reference/add_meta_box#Parameters | |
| */ | |
| class WDS_Taxonomy_Radio { | |
| // Post types where metabox should be replaced (defaults to all post_types associated with taxonomy) |
| <?php | |
| /** | |
| * Created by PhpStorm. | |
| * User: merianos | |
| * Date: 6/7/2018 | |
| * Time: 8:39 μμ | |
| */ | |
| class OtTaxonomiesMetabox { |
| #!/bin/bash | |
| # | |
| # This script configures WordPress file permissions based on recommendations | |
| # from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
| # | |
| # Author: Michael Conigliaro <mike [at] conigliaro [dot] org> | |
| # | |
| WP_OWNER=www-data # <-- wordpress owner | |
| WP_GROUP=www-data # <-- wordpress group | |
| WP_ROOT=$1 # <-- wordpress root directory |
| // This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref | |
| <?php | |
| /** | |
| * WordPress Query Comprehensive Reference | |
| * Compiled by luetkemj - luetkemj.github.io | |
| * | |
| * CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters | |
| * Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php | |
| */ |
| <?php | |
| add_action('wp_ajax_register_user_front_end', 'register_user_front_end', 0); | |
| add_action('wp_ajax_nopriv_register_user_front_end', 'register_user_front_end'); | |
| function register_user_front_end() { | |
| $new_user_name = stripcslashes($_POST['new_user_name']); | |
| $new_user_email = stripcslashes($_POST['new_user_email']); | |
| $new_user_password = $_POST['new_user_password']; | |
| $user_nice_name = strtolower($_POST['new_user_email']); | |
| $user_data = array( | |
| 'user_login' => $new_user_name, |
| <?php | |
| //Simple Ajax Login Form | |
| //Source: http://natko.com/wordpress-ajax-login-without-a-plugin-the-right-way/ | |
| //html | |
| <form id="login" action="login" method="post"> | |
| <h1>Site Login</h1> | |
| <p class="status"></p> | |
| <label for="username">Username</label> | |
| <input id="username" type="text" name="username"> |