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
/front-end(publicly visible area) | |
/admin area(management area) | |
non-cms, client request url from web server, web server sees if requested file exists, and if it does, it returns it. Very simple. Url is tied closely to the web page | |
THE FRONT-END AREA | |
cms(database backend cms, non-database backend cms). url does not exactly correspond directly to files on a server. Instead of creating webpages as files, it is better to use a "controller" to read from a database, based on what the URL was. There is a popular programming pattern called MVC, which is very similar in principle to what a CMS of this type does. | |
THE ADMIN AREA |
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
Cohesion | |
-------- | |
class ANOTCohesionClass { | |
private $firstNumber; | |
private $secondNumber; | |
private $length; | |
private $width; | |
function __construct($firstNumber, $secondNumber){ | |
$this->firstNumber = $firstNumber; |
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
PROCESS, THREAD, CONCURRENCY, PARALLELISM , IPC, AND SHIT | |
----------------------------------------------------------- | |
Below is the illustration of an instance(on the moment) of computer program running, which is called a process. | |
------------ | |
| computer | | |
| program | |
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
CSS | |
keyword.control.at-rule.charset.css | |
punctuation.definition.keyword.css | |
meta.at-rule.charset.css | |
keyword.control.at-rule.import.css | |
punctuation.definition.keyword.css | |
meta.at-rule.import.css | |
support.function.url.css | |
punctuation.section.function.css | |
punctuation.section.function.css |
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 | |
function call_dump($content){ | |
$temp = tmpfile(); | |
fwrite($temp, var_export($content)); | |
fseek($temp, 0); | |
$content = fread($temp, 1024); | |
$gettype = gettype($content); | |
if(ucwords($gettype) === 'ARRAY'){ |
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 | |
add_filter('pre_get_posts', 'wordpress_get_current_queried_arguments'); | |
function wordpress_get_current_queried_arguments($query){ | |
dumper($query, ''); | |
return ; | |
}// rely on dumper helper functions |
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 Redirect to homepage after logout | |
* @version 0.1 | |
*/ | |
/* | |
Plugin Name: Redirect to homepage after logout | |
Plugin URI: http://daankortenbach.nl/wordpress/redirect-to-homepage-after-logout/ | |
Description: Redirects the user to the homepage after logout | |
Author: Daan Kortenbach |
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
/** | |
* Determine if a post exists based on post_name and post_type | |
* | |
* @param $post_name string unique post name | |
* @param $post_type string post type (defaults to 'post') | |
*/ | |
function post_exists( $post_name, $post_type='post' ) { | |
global $wpdb; |
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 | |
<form name="post" action="post.php" method="post" id="post"<?php do_action('post_edit_form_tag'); |
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 | |
/** | |
* Callback for WordPress 'post_edit_form_tag' action. | |
* | |
* Append enctype - multipart/form-data and encoding - multipart/form-data | |
* to allow image uploads for post type 'post' | |
* | |
* @global type $post | |
* @return type |