iet-ou / wp-iet-generic-plugins Goto Github PK
View Code? Open in Web Editor NEW(Mostly) generic WordPress plugins - used for JuxtaLearn & LACE & Tricky Topics Guide
(Mostly) generic WordPress plugins - used for JuxtaLearn & LACE & Tricky Topics Guide
<?php
class IET_Custom_Functions {
// ...
protected function print_button_javascript( $selector = NULL, $title='' ) {
// ...
}
}
Relates to: IET-OU/oer-evidence-hub-org#54
Relates to:
Current crude CSS:
@IET-OU/wp-iet-generic-plugins ../css/iet-custom-style.css
~ line 193-195:
.lace-remove-ev-tags .iet-wp-tag-cloud-plugin a[ href *= 'tag/ev-' ] {
display: none;
}
Current examples:
[tagcloud format="list" x_display_count="after"]
Include tag/ev-*
tags:
[tagcloud x_include="tag/ev-"] `
Exclude tag/ev-*
tags:
[tagcloud x_exclude="tag/ev-"]
Relates to: #7.
Configuration - wp-config.php
:
<?php
define( 'IET_CUSTOM_FN_RTF_URL',
'http://document.online-convert.com/convert-to-rtf?external_url=%s#forms' );
define( 'IET_CUSTOM_FN_RTF_TITLE',
"Convert using an external service, 'Online-Convert.com' - experimental - opens in new window" );
Implementation - my_custom_functions.php
:
<?php
class IET_Custom_Functions {
// ...
protected function print_button_javascript( $selector = NULL, $title='' ) {
// ...
}
}
[wp_query post_type="evidence,project" format="richlist" ... ]
...
[wp_query
post_type="evidence,project" format="richlist" orderby="date" order="DESC" posts_per_page="5"]
Javascript:
/**
* Check an href for an anchor. If exists, and in document, scroll to it.
* If href argument omitted, assumes context (this) is HTML Element,
* which will be the case when invoked by jQuery after an event
*/
function scroll_if_anchor(href) {
href = typeof(href) == "string" ? href : $(this).attr("href");
// If href missing, ignore
if(!href) return;
// You could easily calculate this dynamically if you prefer
var fromTop = 50;
// If our Href points to a valid, non-empty anchor, and is on the same page (e.g. #foo)
// Legacy jQuery and IE7 may have issues: http://stackoverflow.com/q/1593174
var $target = $(href);
// Older browsers without pushState might flicker here, as they momentarily
// jump to the wrong position (IE < 10)
if($target.length) {
$('html, body').animate({ scrollTop: $target.offset().top - fromTop });
if(history && "pushState" in history) {
history.pushState({}, document.title, window.location.pathname + href);
return false;
}
}
}
// When our page loads, check to see if it contains and anchor
scroll_if_anchor(window.location.hash);
// Intercept all anchor clicks
$("body").on("click", "a[href^='#']", scroll_if_anchor);
...
php-parallel-lint
wpcs
— WordPress code-sniffer, via: PHP_CodeSniffer
eslint
Builds on: #11.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.