Items
Nodes Posts Things
Blocks
items_blocks.tpl.php
-
Hosting
Webserv
Group jellyfish.anoml.net triplegoddess.anoml.net sndsystm.anoml.net synism.anoml.net/s...
Topics
Topics 2017
-
Find which file a function is defined in
<?php
$reflFunc=new ReflectionFunction('name_of_function');
echo($reflFunc->getFileName().':'.$reflFunc->getStartLine());
?>...
Code
PHP 2016
-
Custom Post Types
Adds custom post type called "Reviews"
<?php
function create_post_type(){
register_post_type('review',
array(
'labels'=>array(
'name'=>__('Reviews'),
'singular_name'=>__('Review')
),
'public'=>true,
'has_archive'=>true,
'capabilities'=>array...
Wordpress
Code 2016
-
In the Weeds
Restaurant Management Tool
Stylesheet Coding
JavaScript
Work 2016
-
Post referencing setup
Assign multiple disciplines to a project
<?php
// Adds custom post type for Projects and Services
function create_post_type(){
register_post_type('project',
array(
'labels' => array(
'name' => __('Projects'),
'singular_name' => __('Project')
),
'taxonomies' => array('category'),
'public...
Code
Wordpress 2016
-
Covidien Portal
A resource and tool for physicians
Template Coding
Stylesheet Coding
Information Structuring
JavaScript
Work
Drupal 2016
-
Foster Care Training
Education Service Promotion
Work
Stylesheet Coding
Wordpress 2016
-
AG & Associates
Construction Portfolio & Promotion
Work
Wordpress
Stylesheet Coding
PHP 2016
-
Calvin Associates
Lawyer Firm Promotional
Work
Wordpress
Stylesheet Coding 2016
-
Ferber Law
Lawyer Firm Promotional
Work
Wordpress
Stylesheet Coding 2016
Nodes
items_nodes.tpl.php
-
Find which file a function is defined in
Submitted by orgnsm on Mon, 12/26/2016 - 10:42 -
Custom Post Types
Submitted by orgnsm on Sun, 12/25/2016 - 13:03Adds custom post type called "Reviews"
<?php function create_post_type(){ register_post_type('review', array( 'labels'=>array( 'name'=>__('Reviews'), 'singular_name'=>__('Review') ), 'public'=>true, 'has_archive'=>true, 'capabilities'=>array( 'edit_post'=>'edit_review', 'edit_posts'=>'edit_reviews', 'publish_posts'=>'publish_review', 'read_post'=>'read_review', ), ) ); } add_action('init','create_post_type'); ?>
Add abilities to "Reviews" post type
<?php function add_theme_caps(){ $subscribers=get_role('subscriber'); $subscribers->add_cap('edit_review'); $subscribers->add_cap('edit_reviews'); $subscribers->add_cap('publish_review'); $subscribers->add_cap('read_review'); $admins=get_role('administrator'); $admins->add_cap('edit_review'); $admins->add_cap('edit_reviews'); $admins->add_cap('publish_review'); $admins->add_cap('read_review'); } add_action('admin_init','add_theme_caps'); ?>
Add custom fields to "Reviews" post type
<?php add_action('admin_init','add_review_metas'); function add_review_metas(){ add_meta_box('review_rating-meta','Rating','review_rating','review','normal','low'); } function review_rating(){ global $post; $custom=get_post_custom($post->ID); $review_rating=$custom['review_rating'][0]; for($x=1;$x<6;$x++){ echo('<input'); if($x==$review_rating) echo(' checked="checked"'); echo(' type="radio" name="review_rating" id="review_rating_'.$x.'" value="'.$x.'"/><label for="review_rating_'.$x.'">'.$x.'</label>'."\n"); } } add_action('save_post','save_details'); function save_details(){ global $post; update_post_meta($post->ID,'review_rating',$_POST["review_rating"]); } ?>
-
In the Weeds
Submitted by orgnsm on Tue, 12/06/2016 - 17:03Subtitle:Restaurant Management ToolContext:Connection:Attribute Type:TypesInstallation URL:http://stage.orgnsm.org/in-the-weedsImages: -
Post referencing setup
Submitted by orgnsm on Thu, 12/01/2016 - 16:46Subtitle:Assign multiple disciplines to a project<?php // Adds custom post type for Projects and Services function create_post_type(){ register_post_type('project', array( 'labels' => array( 'name' => __('Projects'), 'singular_name' => __('Project') ), 'taxonomies' => array('category'), 'public' => true, 'has_archive' => true, 'capabilities' => array( 'edit_post' => 'edit_project', 'edit_posts' => 'edit_projects', 'publish_posts' => 'publish_project', 'read_post' => 'read_project', ), 'supports' => array( 'title','editor','thumbnail' ), ) ); register_post_type('service', array( 'labels' => array( 'name' => __('Services'), 'singular_name' => __('Service') ), 'public' => true, 'has_archive' => true, 'capabilities' => array( 'edit_post' => 'edit_service', 'edit_posts' => 'edit_services', 'publish_posts' => 'publish_service', 'read_post' => 'read_service', ), 'supports' => array( 'title','editor','thumbnail' ), ) ); } add_action('init','create_post_type'); function add_theme_caps(){ $subscribers = get_role( 'subscriber' ); //$subscribers->add_cap( 'edit_project' ); //$subscribers->add_cap( 'edit_projects' ); //$subscribers->add_cap( 'publish_project' ); $subscribers->add_cap( 'read_project' ); $subscribers->add_cap( 'read_service' ); $admins = get_role( 'administrator' ); $admins->add_cap( 'edit_project' ); $admins->add_cap( 'edit_projects' ); $admins->add_cap( 'publish_project' ); $admins->add_cap( 'read_project' ); $admins->add_cap( 'edit_service' ); $admins->add_cap( 'edit_services' ); $admins->add_cap( 'publish_service' ); $admins->add_cap( 'read_service' ); } add_action('init','add_theme_caps'); // Adds custom field to the PROJECT custom post type function add_project_metas(){ add_meta_box( 'project_service-meta', 'Service', 'project_service', 'project', 'normal', 'low' ); } add_action('admin_init','add_project_metas'); function project_service(){ global $post; $custom=get_post_custom($post->ID); $project_services=$custom['project_service'][0]; $project_services=unserialize($project_services); $args=array( 'post_type'=>'service', 'posts_per_page'=>'200', 'orderby'=>'title', 'order'=>'ASC' ); $loop=new WP_Query($args); while($loop->have_posts()):$loop->the_post(); echo('<div><input type="checkbox" name="project_services[]" value="'.get_the_ID().'" id="project_service_'.get_the_ID().'"'); if(is_array($project_services)&&in_array(get_the_ID(),$project_services)) echo(' checked="checked"'); //checked($project_services,get_the_ID()); echo('><label for="project_service_'.get_the_ID().'">'.get_the_title(get_the_ID()).'</label></div>'); endwhile; } function save_details(){ global $post; update_post_meta($post->ID,'project_service',$_POST["project_services"]); } add_action('save_post','save_details'); ?>
-
Covidien Portal
Submitted by orgnsm on Thu, 11/03/2016 - 14:38Subtitle:A resource and tool for physiciansContext:Connection:Attribute Type:TypesInstallation URL:http://covidien.orgnsm.orgImages: -
Foster Care Training
Submitted by orgnsm on Tue, 10/25/2016 - 10:58Subtitle:Education Service PromotionContext:Connection:Attribute Type:TypesInstallation URL:http://fostercaretraining.orgImages: -
AG & Associates
Submitted by orgnsm on Tue, 10/25/2016 - 10:57Subtitle:Construction Portfolio & PromotionContext:Connection:Attribute Type:TypesInstallation URL:http://agassociatesinc.comImages: -
Calvin Associates
Submitted by orgnsm on Tue, 10/25/2016 - 10:57Subtitle:Lawyer Firm PromotionalContext:Connection:Attribute Type:TypesInstallation URL:http://calvin-associates.comImages: -
Ferber Law
Submitted by orgnsm on Tue, 10/25/2016 - 10:41Subtitle:Lawyer Firm PromotionalContext:Connection:Attribute Type:TypesInstallation URL:http://danvillelaw.comImages:
Table
items_table.tpl.php
ID | Images/Body | Types | Title | Subjects | Attributes | Edit |
---|---|---|---|---|---|---|
138 |
![]() |
HostingLawyer Firm Promotional |
|
EDIT | ||
135 | <?php $reflFunc=new ReflectionFunction('name_of_function'); echo($reflFunc->getFileName().':'.$reflFunc->getStartLine()); ?> | Find which file a function is defined inLawyer Firm Promotional |
|
EDIT | ||
134 | Adds custom post type called "Reviews" <?php function create_post_type(){ register_post_type('review', array( 'labels'=>array( 'name'=>__('Reviews'), 'singular_name'=>__('Review') ), 'public'=>true, 'has_archive'=>true, 'capabilities'=>array( 'edit_post'=>'edit_review', 'edit_posts'=>'edit_reviews', 'publish_posts'=>'publish_review', 'read_post'=>'read_review', ), ) ); } add_action('init','creat | Custom Post TypesLawyer Firm Promotional |
|
EDIT | ||
71 |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
In the WeedsLawyer Firm Promotional |
|
EDIT | ||
132 | <?php // Adds custom post type for Projects and Services function create_post_type(){ register_post_type('project', array( 'labels' => array( 'name' => __('Projects'), 'singular_name' => __('Project') ), 'taxonomies' => array('category'), 'public' => true, 'has_archive' => true, 'capabilities' => array( 'edit_post' => 'edit_project', 'edit_posts' => 'edit_projects', 'publish_posts' => 'publish_project', | Post referencing setupLawyer Firm Promotional |
|
EDIT | ||
36 |
![]() ![]() ![]() ![]() ![]() ![]() |
Covidien PortalLawyer Firm Promotional |
|
EDIT | ||
131 |
![]() ![]() ![]() ![]() ![]() ![]() |
Foster Care TrainingLawyer Firm Promotional |
|
EDIT | ||
130 |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
AG & AssociatesLawyer Firm Promotional |
|
EDIT | ||
129 |
![]() ![]() ![]() ![]() ![]() ![]() |
Calvin AssociatesLawyer Firm Promotional |
|
EDIT | ||
128 |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Ferber LawLawyer Firm Promotional |
|
EDIT |
Rotator
items_cinema.tpl.php
-
Adds custom post type called "Reviews" <?php function create_post_type(){ register_post_type('review', array( 'labels'=>array( 'name'=>__('Reviews'), 'singular_name'=>__('Review') ), 'public'=>true, 'has_archive'=>true, 'capabilities'=>array( 'edit_post'=>'edit_review', 'edit_posts'=>'edit_reviews', 'publish_posts'=>'publish_review', 'read_post'=>'read_review', ), ) ); } add_action('init','create_post_type'); ?> Add abilities to "Reviews" post type <?php function add_theme_caps(){ $subscribers=get_role('subscriber'); $subscribers->add_cap('edit_review'); $subscribers->add_cap('edit_reviews'); $subscribers->add_cap('publish_review'); $subscribers->add_cap('read_review'); $admins=get_role('administrator'); $admins->add_cap('edit_review'); $admins->add_cap('edit_reviews'); $admins->add_cap('publish_review'); $admins->add_cap('read_review'); } add_action('admin_init','add_...
Code Custom Post Types
Wordpress
-
<?php // Adds custom post type for Projects and Services function create_post_type(){ register_post_type('project', array( 'labels' => array( 'name' => __('Projects'), 'singular_name' => __('Project') ), 'taxonomies' => array('category'), 'public' => true, 'has_archive' => true, 'capabilities' => array( 'edit_post' => 'edit_project', 'edit_posts' => 'edit_projects', 'publish_posts' => 'publish_project', 'read_post' => 'read_project', ), 'supports' => array( 'title','editor','thumbnail' ), ) ); register_post_type('service', array( 'labels' => array( 'name' => __('Services'), 'singular_name' => __('Service') ), 'public' => true, 'has_archive' => true, 'capabilities' => array( 'edit_post' => 'edit_service', 'edit_posts' => 'edit_services', 'publish_posts' => 'publish_service', 'read_po...
Code Post referencing setup Assign multiple disciplines to a project
Wordpress
RSS
items_syndicate.tpl.php
]]>Organic Interfaces http://interfaces.orgnsm.org/syndicateRecent Web Design & Info Code en Mon, 17 Jul 2017 11:54:30 -1000 Hosting http://interfaces.orgnsm.org/node/138]]> 138 Mon, 17 Jul 2017 11:54:30 -1000 http://interfaces.orgnsm.org/sites/interfaces.orgnsm.org/files/styles/large-landscape-or-portrait/public/webhosting.png?itok=P_Wuceo8 Find which file a function is defined in http://interfaces.orgnsm.org/node/135<?php $reflFunc=new ReflectionFunction('name_of_function'); echo($reflFunc->getFileName().':'.$reflFunc->getStartLine()); ?>
<?php
function create_post_type(){
register_post_type('review',
array(
'labels'=>array(
'name'=>__('Reviews'),
'singular_name'=>__('Review')
),
'public'=>true,
'has_archive'=>true,
'capabilities'=>array(
'edit_post'=>'edit_review',
'edit_posts'=>'edit_reviews',
'publish_posts'=>'publish_review',
'read_post'=>'read_review',
),
)
);
}
add_action('init','create_post_type');
?>
Add abilities to "Reviews" post type
<?php
function add_theme_caps(){
$subscribers=get_role('subscriber');
$subscribers->add_cap('edit_review');
$subscribers->add_cap('edit_reviews');
$subscribers->add_cap('publish_review');
$subscribers->add_cap('read_review');
$admins=get_role('administrator');
$admins->add_cap('edit_review');
$admins->add_cap('edit_reviews');
$admins->add_cap('publish_review');
$admins->add_cap('read_review');
}
add_action('admin_init','add_theme_caps');
?>
Add custom fields to "Reviews" post type
<?php
add_action('admin_init','add_review_metas');
function add_review_metas(){
add_meta_box('review_rating-meta','Rating','review_rating','review','normal','low');
}
function review_rating(){
global $post;
$custom=get_post_custom($post->ID);
$review_rating=$custom['review_rating'][0];
for($x=1;$x<6;$x++){
echo('<input');
if($x==$review_rating) echo(' checked="checked"');
echo(' type="radio" name="review_rating" id="review_rating_'.$x.'" value="'.$x.'"/><label for="review_rating_'.$x.'">'.$x.'</label>'."\n");
}
}
add_action('save_post','save_details');
function save_details(){
global $post;
update_post_meta($post->ID,'review_rating',$_POST["review_rating"]);
}
?>
]]><?php
// Adds custom post type for Projects and Services
function create_post_type(){
register_post_type('project',
array(
'labels' => array(
'name' => __('Projects'),
'singular_name' => __('Project')
),
'taxonomies' => array('category'),
'public' => true,
'has_archive' => true,
'capabilities' => array(
'edit_post' => 'edit_project',
'edit_posts' => 'edit_projects',
'publish_posts' => 'publish_project',
'read_post' => 'read_project',
),
'supports' => array(
'title','editor','thumbnail'
),
)
);
register_post_type('service',
array(
'labels' => array(
'name' => __('Services'),
'singular_name' => __('Service')
),
'public' => true,
'has_archive' => true,
'capabilities' => array(
'edit_post' => 'edit_service',
'edit_posts' => 'edit_services',
'publish_posts' => 'publish_service',
'read_post' => 'read_service',
),
'supports' => array(
'title','editor','thumbnail'
),
)
);
}
add_action('init','create_post_type');
function add_theme_caps(){
$subscribers = get_role( 'subscriber' );
//$subscribers->add_cap( 'edit_project' );
//$subscribers->add_cap( 'edit_projects' );
//$subscribers->add_cap( 'publish_project' );
$subscribers->add_cap( 'read_project' );
$subscribers->add_cap( 'read_service' );
$admins = get_role( 'administrator' );
$admins->add_cap( 'edit_project' );
$admins->add_cap( 'edit_projects' );
$admins->add_cap( 'publish_project' );
$admins->add_cap( 'read_project' );
$admins->add_cap( 'edit_service' );
$admins->add_cap( 'edit_services' );
$admins->add_cap( 'publish_service' );
$admins->add_cap( 'read_service' );
}
add_action('init','add_theme_caps');
// Adds custom field to the PROJECT custom post type
function add_project_metas(){
add_meta_box(
'project_service-meta',
'Service',
'project_service',
'project',
'normal',
'low'
);
}
add_action('admin_init','add_project_metas');
function project_service(){
global $post;
$custom=get_post_custom($post->ID);
$project_services=$custom['project_service'][0];
$project_services=unserialize($project_services);
$args=array(
'post_type'=>'service',
'posts_per_page'=>'200',
'orderby'=>'title',
'order'=>'ASC'
);
$loop=new WP_Query($args);
while($loop->have_posts()):$loop->the_post();
echo('<div><input type="checkbox" name="project_services[]" value="'.get_the_ID().'" id="project_service_'.get_the_ID().'"');
if(is_array($project_services)&&in_array(get_the_ID(),$project_services)) echo(' checked="checked"');
//checked($project_services,get_the_ID());
echo('><label for="project_service_'.get_the_ID().'">'.get_the_title(get_the_ID()).'</label></div>');
endwhile;
}
function save_details(){
global $post;
update_post_meta($post->ID,'project_service',$_POST["project_services"]);
}
add_action('save_post','save_details');
?>
]]>