Giter Site home page Giter Site logo

ce-custom-functionality's Introduction

Continuing Education Custom Functions Plugin

This plugin provides custom functions needed for the Continuing Education website to be integrated with our main WordPress website. It also provides a widget that can be used to display posts linked to a CustomPress custom post type using CustomPress taxonomy.

##Settings

After activation, settings for the plugin can be updated via a submenu "CE Custom Functions" under the main administrative Settings menu. Available settings:

###CampusCE settings

  • CampusCE data URL - The URL used to retrieve CampusCE data
  • CampusCE user key - The special user key that is required to use the data URL
  • CustomPress post type - The post type created in CustomPress plugin.
  • CustomPress taxonomy - The taxonomy created in CustomPress plugin.
  • CustomPress field ID - The field ID created in CustomPress plugin.

##Functions

###CampusCE functions All return an object generated from the data XML as returned from CampusCE. All are static methods of the plugin's CE_Custom_Functions class.

Note: The functions now distinguish between courses and classes. Per the data, classes are an offering of a course. As such, pulling classes will return all available offerings of a course.

  • cecf_get_courses_by_category_id($category_id)

    Returns array of course objects. Course object contains CourseID, Title, WebDescr, CategoryID, and NewTag data members.

  • cecf_get_classes_by_category_id($category_id)

    Returns array of classes. Class data is directly as returned from CampusCE.

  • cecf_get_category_by_id($category_id)

    Returns category object. Category data is directly as returned from CampusCE.

  • cecf_get_course_by_id($course_id)

    Removed as did not return expected results.

###Example usage

Frontend example

include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
if ( is_plugin_active('ce-custom-functions/ce-custom-functionality.php') ) { 
	$courses = CE_Custom_Functions::cecf_get_courses_by_category_id("1882");
	$category = CE_Custom_Functions::cecf_get_category_by_id("1882");
	$classes = CE_Custom_Functions::cecf_get_classes_by_category_id("1882");
}

Widget

###Acceptance criteria

  • Admin should be able to create a cross-reference between blog categories and class categories
  • Blog titles from applicable category should display on sidebar
  • Should link to full story in blog section
  • Should be link to category page for more stories

ce-custom-functionality's People

Contributors

triptisharma avatar taija avatar nicswan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.