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; | |
| } |
| <script type="application/ld+json"> | |
| { | |
| "@context": "http://schema.org", | |
| "@type": "TravelAgency", | |
| "name": "FreeTours", | |
| "address": { | |
| "@type": "PostalAddress", | |
| "streetAddress": "", | |
| "addressLocality": "New York", | |
| "addressRegion": "NY", |
| <? | |
| if( 'POST' == $_SERVER['REQUEST_METHOD'] && !empty( $_POST['insert_post'] )) { //check that our form was submitted | |
| $title = $_POST['thread_title']; //set our title | |
| if ($_POST['thread_description']=="") { // check if a description was entered | |
| $description = "See thread title..."; // if not, use placeholder | |
| } else { | |
| $description = $_POST['thread_description']; //if so, use it |
| <?php | |
| /** | |
| * post-process.php | |
| * make sure to include post-process.php in your functions.php. Use this in functions.php: | |
| * | |
| * get_template_part('post-process'); | |
| * | |
| */ | |
| function do_insert() { | |
| if( 'POST' == $_SERVER['REQUEST_METHOD'] |
| if (isset($_GET['activated']) && is_admin()){ | |
| $new_page_title = 'This is the page title'; | |
| $new_page_content = 'This is the page content'; | |
| $new_page_template = ''; //ex. template-custom.php. Leave blank if you don't want a custom page template. | |
| $page_check = get_page_by_title($new_page_title); | |
| $new_page = array( | |
| 'post_type' => 'page', | |
| 'post_title' => $new_page_title, | |
| 'post_content' => $new_page_content, | |
| 'post_status' => 'publish', |
| /* globals global */ | |
| jQuery(function($){ | |
| var searchRequest; | |
| $('.search-autocomplete').autoComplete({ | |
| minChars: 2, | |
| source: function(term, suggest){ | |
| try { searchRequest.abort(); } catch(e){} | |
| searchRequest = $.post(global.ajax, { search: term, action: 'search_site' }, function(res) { | |
| suggest(res.data); | |
| }); |