[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-admin/js/ -> press-this.js (summary)

PressThis App

File Size: 899 lines (25 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 30 functions

  __()
  checkUrl()
  showSpinner()
  hideSpinner()
  textEditorResize()
  mceGetCursorOffset()
  mceKeyup()
  mceScroll()
  getTitleText()
  prepareFormData()
  submitPost()
  insertSelectedMedia()
  saveNewCategory()
  renderToolsVisibility()
  renderNotice()
  renderError()
  clearNotices()
  renderStartupNotices()
  addImg()
  renderDetectedMedia()
  monitorOptionsModal()
  openSidebar()
  closeSidebar()
  monitorPlaceholder()
  toggleCatItem()
  monitorCatList()
  splitButtonClose()
  render()
  monitor()
  refreshCatsCache()

Functions
Functions that are not part of a class:

__( key )   X-Ref
Emulates our PHP __() gettext function, powered by the strings exported in pressThisL10n.

param: key string Key of the string to be translated, as found in pressThisL10n.
returns: string Original or translated string, or empty string if no key.

checkUrl( url )   X-Ref
Allow only HTTP or protocol relative URLs.

param: url string The URL.
returns: string Processed URL.

showSpinner()   X-Ref
Show UX spinner


hideSpinner()   X-Ref
Hide UX spinner


textEditorResize( reset )   X-Ref
No description

mceGetCursorOffset()   X-Ref
No description

mceKeyup( event )   X-Ref
No description

mceScroll( key )   X-Ref
No description

getTitleText()   X-Ref
Replace emoji images with chars and sanitize the text content.


prepareFormData()   X-Ref
Prepare the form data for saving.


submitPost( action )   X-Ref
Submit the post form via AJAX, and redirect to the proper screen if published vs saved as a draft.

param: action string publish|draft

insertSelectedMedia( $element )   X-Ref
Inserts the media a user has selected from the presented list inside the editor, as an image or embed, based on type

param: type string img|embed
param: src string Source URL
param: link string Optional destination link, for images (defaults to src)

saveNewCategory()   X-Ref
Save a new user-generated category via AJAX


renderToolsVisibility()   X-Ref
Hide the form letting users enter a URL to be scanned, if a URL was already passed.


renderNotice( msg, error )   X-Ref
Render error notice

param: msg string Notice/error message
param: error string error|notice CSS class for display

renderError( msg )   X-Ref
Render error notice

param: msg string Error message

clearNotices()   X-Ref
No description

renderStartupNotices()   X-Ref
Render notices on page load, if any already


addImg( src, displaySrc, i )   X-Ref
Add an image to the list of found images.


renderDetectedMedia()   X-Ref
Render the detected images and embed for selection, if any


monitorOptionsModal()   X-Ref
Interactive navigation behavior for the options modal (post format, tags, categories)


openSidebar()   X-Ref
Interactive behavior for the sidebar toggle, to show the options modals


closeSidebar()   X-Ref
No description

monitorPlaceholder()   X-Ref
Interactive behavior for the post title's field placeholder


toggleCatItem( $element )   X-Ref
No description

monitorCatList()   X-Ref
No description

splitButtonClose()   X-Ref
No description

render()   X-Ref
Calls all the rendring related functions to happen on page load


monitor()   X-Ref
Set app events and other state monitoring related code.


refreshCatsCache()   X-Ref
No description



Generated: Sun Sep 24 01:00:03 2017 Cross-referenced by PHPXref 0.7.1